6837146: Should perform unswitch before maximally unroll in loop transformation
Move loop unswitch before maximally unroll Reviewed-by: never
This commit is contained in:
parent
802f3552f9
commit
f981546f2d
@ -1630,6 +1630,10 @@ bool IdealLoopTree::iteration_split_impl( PhaseIdealLoop *phase, Node_List &old_
|
|||||||
// Before attempting fancy unrolling, RCE or alignment, see if we want
|
// Before attempting fancy unrolling, RCE or alignment, see if we want
|
||||||
// to completely unroll this loop or do loop unswitching.
|
// to completely unroll this loop or do loop unswitching.
|
||||||
if( cl->is_normal_loop() ) {
|
if( cl->is_normal_loop() ) {
|
||||||
|
if (should_unswitch) {
|
||||||
|
phase->do_unswitching(this, old_new);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
bool should_maximally_unroll = policy_maximally_unroll(phase);
|
bool should_maximally_unroll = policy_maximally_unroll(phase);
|
||||||
if( should_maximally_unroll ) {
|
if( should_maximally_unroll ) {
|
||||||
// Here we did some unrolling and peeling. Eventually we will
|
// Here we did some unrolling and peeling. Eventually we will
|
||||||
@ -1637,10 +1641,6 @@ bool IdealLoopTree::iteration_split_impl( PhaseIdealLoop *phase, Node_List &old_
|
|||||||
phase->do_maximally_unroll(this,old_new);
|
phase->do_maximally_unroll(this,old_new);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (should_unswitch) {
|
|
||||||
phase->do_unswitching(this, old_new);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user