[patch] PR56572 flatten unnecessary nested transactions after inlining
Mon Jan 6 21:40:00 GMT 2014
On 12/19/2013 11:06 AM, Richard Biener wrote:
> Aldy Hernandez <email@example.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.
> Btw, don't you want an IPA pass that clones functions called from within
> transactions and optimize those accordingly?
That's what we have, modulo the "optimize those accordingly".
> Thus make the tm lowering a real IPA pass?
There are plenty of tm-related passes, one of which is "lower_tm". Like most
of the other "lower" passes, the high-level gimple that it processes can't be
used as input to build_cfg.
More information about the Gcc-patches