[PATCH] D89541: [IRCE] Do not transform is loop has small number of iterations
Serguei Katkov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 18 21:36:13 PDT 2020
skatkov added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp:120
+static cl::opt<unsigned> MinEstimatedIterations("irce-min-estimated-iters",
+ cl::Hidden, cl::init(3));
+
----------------
mkazantsev wrote:
> I think the name should hint that this is profile-based, e.g. "MinRuntimeLoopIterations" or so. We also might want to have another boolean flag to turn this check off, because some users of IRCE might not have a profile.
The value 0 switches off this check.
================
Comment at: llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp:244
+ llvm::Optional<llvm::function_ref<llvm::BlockFrequencyInfo &()> >;
+ GetBFIFunc GetBFI;
+
----------------
mkazantsev wrote:
> Why not `Optional<BlockFrequencyInfo>`?
I'd like to avoid generation of BFI result if I will not use it, So it is a lazy accessor to BFI.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89541/new/
https://reviews.llvm.org/D89541
More information about the llvm-commits
mailing list