http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60291

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
For reference (in testing)

Index: gcc/tree-ssa-live.c
===================================================================
--- gcc/tree-ssa-live.c (revision 207960)
+++ gcc/tree-ssa-live.c (working copy)
@@ -432,12 +432,7 @@ mark_all_vars_used_1 (tree *tp, int *wal
   /* Only need to mark VAR_DECLS; parameters and return results are not
      eliminated as unused.  */
   if (TREE_CODE (t) == VAR_DECL)
-    {
-      /* When a global var becomes used for the first time also walk its
-         initializer (non global ones don't have any).  */
-      if (set_is_used (t) && is_global_var (t))
-       mark_all_vars_used (&DECL_INITIAL (t));
-    }
+    set_is_used (t);
   /* remove_unused_scope_block_p requires information about labels
      which are not DECL_IGNORED_P to tell if they might be used in the IL.  */
   else if (TREE_CODE (t) == LABEL_DECL)

fastest is -Og:

 expand                  :  30.56 (42%) usr   0.74 (10%) sys  30.15 (38%) wall 
165633 kB ( 8%) ggc
 TOTAL                 :  72.66             7.70            80.33           
2047648 kB

throwing that to callgrind now (perf sucks - no backtraces :/)

Reply via email to