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]

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



Ok. I see.  So, I think what would be best is to have a way to check whether
a store/load is part of a transaction - do we have a way to do that right now?
(For example a flag on a gimple stmt?)  Then we can simply avoid the LIM

We do not (*). My patch accumulates that information on demand. I can certainly add a gimple bit for this, but can't the optimizations change/rewrite the stores/loads so we lose this information?


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?

Aldy

(*) Well technically we do, but much later in the tmmark pass, when we instrument the loads, but this is useless since all the tree optimizers have been run (loop IM, etc).


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