This is the mail archive of the 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]

Re: [PR51752] publication safety violations in loop invariant motion pass

On 02/28/12 11:05, Richard Henderson wrote:
On 02/27/12 08:22, Aldy Hernandez wrote:
transform by making transaction load/store stmts behave the same as
potentially trapping stmts (thus, only optimize if the memory is accessed
unconditional somewhere else).  That would work for PRE as well.
[easiest would be to make *_could_trap_p return true for memory ops
inside a transaction]

Provided the gimple bit works, this seems reasonable, though quite a big hammer. But given that we are nearing a release, I would be in favor of it.

Richard Henderson, what do you think?

Well, hooking could_trap_p sounds like an easy solution.

Gimple bits, on the other hand, are not.  Keeping those up-to-date is
always a real pain.  We have had several gimple bits in the history of
the TM code, and we've gotten rid of them all because they were too
invasive to maintain.

OTOH, I have no better suggestion...

Well, my solution wasn't pretty either.

However, Mr. Guenther's solution involves recalculating the bits when needed, so at least they won't be out of date.

Richards, what do y'all think of this approach? It is a big hammer as discussed, but keeps most of us happy for 4.7.

Tested on x86-64 Linux.


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]