* 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
+2004-09-15 Steven Bosscher <stevenb@suse.de>
+
+ * 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.
+
2004-09-15 Andrew Pinski <apinski@apple.com>
PR rtl-opt/17427
tree-ssa-dom.o : tree-ssa-dom.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) output.h diagnostic.h \
errors.h function.h $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \
- $(BASIC_BLOCK_H) domwalk.h real.h tree-pass.h $(FLAGS_H) langhooks.h
+ $(BASIC_BLOCK_H) domwalk.h real.h tree-pass.h $(FLAGS_H) langhooks.h \
+ tree-ssa-propagate.h
tree-ssa-threadupdate.o : tree-ssa-threadupdate.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) output.h \
diagnostic.h errors.h function.h $(TM_H) coretypes.h $(TREE_DUMP_H) \
#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. */
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)
{
|= 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;
}