From 9cf25318b8dc773933bc7c75acd29f1202d18df6 Mon Sep 17 00:00:00 2001 From: Karoliine Holter Date: Thu, 20 Jun 2024 19:28:17 +0300 Subject: [PATCH] Remove totalLoops < 10 heuristic and just unroll fixed loops when <= 100 --- src/util/loopUnrolling.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/loopUnrolling.ml b/src/util/loopUnrolling.ml index bb1e504914..53a6f089e2 100644 --- a/src/util/loopUnrolling.ml +++ b/src/util/loopUnrolling.ml @@ -345,7 +345,7 @@ let loop_unrolling_factor loopStatement func totalLoops = (* Unroll at least 10 times if there are only few (17?) loops *) let unroll_min = if totalLoops < 17 && AutoTune0.isActivated "forceLoopUnrollForFewLoops" then 10 else 0 in match fixedLoop with - | 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 | _ -> max unroll_min (targetInstructions / loopStats.instructions) else (* Don't unroll empty (= while(1){}) loops*)