< prev index next >
src/hotspot/share/opto/loopTransform.cpp
Print this page
*** 829,838 ****
--- 829,847 ----
(future_unroll_cnt - 1) * (100 / LoopPercentProfileLimit) > cl->profile_trip_cnt() &&
1.2 * cl->node_count_before_unroll() < (double)_body.size()) {
return false;
}
+ // Protect against over-unrolling with SuperWordLoopUnrollAnalysis.
+ if (SuperWordLoopUnrollAnalysis &&
+ !cl->is_vectorized_loop() &&
+ future_unroll_cnt > LoopUnrollMin &&
+ cl->profile_trip_cnt() != COUNT_UNKNOWN &&
+ (uint)(2 * cl->unrolled_count()) > cl->trip_count()) {
+ return false;
+ }
+
Node *init_n = cl->init_trip();
Node *limit_n = cl->limit();
int stride_con = cl->stride_con();
if (limit_n == NULL) return false; // We will dereference it below.
< prev index next >