[llvm] [SimpleLoopUnswitch] Record loops from unswitching non-trivial conditions (PR #141121)
Antonio Frighetto via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 2 03:24:46 PDT 2025
================
@@ -88,7 +88,7 @@ static cl::opt<bool> EnableNonTrivialUnswitch(
"following the configuration passed into the pass."));
static cl::opt<int>
- UnswitchThreshold("unswitch-threshold", cl::init(50), cl::Hidden,
+ UnswitchThreshold("unswitch-threshold", cl::init(120), cl::Hidden,
----------------
antoniofrighetto wrote:
Thinking on this more, I'm not totally sure if we want to entirely prevent unswitched non-trivial conditions from being unswitched again (at least, this seems one of the reason why the cost estimator tool is there). Perhaps there are downstream clients which may need to perform arbitrarily non-trivial unswitches (?), in which case, we should only tune the cost. If this is not a concern, I think we could drop the extra cost and keep `llvm.loop.unswitch.nontrivial.disable` only.
https://github.com/llvm/llvm-project/pull/141121
More information about the llvm-commits
mailing list