summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/Makefile.in3
-rw-r--r--gcc/tree-cfg.c8
3 files changed, 17 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7e821ab8695..a704cd05ed2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2005-05-24 Jeff Law <law@redhat.com>
+
+ * Makefile.in (tree-cfg.o): Depend on tree-ssa-propagate.h.
+ * tree-cfg.c: Include tree-ssa-propagate.h.
+ (replace_uses_by): Call recompute_tree_invarant_for_addr_expr as
+ needed.
+
2005-05-24 Nick Clifton <nickc@redhat.com>
* config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Define
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index c65b2537c12..28bfffd9e09 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -1748,7 +1748,8 @@ tree-cfg.o : tree-cfg.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) $(FLAGS_H) output.h \
$(DIAGNOSTIC_H) errors.h function.h $(TIMEVAR_H) $(TM_H) coretypes.h \
$(TREE_DUMP_H) except.h langhooks.h $(CFGLOOP_H) tree-pass.h \
- $(CFGLAYOUT_H) $(BASIC_BLOCK_H) hard-reg-set.h $(HASHTAB_H) toplev.h
+ $(CFGLAYOUT_H) $(BASIC_BLOCK_H) hard-reg-set.h $(HASHTAB_H) toplev.h \
+ tree-ssa-propagate.h
tree-tailcall.o : tree-tailcall.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(RTL_H) $(TREE_H) $(TM_P_H) function.h $(TM_H) coretypes.h \
$(TREE_DUMP_H) $(DIAGNOSTIC_H) except.h tree-pass.h $(FLAGS_H) langhooks.h \
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 9eeb7839287..0869edcadaa 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -45,6 +45,7 @@ Boston, MA 02111-1307, USA. */
#include "cfgloop.h"
#include "cfglayout.h"
#include "hashtab.h"
+#include "tree-ssa-propagate.h"
/* This file contains functions for building the Control Flow Graph (CFG)
for a function tree. */
@@ -1364,7 +1365,14 @@ replace_uses_by (tree name, tree val)
and we would never process them. */
for (i = 0; VEC_iterate (tree, stmts, i, stmt); i++)
{
+ tree rhs;
+
fold_stmt_inplace (stmt);
+
+ rhs = get_rhs (stmt);
+ if (TREE_CODE (rhs) == ADDR_EXPR)
+ recompute_tree_invarant_for_addr_expr (rhs);
+
update_stmt (stmt);
}