Re: [patch] PR middle-end/53850: memset builtin problem in TM

2012-09-24 Thread Aldy Hernandez
On 09/24/12 15:08, Richard Henderson wrote: On 09/24/2012 09:02 AM, Aldy Hernandez wrote: PR middle-end/53850 * trans-mem.c (expand_call_tm): Handle late built built-ins. Looks good. Typo in the changelog. r~ Actually, that was not a typo. Late built built-ins... as in b

Re: [patch] PR middle-end/53850: memset builtin problem in TM

2012-09-24 Thread Richard Henderson
On 09/24/2012 09:02 AM, Aldy Hernandez wrote: > PR middle-end/53850 > * trans-mem.c (expand_call_tm): Handle late built built-ins. Looks good. Typo in the changelog. r~

Re: [patch] PR middle-end/53850: memset builtin problem in TM

2012-09-24 Thread Aldy Hernandez
On 09/21/12 20:32, Richard Henderson wrote: On 09/21/2012 02:00 PM, Aldy Hernandez wrote: + /* ?? For TM_* builtin replacements, can we set this to FALSE?? +Otherwise, do we need to propagate the may_irr bit? */ + node->local.tm_may_enter_irr = true; Yes we can. I

Re: [patch] PR middle-end/53850: memset builtin problem in TM

2012-09-21 Thread Richard Henderson
On 09/21/2012 02:00 PM, Aldy Hernandez wrote: > + /* ?? For TM_* builtin replacements, can we set this to FALSE?? > + Otherwise, do we need to propagate the may_irr bit? */ > + node->local.tm_may_enter_irr = true; Yes we can. Indeed, I think we should have to insist on it.

[patch] PR middle-end/53850: memset builtin problem in TM

2012-09-21 Thread Aldy Hernandez
The problem here is that a simple loop gets transformed into a __builtin_memset by the loop distribution pass: + __transaction_atomic + { +for (i = 0; i < 100; ++i) + pp[i] = 0x33; + } Since this pass occurs after IPA-tm, the new call to __builtin_memset hasn't been analyzed so it