+2013-02-20 Aldy Hernandez <aldyh@redhat.com>
+
+ PR middle-end/56108
+ * trans-mem.c (execute_tm_mark): Do not expand transactions that
+ are sure to go irrevocable.
+
2013-02-21 Hans-Peter Nilsson <hp@axis.com>
* doc/rtl.texi (vec_concat, vec_duplicate): Mention that
+2013-02-20 Aldy Hernandez <aldyh@redhat.com>
+
+ PR middle-end/56108
+ * gcc.dg/tm/memopt-1.c: Declare functions transaction_safe.
+
2013-02-21 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/56310
/* { dg-options "-fgnu-tm -O -fdump-tree-tmmemopt" } */
long g, xxx, yyy;
-extern george() __attribute__((transaction_callable));
-extern ringo(long int);
+extern george() __attribute__((transaction_safe));
+extern ringo(long int) __attribute__((transaction_safe));
int i;
f()
// Expand memory operations into calls into the runtime.
// This collects log entries as well.
FOR_EACH_VEC_ELT (bb_regions, i, r)
- if (r != NULL)
- expand_block_tm (r, BASIC_BLOCK (i));
+ {
+ if (r != NULL)
+ {
+ if (r->transaction_stmt)
+ {
+ unsigned sub = gimple_transaction_subcode (r->transaction_stmt);
+
+ /* If we're sure to go irrevocable, there won't be
+ anything to expand, since the run-time will go
+ irrevocable right away. */
+ if (sub & GTMA_DOES_GO_IRREVOCABLE
+ && sub & GTMA_MAY_ENTER_IRREVOCABLE)
+ continue;
+ }
+ expand_block_tm (r, BASIC_BLOCK (i));
+ }
+ }
bb_regions.release ();