aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-live.c
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@redhat.com>2007-02-08 16:55:43 +0000
committerDiego Novillo <dnovillo@gcc.gnu.org>2007-02-08 11:55:43 -0500
commitd37d06fef83c5f8355fa327d5fa0ff25cd31bb77 (patch)
tree462b7ce003c31e7ef7c5f0d111647eb55bddfdfb /gcc/tree-ssa-live.c
parente35a0e6476c15c34df002f698dbfbbcc44338238 (diff)
downloadgcc-d37d06fef83c5f8355fa327d5fa0ff25cd31bb77.zip
gcc-d37d06fef83c5f8355fa327d5fa0ff25cd31bb77.tar.gz
gcc-d37d06fef83c5f8355fa327d5fa0ff25cd31bb77.tar.bz2
re PR tree-optimization/30562 (remove unused variable is removing a referenced variable (in STORED_SYMS or LOADED_SYMS))
PR 30562 * tree-flow.h (struct var_ann_d): Remove field 'is_used'. Update all users. * tree-ssa-alias.c (compute_is_aliased): Remove. Update all users. (init_alias_info): * tree-ssa-live.c (remove_unused_locals): Do not remove TREE_ADDRESSABLE variables. * tree-ssa-structalias.c (compute_points_to_sets): Tidy. * tree-ssa-operands.c (add_virtual_operand): Remove argument FOR_CLOBBER. Update all users. If VAR has an associated alias set, add a virtual operand for it if no alias is found to conflict with the memory reference. From-SVN: r121715
Diffstat (limited to 'gcc/tree-ssa-live.c')
-rw-r--r--gcc/tree-ssa-live.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/tree-ssa-live.c b/gcc/tree-ssa-live.c
index 0113b1b..7e98e2c 100644
--- a/gcc/tree-ssa-live.c
+++ b/gcc/tree-ssa-live.c
@@ -502,18 +502,20 @@ remove_unused_locals (void)
cell = &TREE_CHAIN (*cell);
}
- /* Remove unused variables from REFERENCED_VARs. As an special exception
- keep the variables that are believed to be aliased. Those can't be
- easily removed from the alias sets and and operand caches.
- They will be removed shortly after next may_alias pass is performed. */
+ /* Remove unused variables from REFERENCED_VARs. As a special
+ exception keep the variables that are believed to be aliased.
+ Those can't be easily removed from the alias sets and operand
+ caches. They will be removed shortly after the next may_alias
+ pass is performed. */
FOR_EACH_REFERENCED_VAR (t, rvi)
if (!is_global_var (t)
&& !MTAG_P (t)
&& TREE_CODE (t) != PARM_DECL
&& TREE_CODE (t) != RESULT_DECL
&& !(ann = var_ann (t))->used
- && !ann->is_aliased && !is_call_clobbered (t) && !ann->symbol_mem_tag)
- remove_referenced_var (t);
+ && !ann->symbol_mem_tag
+ && !TREE_ADDRESSABLE (t))
+ remove_referenced_var (t);
}