[llvm] df1f032 - [SimpleLoopUnswitch] Allow threshold to be specified zero or more times

Christopher Tetreault via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 4 09:36:28 PDT 2021


Author: Christopher Tetreault
Date: 2021-10-04T09:19:26-07:00
New Revision: df1f03280c4f4b28e6a8f8b7d8a89e62112162ab

URL: https://github.com/llvm/llvm-project/commit/df1f03280c4f4b28e6a8f8b7d8a89e62112162ab
DIFF: https://github.com/llvm/llvm-project/commit/df1f03280c4f4b28e6a8f8b7d8a89e62112162ab.diff

LOG: [SimpleLoopUnswitch] Allow threshold to be specified zero or more times

Differential Revision: https://reviews.llvm.org/D110594

Added: 
    

Modified: 
    llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp b/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
index eb068fae492a..c768f35eda5a 100644
--- a/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
+++ b/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
@@ -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(


        


More information about the llvm-commits mailing list