The other possibility is that since "a" is global, it could be modified
by a shared library. If you mark "a" as static, the statement should go
away. If not, it is back to your conjecture.
BTW, thx for pointing out the obvious.
Sun
> -----Original Message-----
> From: Robert Kennedy [mailto:robert@xxxxxxxxxxxxx]
> Sent: Wednesday, May 09, 2001 2:08 PM
> To: shinmingliu@xxxxxxxxx
> Cc: stuart@xxxxxxxxx; pro64-support@xxxxxxxxxxx
> Subject: Re: unoptimized dead store
>
>
> > If the mod/ref analysis in IPA concludes the variable
> > a is not modified in the function glarp, the optimizer
> > could still conclude the value of "a++" and dead
> > code eliminate the store "a = 2".
>
> Definitely true, but obviously that isn't happening in this
> example. Like I said, I haven't analyzed it so I have no information
> about why it isn't happening. The two main possibilities are that the
> info from IPA is too conservative, or that the optimizer's overly
> conservative vsym assignment is responsible (my first guess is that
> the glarp call has a chi for the return vsym, and "a" also aliases
> with the return vsym). If it is the latter possibility, it would take
> fairly major changes to fix it.
>
> -- Robert
>
>
|