diff options
author | Jan Hubicka <jh@suse.cz> | 2009-05-09 20:31:32 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2009-05-09 18:31:32 +0000 |
commit | d563610d814b5ebd2942b4c7b61ca57110d279ca (patch) | |
tree | 3a638acc7b1cb01fa6580f3777916be5c4530c7b /gcc/ipa.c | |
parent | f08a18d078e2b4bb2aeb3f29980ad389b701f9ce (diff) | |
download | gcc-d563610d814b5ebd2942b4c7b61ca57110d279ca.zip gcc-d563610d814b5ebd2942b4c7b61ca57110d279ca.tar.gz gcc-d563610d814b5ebd2942b4c7b61ca57110d279ca.tar.bz2 |
re PR bootstrap/40082 (Power bootstrap is broken in building libstdc++)
PR bootstrap/40082
* ipa.c (update_inlined_to_pointer): New function.
(cgraph_remove_unreachable_nodes): Use it.
From-SVN: r147319
Diffstat (limited to 'gcc/ipa.c')
-rw-r--r-- | gcc/ipa.c | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -92,6 +92,21 @@ cgraph_postorder (struct cgraph_node **order) return order_pos; } +/* Look for all functions inlined to NODE and update their inlined_to pointers + to INLINED_TO. */ + +static void +update_inlined_to_pointer (struct cgraph_node *node, struct cgraph_node *inlined_to) +{ + struct cgraph_edge *e; + for (e = node->callees; e; e = e->next_callee) + if (e->callee->global.inlined_to) + { + e->callee->global.inlined_to = inlined_to; + update_inlined_to_pointer (e->callee, inlined_to); + } +} + /* Perform reachability analysis and reclaim all unreachable nodes. If BEFORE_INLINING_P is true this function is called before inlining decisions has been made. If BEFORE_INLINING_P is false this function also @@ -214,7 +229,8 @@ cgraph_remove_unreachable_nodes (bool before_inlining_p, FILE *file) && !node->callers) { gcc_assert (node->clones); - node->global.inlined_to = false; + node->global.inlined_to = NULL; + update_inlined_to_pointer (node, node); } node->aux = NULL; } |