diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/trans-mem.c | 3 | ||||
-rw-r--r-- | gcc/tree-ssa-pre.c | 7 |
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c index 9a582af672d..531396191de 100644 --- a/gcc/trans-mem.c +++ b/gcc/trans-mem.c @@ -2486,6 +2486,9 @@ collect_bb2reg (struct tm_region *region, void *data) // Note that the optimizers were locally correct with their transformation, // as we have no info within the program that suggests that the blocks cannot // be shared. +// +// ??? There is currently a hack inside tree-ssa-pre.c to work around the +// only known instance of this block sharing. static VEC(tm_region_p, heap) * get_bb_regions_instrumented (void) diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c index 191de51b75d..b3edc670bf8 100644 --- a/gcc/tree-ssa-pre.c +++ b/gcc/tree-ssa-pre.c @@ -3805,6 +3805,13 @@ compute_avail (void) if (gimple_call_internal_p (stmt)) continue; + // We cannot value number the builtins that end transactions. + // ??? The alternative being unsharing BBs in the tm_init pass. + if (flag_tm + && (gimple_call_flags (stmt) & ECF_TM_BUILTIN) + && is_tm_ending_fndecl (gimple_call_fndecl (stmt))) + continue; + copy_reference_ops_from_call (stmt, &ops); vn_reference_lookup_pieces (gimple_vuse (stmt), 0, gimple_expr_type (stmt), |