[patch] Fix regression (Re: Fix PR tree-optimization/41857)

Zdenek Dvorak rakdver@kam.mff.cuni.cz
Tue Nov 17 16:03:00 GMT 2009


Hi,

> > Tested on s390-ibm-linux and spu-elf with no regressions.
> > OK for mainline?
> 
> Ugh.  Well, good enough for now :(
> 
> I think TMR is broken as it basically treats the base pointer
> as "value" compared to everywhere else where pointers have
> semantics attached (like target type, ref-all status, etc.).

I think you paint TMRs too much evil.  It's whole point is to be
a lower-level representation of memory access, corresponding to
the addressing modes available on the target.  Thus, you should
expect to lose some information in the lowering.

I think part of the problem is that TMR and higher-level representation of
memory accesses are used at the same time, thus confusing the expectations.
It might be better to lower all memory references to TMRs at some point,
to make the separation clear.

Anyway,

> Thus, TMR misses 1) alignment,

I don't see how TMR misses alignment information any more than the original
memory access did.

> 2) TBAA info, 3) a working way to query points-to info,

This is IMHO because we store TBAA + points-to information in a wrong way
(associated with the pointers, rather than with the memory references; and in a
language-dependent form).

> 4) a way to recover a base pointer from TMR_ORIGINAL.

Why would you want to do that?

> For 4.6 I hope we can dump TMRs alltogether.

How do you plan to represent the choices ivopts mades (taking the addressing modes
into account)?  Without a gimple-level representation of addressing modes, the only
option I see is moving the induction variable optimizations to RTL, which would be
somewhat difficult,

Zdenek



More information about the Gcc-patches mailing list