re PR middle-end/60291 (slow compile times for any mode (-O0/-O1/-O2) on large .c source file (30MBs))

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
This commit is contained in:
Richard Biener 2014-02-21 13:14:23 +00:00 committed by Richard Biener
parent b9b78c8ca0
commit 32417082bf
2 changed files with 8 additions and 1 deletions

View 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

View 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