This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [trans-mem] expand transactions inside cloned functions
- From: Richard Henderson <rth at redhat dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 13 May 2010 11:29:59 -0700
- Subject: Re: [trans-mem] expand transactions inside cloned functions
- References: <20100506191436.GA11158@redhat.com>
On 05/06/2010 12:14 PM, Aldy Hernandez wrote:
> * trans-mem.c (execute_tm_edges): Look for transactions inside
> cloned functions.
This is insufficient, unfortunately. I wondered why you were having to
special-case this for cloned functions until I realized we weren't really
handling nested transactions at all. E.g.
extern int foo(int) __attribute__((transaction_safe));
void bar(void)
{
__transaction {
if (foo(1))
__transaction {
if (foo(2))
__transaction {
if (foo(3))
__transaction {
if (foo(4))
foo(5);
else
__transaction_cancel;
}
else
__transaction_cancel;
}
else
__transaction_cancel;
}
else
__transaction_cancel;
}
}
crashes in exactly the same way.
r~