[tree-ssa]: Constant propagation into PHI's screws up IVR and PRE

Daniel Berlin dberlin@dberlin.org
Wed Jul 30 19:24:00 GMT 2003


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 would think you ought to be able to tell that the edge from 2 is 
>>> the
>>> 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,
>> induction variables.
> I don't think so.  Do you have an example?

Somewhere.
>
> One of the values comes from a nesting level less than that of the 
> loop's
> phi-node, and this is the initial value of the IV.  The other value 
> comes
> from a nesting level greater or equal to the loops phi node, and this 
> is
> 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
>> it's useless.
>> 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.



More information about the Gcc mailing list