aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple.c
diff options
context:
space:
mode:
authorBernd Schmidt <bernds@redhat.com>2015-11-27 10:05:36 +0000
committerBernd Schmidt <bernds@gcc.gnu.org>2015-11-27 10:05:36 +0000
commitc000cd7c93aa657aae1cdfd6ce9b950b78c79624 (patch)
tree1f99eda41a82e61f545b497246278ba9cd804341 /gcc/gimple.c
parent4d7b2a8a3b12beac09c5d8f8bcbf43a81296e462 (diff)
downloadgcc-c000cd7c93aa657aae1cdfd6ce9b950b78c79624.zip
gcc-c000cd7c93aa657aae1cdfd6ce9b950b78c79624.tar.gz
gcc-c000cd7c93aa657aae1cdfd6ce9b950b78c79624.tar.bz2
Be more careful about barriers when speculating conditional stores.
* gimple.h (nonbarrier_call_p): Declare. * gimple.c (nonbarrier_call_p): New function. * tree-ssa-phiopt.c (nontrapping_dom_walker::before_dom_children): Also increment call phase for ASMs with vdef and potential barrier calls. From-SVN: r231005
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r--gcc/gimple.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c
index 2764df8..bf552a7 100644
--- a/gcc/gimple.c
+++ b/gcc/gimple.c
@@ -2636,6 +2636,18 @@ nonfreeing_call_p (gimple *call)
return n->nonfreeing_fn;
}
+/* Return true when CALL is a call stmt that definitely need not
+ be considered to be a memory barrier. */
+bool
+nonbarrier_call_p (gimple *call)
+{
+ if (gimple_call_flags (call) & (ECF_PURE | ECF_CONST))
+ return true;
+ /* Should extend this to have a nonbarrier_fn flag, just as above in
+ the nonfreeing case. */
+ return false;
+}
+
/* Callback for walk_stmt_load_store_ops.
Return TRUE if OP will dereference the tree stored in DATA, FALSE