This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] tree-ssa-sink.c: Don't restrict immediate uses that weconsider.


Hi Jeff and Daniel,

> >   ie, if we have an immediate use which points
> > to a phi argument, then well, the object in question better appear in
> > that phi argument, or else something horribly wrong has happened.
> 
> It does, just *not as the bare symbol*.
> 
> IE it's an invariant like &foo_3, instead of just plain foo_3.
> 
> Thus, the comparison he's removing (which in this case would be &foo_3
> == foo_3) will fail, and we will get a wrong answer about where we need
> to sink to.

Assuming foo_3 is an SSA_NAME, do we ever take an address of SSA_NAME?

AFAIK, every PHI argument is either a naked SSA_NAME or a tree node
that satisfies is_gimple_min_invariant, which accepts an ADDR_EXPR iff
its TREE_INVARIANT is set.

Jeff, yes, I am moving an "if" statement that should always be true.

Kazu Hirata


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]