Skip to content

Commit 9cf2531

Browse files
committed
Remove totalLoops < 10 heuristic and just unroll fixed loops when <= 100
1 parent a2f43a2 commit 9cf2531

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/loopUnrolling.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ let loop_unrolling_factor loopStatement func totalLoops =
345345
(* Unroll at least 10 times if there are only few (17?) loops *)
346346
let unroll_min = if totalLoops < 17 && AutoTune0.isActivated "forceLoopUnrollForFewLoops" then 10 else 0 in
347347
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)
348+
| Some i when i <= 100 -> Logs.debug "fixed loop size"; i
349349
| _ -> max unroll_min (targetInstructions / loopStats.instructions)
350350
else
351351
(* Don't unroll empty (= while(1){}) loops*)

0 commit comments

Comments
 (0)