summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2010-12-01 17:24:47 +0000
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2010-12-01 17:24:47 +0000
commit1f8cbcdd84e4841f88ec14ad45133dd221337a93 (patch)
tree8f94eaf8f0022130c067b9545675aeeefbf6234c
parent68f6634f48067e4003c7d0e19a98a8a40fe03941 (diff)
downloadgcc-1f8cbcdd84e4841f88ec14ad45133dd221337a93.tar.gz
Call recompute_tree_invariant_for_addr_expr when replacing a constant in an ADDR_EXPR.
2010-11-22 Sebastian Pop <sebastian.pop@amd.com> * sese.c (rename_uses): Call recompute_tree_invariant_for_addr_expr when replacing a constant in an ADDR_EXPR. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167346 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/ChangeLog.graphite5
-rw-r--r--gcc/sese.c13
3 files changed, 23 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8e76b893dc4..9cd9e1383ac 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2010-12-01 Sebastian Pop <sebastian.pop@amd.com>
+ * sese.c (rename_uses): Call recompute_tree_invariant_for_addr_expr
+ when replacing a constant in an ADDR_EXPR.
+
+2010-12-01 Sebastian Pop <sebastian.pop@amd.com>
+
* graphite-blocking.c (lst_do_strip_mine_loop): Extra parameter
for the stride.
(lst_do_strip_mine): Same.
diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite
index a205928e4a2..1746711392e 100644
--- a/gcc/ChangeLog.graphite
+++ b/gcc/ChangeLog.graphite
@@ -1,3 +1,8 @@
+2010-11-22 Sebastian Pop <sebastian.pop@amd.com>
+
+ * sese.c (rename_uses): Call recompute_tree_invariant_for_addr_expr
+ when replacing a constant in an ADDR_EXPR.
+
2010-10-20 Sebastian Pop <sebastian.pop@amd.com>
* graphite-blocking.c (lst_do_strip_mine_loop): Extra parameter
diff --git a/gcc/sese.c b/gcc/sese.c
index 078df67b795..f5e41f5b3be 100644
--- a/gcc/sese.c
+++ b/gcc/sese.c
@@ -546,6 +546,19 @@ rename_uses (gimple copy, htab_t rename_map, gimple_stmt_iterator *gsi_tgt,
true, NULL_TREE);
gsi_insert_seq_before (gsi_tgt, stmts, GSI_SAME_STMT);
replace_exp (use_p, new_expr);
+
+
+ if (TREE_CODE (new_expr) == INTEGER_CST)
+ {
+ tree lhs = gimple_assign_lhs (copy);
+ tree rhs = gimple_assign_rhs1 (copy);
+
+ if (TREE_CODE (lhs) == ADDR_EXPR)
+ recompute_tree_invariant_for_addr_expr (lhs);
+ if (TREE_CODE (rhs) == ADDR_EXPR)
+ recompute_tree_invariant_for_addr_expr (rhs);
+ }
+
set_rename (rename_map, old_name, new_expr);
}
}