This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] tree-ssa-ccp.c: Propagate even more ADDR_EXPRs.
On Tue, 2005-05-31 at 12:58 -0400, Kazu Hirata wrote:
> Would propagating invariant ADDR_EXPRs (regardless of the number of
> their immediate uses) help alias analysis and/or dependence analysis?
> (I'm no expert in these areas.)
Propagating an ADDR_EXPR definitely helps various analysis passes when
the argument to the ADDR_EXPR is a simple _DECL node.
It can also help when the ADDR_EXPR is of the form
&a->b->c[index]
Mostly because we then get the chance to analyze array references
within loops rather than working strictly with pointer arithmetic.
There may be a small benefit when propagating an ADDR_EXPR such
as &a->b, and less benefit as the number of components in the
ADDR_EXPR increases.
As you're probably starting to realize I don't think we have a
good handle on where the line ought to be for propagating vs not
propagating, particularly when we have multiple uses, or uses
within a loop nest.
Jeff