aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-phiopt.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/tree-ssa-phiopt.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/tree-ssa-phiopt.c')
-rw-r--r--gcc/tree-ssa-phiopt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c
index 02d5aa0..344cd2f 100644
--- a/gcc/tree-ssa-phiopt.c
+++ b/gcc/tree-ssa-phiopt.c
@@ -1519,7 +1519,9 @@ nontrapping_dom_walker::before_dom_children (basic_block bb)
{
gimple *stmt = gsi_stmt (gsi);
- if (is_gimple_call (stmt) && !nonfreeing_call_p (stmt))
+ if ((gimple_code (stmt) == GIMPLE_ASM && gimple_vdef (stmt))
+ || (is_gimple_call (stmt)
+ && (!nonfreeing_call_p (stmt) || !nonbarrier_call_p (stmt))))
nt_call_phase++;
else if (gimple_assign_single_p (stmt) && !gimple_has_volatile_ops (stmt))
{