[PATCH] D144199: [InstCombine] create and use a pass options container
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 17 05:28:48 PST 2023
nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:4662
auto *LI = AM.getCachedResult<LoopAnalysis>(F);
+ if (!LI && Options.UseLoopInfo)
----------------
spatel wrote:
> 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.
I see, fine to do in a followup.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144199/new/
https://reviews.llvm.org/D144199
More information about the llvm-commits
mailing list