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: [tree-ssa] More aliasing fixes


> On Wed, 2003-12-17 at 07:59, Diego Novillo wrote:
> 
> > With the current implementation we'd generate 14 vops, the new one would
> > generate 18 vops.  But we would have to experiment with real code.  I
> > can see definite advantages to the new scheme in pointer-heavy code.
> > 
> Wait.  There's a fatal flaw in this scheme that I didn't realize
> yesterday.  You will be relating variables that cannot possibly alias
> each other and block VN based optimizations and DCE.  Consider:
> 
> foo (int i)
> {
>    int a, b;
>    int *p;
> 
>    p = (i > 50) ? &a : &b;
>    a = 50;
>    b = 3;
>    if (a > 0)
>       *p = 5;
> }
> 
> The assignment to 'b' will block DOM from propagating 50 into (a > 0),
> because the assignment to b will create a new version of p's MT.

But DOM shall not invalidate A's value just because P's MT is writen
into.  A's tag is not.
But I think in your counting of VUSES and VDEFS you didn't considered
that for store operation to *p for instance, *p MT is in VDEFS, but a
and b MT is in both VDEFS and VUSES as it is not clear that it modifies
it.
Still have to find time to think it over.  Jeff also mentioned some SGI
paper about the issue, do you have pointer by any chance?

Honza
> 
> 
> Diego.


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