This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On 01/06/14 13:40, Richard Henderson wrote:
On 12/19/2013 11:06 AM, Richard Biener wrote:
Aldy Hernandez <aldyh@redhat.com> 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 ipa_tm is the right
place.  That's where we generate clones.  The clones know a-priori that they're
called within a transaction and thus all internal transations may be
eliminated.  And thus any inlining that would happen after ipa_tm would
properly inline the clone, and thus no more need be done.

But ipa_tm still runs before the latter inliner:

...
u.c.041i.tmipa
u.c.043i.whole-program
u.c.044i.profile_estimate
u.c.045i.devirt
u.c.046i.cp
u.c.048i.inline

So even though my proposed patch works in the supplied testcase (because the early inliner ran before .tmipa and inlined the nested transaction), if the latter inliner added a nested transaction we're in the same boat. I just saw this happen with LTO, as Richi pointed out.

What do you suggest?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]