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: [PATCH] Fix IVOPTs problem


Hello,

> > > Fundamentally IVOPTS has taken an array/structure access and turned
> > > it into pointer arithmetic, and in this particular case there isn't
> > > enough information carried in the TARGET_MEM_REF to determine that
> > > the TARGET_MEM_REF can't access the rx_ring field within the
> > > epic_private structure.
> > 
> > the right solution is to ensure that there is enough information in the
> > TARGET_MEM_REF.  We do not really want to lose precision of alias
> > analysis results just because we are unable to represent them.
> > 
> > The solution I would like the best would be to have the set of virtual
> > operands of the original expression stored in TARGET_MEM_REF.  I am
> > working on this, but it will take some time.
> > 
> > Anyway, as a workaroud for the Richard's problem, I think using
> > TMR_ORIGINAL might be sufficient.  I.e. something like this might work
> > (completely untested):
> 
> This does not work.  I tried this once (by just using TMR_ORIGINAL always in
> get_tmr_operands, making TMR_TAG unused).

this of course would not work for pointers.  My proposed patch would
resort to this only in case of memory reference with subvars, in which
case it should work just fine.

As I said, I did not test my patch it at all because of the lack of
time, so there may be some problems with it; if you could send me
up-to-date version of your patch for subvars on ARRAY_REFs, I will look
at that now.

>  TMR_ORIGINAL is not in a form
> get_expr_operands likes as you call unshare_and_remove_ssa_names on it.  Also
> will it be properly updated if later passes mess with the trees?

Why would it need to be updated?  It just remains as it is set.

Zdenek


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