summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-dce.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-02-10 17:44:31 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-02-10 17:44:31 +0000
commitb65fbe250879003201cbaefe1abf54ac29c6ef51 (patch)
tree4dee112990f9f516b3426813bcdbf020af010066 /gcc/tree-ssa-dce.c
parentbb52d0cbcb75ed4f0c97804816eb03be804eaa72 (diff)
downloadgcc-b65fbe250879003201cbaefe1abf54ac29c6ef51.tar.gz
* tree-ssa-dce.c (propagate_necessity): Handle GIMPLE_TRANSACTION.
* tree-ssa-operands.c (parse_ssa_operands): Add virtual operands for GIMPLE_TRANSACTION. Tidy if's into a switch. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184107 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-dce.c')
-rw-r--r--gcc/tree-ssa-dce.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/tree-ssa-dce.c b/gcc/tree-ssa-dce.c
index ccdf14a1702..ace9ef9972d 100644
--- a/gcc/tree-ssa-dce.c
+++ b/gcc/tree-ssa-dce.c
@@ -965,6 +965,13 @@ propagate_necessity (struct edge_list *el)
mark_aliased_reaching_defs_necessary (stmt, op);
}
}
+ else if (gimple_code (stmt) == GIMPLE_TRANSACTION)
+ {
+ /* The beginning of a transaction is a memory barrier. */
+ /* ??? If we were really cool, we'd only be a barrier
+ for the memories touched within the transaction. */
+ mark_all_reaching_defs_necessary (stmt);
+ }
else
gcc_unreachable ();