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: [trans-mem] make alias oracle understand TM read/writes


On Mon, 31 Aug 2009, Richard Henderson wrote:

> On 08/31/2009 02:30 PM, Richard Guenther wrote:
> > I see that pass_tm_mark is run right before expansion - so you only
> > need it to have points-to information on RTL working.  Is there any
> > reason you lower TM so late?
> 
> The implementation of TM adds edges from each TM read/write function back to
> the start of the transaction, so as to model the transaction restart that the
> library may force.  However, modeling this is only required at the rtl level,
> since the only thing that is affected by this restart are hard registers.
> 
> At the gimple level a model in which the entire transaction occurs, or none of
> it occurs (i.e. transaction abort), is correct and is significantly easier for
> the optimizers to cope with.
> 
> > Note that if we ever get IPA PTA working
> > everything that re-computes points-to information after it will
> > likely scrap IPA points-to information.
> 
> Is it your contention, then, that we do not need to re-compute alias
> information at all, if we're merely making local substitutions? Frankly, I've
> lost track of how alias information actually works.

Well, you shouldn't need to do it for correctness anymore.  Unless
you take addresses of something that you didn't take addresses of before
_and_ those addresses escape.

> It would be like me to tell Aldy to add all the TM builtins to the oracle to
> make sure alias info still works and then find that absolutely nothing needed
> to happen at all...

I would say that the RTL passes have no idea how to deal with calls
and aliasing anyway - so just for the sake of updating points-to
information for RTL it's probably overkill.

So assuming that before lowering loads and stores look just regular
and for lowering you are now taking the address of the destination
for a store and the source for a load - but they don't escape through
the builtins, the you shouldn't need to do anything.  At least not
until the RTL passes can deal with function calls when they do
disambiguations (the builtins are not const or pure, are they?)

Richard.


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