diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-07 10:52:34 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-07 10:52:34 +0000 |
commit | 9bae7de0bc8dfb3026ba5aa2b43fa9db46f9c8a2 (patch) | |
tree | c0002800d1ff4d491d967009e61a8dd25140f15a /gcc/ipa.c | |
parent | e204cb62ce95b12cba4809351a36d181ef5af1bd (diff) | |
download | gcc-9bae7de0bc8dfb3026ba5aa2b43fa9db46f9c8a2.tar.gz |
PR middle-end/45926
* ipa.c (cgraph_remove_unreachable_nodes): Revert my previous patch.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165090 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa.c')
-rw-r--r-- | gcc/ipa.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/gcc/ipa.c b/gcc/ipa.c index 4fbc3b7076f..8eadd36ca30 100644 --- a/gcc/ipa.c +++ b/gcc/ipa.c @@ -238,19 +238,14 @@ cgraph_remove_unreachable_nodes (bool before_inlining_p, FILE *file) #endif varpool_reset_queue (); for (node = cgraph_nodes; node; node = node->next) - if (!node->analyzed) - { - gcc_assert (!node->aux); - node->reachable = false; - } - else if ((!cgraph_can_remove_if_no_direct_calls_and_refs_p (node) - /* Keep around virtual functions for possible devirtualization. */ - || (!before_inlining_p - && !node->global.inlined_to - && DECL_VIRTUAL_P (node->decl) - && (DECL_COMDAT (node->decl) || DECL_EXTERNAL (node->decl)))) - && ((!DECL_EXTERNAL (node->decl)) - || before_inlining_p)) + if ((!cgraph_can_remove_if_no_direct_calls_and_refs_p (node) + /* Keep around virtual functions for possible devirtualization. */ + || (!before_inlining_p + && !node->global.inlined_to + && DECL_VIRTUAL_P (node->decl) + && (DECL_COMDAT (node->decl) || DECL_EXTERNAL (node->decl)))) + && ((!DECL_EXTERNAL (node->decl)) + || before_inlining_p)) { gcc_assert (!node->global.inlined_to); enqueue_cgraph_node (node, &first); |