]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR middle-end/60291 (slow compile times for any mode (-O0/-O1/-O2) on large .c...
authorRichard Biener <rguenther@suse.de>
Fri, 21 Feb 2014 13:14:23 +0000 (13:14 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 21 Feb 2014 13:14:23 +0000 (13:14 +0000)
2014-02-21  Richard Biener  <rguenther@suse.de>

PR middle-end/60291
* tree-ssa-live.c (mark_all_vars_used_1): Do not walk
DECL_INITIAL for globals not in the current function context.

From-SVN: r207991

gcc/ChangeLog
gcc/tree-ssa-live.c

index 29ed8c833c4c0e8203df890b176bf26e08577906..2acc2dfd99f0140a55b27183a25f96e581bd8dd9 100644 (file)
@@ -1,3 +1,9 @@
+2014-02-21  Richard Biener  <rguenther@suse.de>
+
+       PR middle-end/60291
+       * tree-ssa-live.c (mark_all_vars_used_1): Do not walk
+       DECL_INITIAL for globals not in the current function context.
+
 2014-02-21  Jakub Jelinek  <jakub@redhat.com>
 
        PR tree-optimization/56490
index 13e4fb0cfa45a8082d1134105608a17d596ba3f7..3cd3613d7325802b8186766f3cf2a7d7434baa61 100644 (file)
@@ -435,7 +435,8 @@ mark_all_vars_used_1 (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
     {
       /* 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))
+      if (set_is_used (t) && is_global_var (t)
+         && DECL_CONTEXT (t) == current_function_decl)
        mark_all_vars_used (&DECL_INITIAL (t));
     }
   /* remove_unused_scope_block_p requires information about labels