提交 fd523ce0 编写于 作者: C cfang

6837146: Should perform unswitch before maximally unroll in loop transformation

Summary: Move loop unswitch before maximally unroll
Reviewed-by: never
上级 c7125228
...@@ -1630,6 +1630,10 @@ bool IdealLoopTree::iteration_split_impl( PhaseIdealLoop *phase, Node_List &old_ ...@@ -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_ ...@@ -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;
}
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册