summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2014-02-20 14:56:27 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2014-02-20 14:56:27 +0000
commite4f459908d568ba03af686badfbaab0385bc1b2c (patch)
treeaa3934efa281a2d3b58e4b7bfb04d00879d857f2
parent591f4417e7854428b7b08e1a9a41ca52d27f324d (diff)
downloadppe42-gcc-e4f459908d568ba03af686badfbaab0385bc1b2c.tar.gz
ppe42-gcc-e4f459908d568ba03af686badfbaab0385bc1b2c.zip
2014-02-20 Richard Biener <rguenther@suse.de>
* tree-cfg.c (replace_uses_by): Mark altered BBs before doing the substitution. (verify_gimple_assign_single): Also verify bare MEM_REFs on the lhs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207958 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/tree-cfg.c14
2 files changed, 15 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 805a5611f00..f4cb359b0ea 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2014-02-20 Richard Biener <rguenther@suse.de>
+
+ * tree-cfg.c (replace_uses_by): Mark altered BBs before
+ doing the substitution.
+ (verify_gimple_assign_single): Also verify bare MEM_REFs
+ on the lhs.
+
2014-02-20 Martin Jambor <mjambor@suse.cz>
PR ipa/55260
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 3f17e1424f7..325285c8dad 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -1677,6 +1677,11 @@ replace_uses_by (tree name, tree val)
FOR_EACH_IMM_USE_STMT (stmt, imm_iter, name)
{
+ /* Mark the block if we change the last stmt in it. */
+ if (cfgcleanup_altered_bbs
+ && stmt_ends_bb_p (stmt))
+ bitmap_set_bit (cfgcleanup_altered_bbs, gimple_bb (stmt)->index);
+
FOR_EACH_IMM_USE_ON_STMT (use, imm_iter)
{
replace_exp (use, val);
@@ -1701,11 +1706,6 @@ replace_uses_by (tree name, tree val)
gimple orig_stmt = stmt;
size_t i;
- /* Mark the block if we changed the last stmt in it. */
- if (cfgcleanup_altered_bbs
- && stmt_ends_bb_p (stmt))
- bitmap_set_bit (cfgcleanup_altered_bbs, gimple_bb (stmt)->index);
-
/* FIXME. It shouldn't be required to keep TREE_CONSTANT
on ADDR_EXPRs up-to-date on GIMPLE. Propagation will
only change sth from non-invariant to invariant, and only
@@ -3986,7 +3986,9 @@ verify_gimple_assign_single (gimple stmt)
return true;
}
- if (handled_component_p (lhs))
+ if (handled_component_p (lhs)
+ || TREE_CODE (lhs) == MEM_REF
+ || TREE_CODE (lhs) == TARGET_MEM_REF)
res |= verify_types_in_gimple_reference (lhs, true);
/* Special codes we cannot handle via their class. */
OpenPOWER on IntegriCloud