This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[trans-mem] PR47606: Add a tm-safe marker for GIMPLE_ASM's
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: Richard Henderson <rth at redhat dot com>, Patrick MARLIER <patrick dot marlier at unine dot ch>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 23 Feb 2011 16:08:39 -0600
- Subject: [trans-mem] PR47606: Add a tm-safe marker for GIMPLE_ASM's
This is yet another problem with inline assembly in transactions.
The problem here is that when we diagnose the presence of inline
assembly in diagnose_tm(), inlining has not yet run. After many
transformations, we may end up inlining GIMPLE_ASM's into a transaction,
but we lost the context in which it appeared.
In this testcase we have a GIMPLE_ASM in a transaction_pure function, so
it should be allowed in a transaction when inlined, instead of ICEing
when seeing the statement later.
I bit the bullet and added a subcode bit to the GIMPLE_ASM tuple to keep
track that the ASM appeared in a TM pure function. Richard, I believe
you had a similar idea, by looking at the comment I removed below.
This patch fixes the testcase in the original PR, though I found yet
another GIMPLE_ASM bug when playing around with variants of the
testcase. I can attack that next, as it's the same ICE but a different
problem.
OK for branch?
Attachment:
curr
Description: Text document