diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2009-06-04 05:52:03 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2009-06-04 05:52:03 +0000 |
commit | 2ce59df73da0bb9ab64eae1b59851f33a623260c (patch) | |
tree | 64e4783b15e2bc0c0bdebb492b442e74a5a7df4d /gcc/tree-ssa-live.c | |
parent | 78bd9046a8dff27c8247a5c80bdec5f7122f77d2 (diff) | |
download | gcc-2ce59df73da0bb9ab64eae1b59851f33a623260c.zip gcc-2ce59df73da0bb9ab64eae1b59851f33a623260c.tar.gz gcc-2ce59df73da0bb9ab64eae1b59851f33a623260c.tar.bz2 |
tree-ssa-live.c (remove_unused_scope_block_p): Keep variables that have value exprs.
* tree-ssa-live.c (remove_unused_scope_block_p): Keep variables
that have value exprs.
From-SVN: r148161
Diffstat (limited to 'gcc/tree-ssa-live.c')
-rw-r--r-- | gcc/tree-ssa-live.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/tree-ssa-live.c b/gcc/tree-ssa-live.c index a02b1c5..c7366ff 100644 --- a/gcc/tree-ssa-live.c +++ b/gcc/tree-ssa-live.c @@ -435,6 +435,17 @@ remove_unused_scope_block_p (tree scope) will be output to file. */ if (TREE_CODE (*t) == FUNCTION_DECL) unused = false; + + /* If a decl has a value expr, we need to instantiate it + regardless of debug info generation, to avoid codegen + differences in memory overlap tests. update_equiv_regs() may + indirectly call validate_equiv_mem() to test whether a + SET_DEST overlaps with others, and if the value expr changes + by virtual register instantiation, we may get end up with + different results. */ + else if (TREE_CODE (*t) == VAR_DECL && DECL_HAS_VALUE_EXPR_P (*t)) + unused = false; + /* Remove everything we don't generate debug info for. */ else if (DECL_IGNORED_P (*t)) { |