This is the mail archive of the
mailing list for the GCC project.
Re: [tree-ssa]: Constant propagation into PHI's screws up IVR and PRE
On Wednesday, July 30, 2003, at 2:20 PM, Pop Sébastian wrote:
On Wed, Jul 30, 2003 at 12:47:41PM -0400, Daniel Berlin wrote:
I don't think so. Do you have an example?
I would think you ought to be able to tell that the edge from 2 is
initialization edge, and it doesn't matter what value is there.
You can't, without knowing the original variable before propagation.
Otherwise you risk calling things that *aren't* induction variables,
One of the values comes from a nesting level less than that of the
phi-node, and this is the initial value of the IV. The other value
from a nesting level greater or equal to the loops phi node, and this
the evolution part. The initial condition is the only argument that
could contain a constant (after CCP),
If you are positive about this, it's good enough for me.
I'll change the test I was using to account for it.
the other argument points to the
update assignment in the current loop nest.
Which we can't get, since DCE will remove the original set now that
In the i = 0 case, the set of i = 0 will be completely removed, so we
have *zero* way of telling what the original variable was.
The phi node does contain the initial condition for the variable i:
# i_1 = PHI <0(0), i_7(10)>;
initial condition ^^^^
The other pointer (i_7) is necessarily nested in the current loop.