aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ipa.c')
-rw-r--r--gcc/ipa.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/gcc/ipa.c b/gcc/ipa.c
index 4fbc3b7..8eadd36 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);