diff options
author | Jeff Law <law@redhat.com> | 2013-11-12 16:09:09 -0700 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2013-11-12 16:09:09 -0700 |
commit | 115d1851826d533e0676c991ca4e4216ff32782e (patch) | |
tree | 4e1d17e7b892481344d86fd6de1da8db9cbc861a /gcc/gimple-ssa-isolate-paths.c | |
parent | 6e022c863a03fed1c9bc811bd16fba639db40f3e (diff) | |
download | gcc-115d1851826d533e0676c991ca4e4216ff32782e.zip gcc-115d1851826d533e0676c991ca4e4216ff32782e.tar.gz gcc-115d1851826d533e0676c991ca4e4216ff32782e.tar.bz2 |
gimple-ssa-isolate-paths.c (check_loadstore): Mark discovered memory references as volatile.
* gimple-ssa-isolate-paths.c (check_loadstore): Mark discovered
memory references as volatile.
(insert_trap_and_remove_trailing_statements): Fix comment.
* gcc.dg/tree-ssa/isolate-1.c: Update expected output.
* gcc.dg/tree-ssa/isolate-5.c: Verify the load survives through
the SSA optimizers.
From-SVN: r204722
Diffstat (limited to 'gcc/gimple-ssa-isolate-paths.c')
-rw-r--r-- | gcc/gimple-ssa-isolate-paths.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/gimple-ssa-isolate-paths.c b/gcc/gimple-ssa-isolate-paths.c index 48ab604..2d8f176 100644 --- a/gcc/gimple-ssa-isolate-paths.c +++ b/gcc/gimple-ssa-isolate-paths.c @@ -51,7 +51,12 @@ check_loadstore (gimple stmt ATTRIBUTE_UNUSED, tree op, void *data) { if ((TREE_CODE (op) == MEM_REF || TREE_CODE (op) == TARGET_MEM_REF) && operand_equal_p (TREE_OPERAND (op, 0), (tree)data, 0)) - return true; + { + TREE_THIS_VOLATILE (op) = 1; + TREE_SIDE_EFFECTS (op) = 1; + update_stmt (stmt); + return true; + } return false; } @@ -64,7 +69,7 @@ insert_trap_and_remove_trailing_statements (gimple_stmt_iterator *si_p, tree op) code that wishes to catch the signal can do so. If the dereference is a load, then there's nothing to do as the - LHS will be a throw-away SSA_NAME and the LHS is the NULL dereference. + LHS will be a throw-away SSA_NAME and the RHS is the NULL dereference. If the dereference is a store and we can easily transform the RHS, then simplify the RHS to enable more DCE. */ |