From patchwork Mon Oct 31 19:44:21 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [trans-mem] Fix tm_pure not inlinable in tm_safe Date: Mon, 31 Oct 2011 09:44:21 -0000 From: Aldy Hernandez X-Patchwork-Id: 122929 Message-Id: <4EAEFA95.8040402@redhat.com> To: Patrick Marlier Cc: GCC Patches , Richard Henderson , Torvald Riegel > It does on my side: > > === g++ Summary === > # of expected passes 122 > > I have no other change over the source. Woah!!!! I hereby profess my love for Richard and Patrick. That didn't sound, right, but whatever... During the weekend they apparently fixed the rest of the bug I've been working on all morning. Yay!!! With this patch we have ironed out all the C++ regressions. Thanks and sorry for the duplicate work. Committing to branch. * ipa-inline.c (can_inline_edge_p): Do not inline TM safe calling TM pure functions. Index: ipa-inline.c =================================================================== --- ipa-inline.c (revision 180710) +++ ipa-inline.c (working copy) @@ -291,8 +291,7 @@ can_inline_edge_p (struct cgraph_edge *e && is_tm_safe (e->caller->decl)) { e->inline_failed = CIF_UNSPECIFIED; - gimple_call_set_cannot_inline (e->call_stmt, true); - return false; + inlinable = false; } /* Don't inline if the callee can throw non-call exceptions but the caller cannot.