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".
--- Robert Kennedy <robert@xxxxxxxxxxxxx> wrote:
> > I believe the store "a = 2" is dead, and that the
> SGICC
> > Interprocedural Analyzer should be able to discern
> this.
>
> The store isn't dead. It's value is used by the
> "a++" statement after
> the "glarp" call.
>
> If glarp is inlined, the optimizer is able to see
> that "a++" is
> equivalent to a = 3 because there's nothing in
> between that might
> alter the variable a. That equivalence is what
> allows the initial "a =
> 2" to be deleted.
>
> If glarp isn't inlined, apparently the optimizer
> isn't getting enough
> information from IPA to be sure that a isn't
> modified by glarp. I
> haven't looked at what's happening exactly -- it
> could be a number of
> different things. But it's going to come down to the
> fact that when
> the inlining happens, the optimizer can see more
> detail than IPA will
> tell it when no inlining is allowed.
>
> -- Robert
>
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
|