We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a2f43a2 commit 9cf2531Copy full SHA for 9cf2531
src/util/loopUnrolling.ml
@@ -345,7 +345,7 @@ let loop_unrolling_factor loopStatement func totalLoops =
345
(* Unroll at least 10 times if there are only few (17?) loops *)
346
let unroll_min = if totalLoops < 17 && AutoTune0.isActivated "forceLoopUnrollForFewLoops" then 10 else 0 in
347
match fixedLoop with
348
- | Some i -> if i * loopStats.instructions < 100 || totalLoops < 10 then (Logs.debug "fixed loop size"; i) else max unroll_min (100 / loopStats.instructions)
+ | Some i when i <= 100 -> Logs.debug "fixed loop size"; i
349
| _ -> max unroll_min (targetInstructions / loopStats.instructions)
350
else
351
(* Don't unroll empty (= while(1){}) loops*)
0 commit comments