[SimpleLoopUnswitch] Allow threshold to be specified zero or more times
authorChristopher Tetreault <ctetreau@quicinc.com>
Mon, 27 Sep 2021 21:23:49 +0000 (14:23 -0700)
committerChristopher Tetreault <ctetreau@quicinc.com>
Mon, 4 Oct 2021 16:19:26 +0000 (09:19 -0700)
Differential Revision: https://reviews.llvm.org/D110594

llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp

index eb068fa..c768f35 100644 (file)
@@ -81,6 +81,7 @@ static cl::opt<bool> EnableNonTrivialUnswitch(
 
 static cl::opt<int>
     UnswitchThreshold("unswitch-threshold", cl::init(50), cl::Hidden,
+                      cl::ZeroOrMore,
                       cl::desc("The cost threshold for unswitching a loop."));
 
 static cl::opt<bool> EnableUnswitchCostMultiplier(