This is the mail archive of the gcc@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] |
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)
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |