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]

[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


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