pro64-support
[Top] [All Lists]

Re: unoptimized dead store

To: stuart@xxxxxxxxx
Subject: Re: unoptimized dead store
From: Robert Kennedy <robert@xxxxxxxxxxxxx>
Date: Wed, 9 May 2001 13:44:05 -0700
Cc: pro64-support@xxxxxxxxxxx
In-reply-to: <200105091937.MAA16065@scv3.apple.com> (stuart@apple.com)
References: <200105091937.MAA16065@scv3.apple.com>
Sender: owner-pro64-support@xxxxxxxxxxx
> 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


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