[trans-mem] fix transaction_callable's with asm statements
Aldy Hernandez
aldyh@redhat.com
Tue Jan 11 20:15:00 GMT 2011
One day when I'm bored, I'm going to rewrite this IPA TM pass. It's an
ever present source of grief in my life. But alas, not today...
Today's pain begins here:
__attribute__((transaction_callable))
void func()
{
__asm__ ("");
}
We scan the function in diagnose_tm() and set the tm_may_enter_irr bit
in the cgraph node. However, in the TM IPA pass, we don't mark
irrevocable basic blocks (in ipa_tm_scan_irr_function()) unless the
function is already in the (irrevocable) worklist.
This patch adds functions marked with tm_may_enter_irr into the
worklist, so we can later pick them up and scan their basic blocks for
irrevocability, thus going irrevocable at the correct place.
There is also a gratuitous fix to instrumentation of constructors. We
currently ICE on aggregate types.
All this is actually background for an upcoming one liner which has
uncovered all sorts of pain throughout the TM engine.
OK for branch?
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: curr
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110111/6919df3e/attachment.ksh>
More information about the Gcc-patches
mailing list