[PATCH] D144199: [InstCombine] create and use a pass options container
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 17 05:20:39 PST 2023
spatel added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:4662
auto *LI = AM.getCachedResult<LoopAnalysis>(F);
+ if (!LI && Options.UseLoopInfo)
----------------
nikic wrote:
> This should be initialized to nullptr. We should not use LoopInfo unless UseLoopInfo is set.
Make sure I am understanding correctly - if we do this:
LoopInfo *LI = nullptr;
if (Options.UseLoopInfo) {
LI = AM.getCachedResult<LoopAnalysis>(F);
if (!LI)
LI = &AM.getResult<LoopAnalysis>(F);
}
...then we must update PassBuilderPipelines in this patch too to avoid regressions.
I was intentionally trying to keep this part functionally the same as before to reduce risk, and then change it in a follow-up patch.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144199/new/
https://reviews.llvm.org/D144199
More information about the llvm-commits
mailing list