aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-dom.c
diff options
context:
space:
mode:
authorSteven Bosscher <stevenb@suse.de>2004-09-15 21:47:45 +0000
committerSteven Bosscher <steven@gcc.gnu.org>2004-09-15 21:47:45 +0000
commitc7f902196193ba3fe4540b580cbc613d53c05a13 (patch)
tree76635c73ab7b462c47b43a88cb42c7f5a0734f6f /gcc/tree-ssa-dom.c
parent2f021b673a02a6648a45215ca0472d8ba6cd393b (diff)
downloadgcc-c7f902196193ba3fe4540b580cbc613d53c05a13.zip
gcc-c7f902196193ba3fe4540b580cbc613d53c05a13.tar.gz
gcc-c7f902196193ba3fe4540b580cbc613d53c05a13.tar.bz2
Makefile.in (tree-ssa-dom.o): Depend on tree-ssa-propagate.h.
* Makefile.in (tree-ssa-dom.o): Depend on tree-ssa-propagate.h. * tree-ssa-dom.c (cprop_into_stmt): Recompute TREE_INVARIANT after propagating into an ADDR_EXPR. From-SVN: r87566
Diffstat (limited to 'gcc/tree-ssa-dom.c')
-rw-r--r--gcc/tree-ssa-dom.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c
index 50b5cc0..43809e1 100644
--- a/gcc/tree-ssa-dom.c
+++ b/gcc/tree-ssa-dom.c
@@ -40,6 +40,7 @@ Boston, MA 02111-1307, USA. */
#include "domwalk.h"
#include "real.h"
#include "tree-pass.h"
+#include "tree-ssa-propagate.h"
#include "langhooks.h"
/* This file implements optimizations on the dominator tree. */
@@ -2646,6 +2647,7 @@ cprop_into_stmt (tree stmt, varray_type const_and_copies)
bool may_have_exposed_new_symbols = false;
use_operand_p op_p;
ssa_op_iter iter;
+ tree rhs;
FOR_EACH_SSA_USE_OPERAND (op_p, stmt, iter, SSA_OP_ALL_USES)
{
@@ -2654,6 +2656,13 @@ cprop_into_stmt (tree stmt, varray_type const_and_copies)
|= cprop_operand (stmt, op_p, const_and_copies);
}
+ if (may_have_exposed_new_symbols)
+ {
+ rhs = get_rhs (stmt);
+ if (rhs && TREE_CODE (rhs) == ADDR_EXPR)
+ recompute_tree_invarant_for_addr_expr (rhs);
+ }
+
return may_have_exposed_new_symbols;
}