pro64-support
[Top] [All Lists]

Re: unoptimized dead store

To: Robert Kennedy <robert@xxxxxxxxxxxxx>, stuart@xxxxxxxxx
Subject: Re: unoptimized dead store
From: Shin-Ming Liu <shinmingliu@xxxxxxxxx>
Date: Wed, 9 May 2001 13:56:13 -0700 (PDT)
Cc: pro64-support@xxxxxxxxxxx
In-reply-to: <200105092044.NAA08170@mail-in.hq.tensilica.com>
Sender: owner-pro64-support@xxxxxxxxxxx
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/

<Prev in Thread] Current Thread [Next in Thread>