Commit 6aad4455 by Aldy Hernandez Committed by Aldy Hernandez

re PR middle-end/56108 (Asm statement in transaction_relaxed crashes compiler.)

	PR middle-end/56108
	* trans-mem.c (execute_tm_mark): Do not expand transactions that
	are sure to go irrevocable.
testsuite/
	* gcc.dg/tm/memopt-1.c: Declare functions transaction_safe.

From-SVN: r196213
parent 304886c5
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
......
......@@ -2,8 +2,8 @@
/* { 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()
......
/* { dg-do compile } */
/* { dg-options "-fgnu-tm -O" } */
int
main()
{
__transaction_relaxed { __asm__(""); }
return 0;
}
......@@ -2859,8 +2859,23 @@ execute_tm_mark (void)
// 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)
{
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 ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment