Re: [patch] PR56572 flatten unnecessary nested transactions after inlining

2014-01-09 Thread Aldy Hernandez
On 01/06/14 13:40, Richard Henderson wrote: On 12/19/2013 11:06 AM, Richard Biener wrote: Aldy Hernandez wrote: I'd still like to catch the common cases, like I do with this patch. Perhaps we move this code to the .tmmark pass and handle the uninstrumented case. rth? tmmark is way way late

Re: [patch] PR56572 flatten unnecessary nested transactions after inlining

2014-01-06 Thread Aldy Hernandez
On 01/06/14 15:04, Aldy Hernandez wrote: On 01/06/14 13:40, Richard Henderson wrote: On 12/19/2013 11:06 AM, Richard Biener wrote: Aldy Hernandez wrote: I'd still like to catch the common cases, like I do with this patch. Perhaps we move this code to the .tmmark pass and handle the uninstrum

Re: [patch] PR56572 flatten unnecessary nested transactions after inlining

2014-01-06 Thread Aldy Hernandez
On 01/06/14 13:40, Richard Henderson wrote: On 12/19/2013 11:06 AM, Richard Biener wrote: Aldy Hernandez wrote: I'd still like to catch the common cases, like I do with this patch. Perhaps we move this code to the .tmmark pass and handle the uninstrumented case. rth? tmmark is way way late

Re: [patch] PR56572 flatten unnecessary nested transactions after inlining

2014-01-06 Thread Richard Henderson
On 12/19/2013 11:06 AM, Richard Biener wrote: > Aldy Hernandez wrote: >> I'd still like to catch the common cases, like I do with this patch. >> >> Perhaps we move this code to the .tmmark pass and handle the >> uninstrumented case. rth? tmmark is way way later than you'd want. I believe that

Re: [patch] PR56572 flatten unnecessary nested transactions after inlining

2013-12-19 Thread Richard Biener
Aldy Hernandez wrote: > >>> I'm still unsure whether the IPA inliner (not the early inliner) >will add >>> other nested transactions, so we may have to do everything in >.tmmark and >>> handle the dual code paths :(. Either way, this is a start. >> >> Sure it will. At least with cross-unit inlin

Re: [patch] PR56572 flatten unnecessary nested transactions after inlining

2013-12-19 Thread Aldy Hernandez
I'm still unsure whether the IPA inliner (not the early inliner) will add other nested transactions, so we may have to do everything in .tmmark and handle the dual code paths :(. Either way, this is a start. Sure it will. At least with cross-unit inlining with LTO. You can of course simply

Re: [patch] PR56572 flatten unnecessary nested transactions after inlining

2013-12-19 Thread Richard Biener
On Thu, Dec 19, 2013 at 5:04 PM, Aldy Hernandez wrote: > As discussed in the PR, we already remove nested transactions in the tmlower > stage, but inlining may add more nested transactions later. > > The problem with removing these nested transactions after proper IPA, is > that we'd either have t

[patch] PR56572 flatten unnecessary nested transactions after inlining

2013-12-19 Thread Aldy Hernandez
As discussed in the PR, we already remove nested transactions in the tmlower stage, but inlining may add more nested transactions later. The problem with removing these nested transactions after proper IPA, is that we'd either have to add another IPA pass later or remove the problematic transa