PRE (sometimes) confuses ivopts/scev?
Ulrich Weigand
uweigand@de.ibm.com
Tue Jan 25 01:40:00 GMT 2005
Daniel Berlin wrote:
> > Unfortunately your patch doesn't change this because the variables
> > fail the
> >
> > if (firstinsideloop ^ secondinsideloop
> > && is_gimple_min_invariant (avail[outsideloopblock->index])
> > && !is_gimple_min_invariant (avail[insideloopblock->index]))
> >
> > test -- the outsideloop value is not invariant (because it varies
> > with the next outer loop).
>
> > Why is this test required in the first place?
>
> Because induction variables should be 2 argument phi nodes with the
> following property:
>
> 1. Edge incoming to loop doesn't change in the loop
Well, but "doesn't change in the loop" is quite something else
than is_gimple_min_invariant!
Maybe I'm missing something here, but how *could* the *incoming*
value change in the loop? Its definition is outside the loop ...
> If I remove it,
>
> Remove what?
The two is_gimple_min_invariant checks.
> If you remove the test and replace it with 1, it'll never PRE anything.
I did leave in the
if (firstinsideloop ^ secondinsideloop)
Bye,
Ulrich
--
Dr. Ulrich Weigand
Linux on zSeries Development
Ulrich.Weigand@de.ibm.com
More information about the Gcc
mailing list