OSDN Git Service

* Makefile.in (tree-cfg.o): Depend on tree-ssa-propagate.h.
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 24 May 2005 14:06:04 +0000 (14:06 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 24 May 2005 14:06:04 +0000 (14:06 +0000)
        * tree-cfg.c: Include tree-ssa-propagate.h.
        (replace_uses_by): Call recompute_tree_invarant_for_addr_expr as
        needed.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100103 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/Makefile.in
gcc/tree-cfg.c

index 7e821ab..a704cd0 100644 (file)
@@ -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
index c65b253..28bfffd 100644 (file)
@@ -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 \
index 9eeb783..0869edc 100644 (file)
@@ -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);
     }