summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/tree-predcom.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/tree-predcom.c b/gcc/tree-predcom.c
index 2bde732f8ad8..8524e4379be3 100644
--- a/gcc/tree-predcom.c
+++ b/gcc/tree-predcom.c
@@ -3170,6 +3170,15 @@ tree_predictive_commoning_loop (struct loop *loop)
bool unroll = false, loop_closed_ssa = false;
edge exit;
+ unroll_factor = 4;
+ unroll = can_unroll_loop_p (loop, unroll_factor, &desc);
+ exit = single_dom_exit (loop);
+
+ if (unroll && noalias != 0)
+ {
+ tree_unroll_loop (loop, unroll_factor, exit, &desc);
+ }
+
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "Processing loop %d\n", loop->num);
@@ -3255,7 +3264,7 @@ tree_predictive_commoning_loop (struct loop *loop)
/* Execute the predictive commoning transformations, and possibly unroll the
loop. */
- if (unroll)
+ if (unroll && noalias == 0)
{
struct epcc_data dta;
@@ -3323,6 +3332,8 @@ tree_predictive_commoning (void)
ret = TODO_cleanup_cfg;
}
+ ret = TODO_cleanup_cfg;
+
return ret;
}