[PATCH] D124439: [JumpThreading][NFC][CompileTime] Reuse existing LoopInfo instead of recomputation
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 26 08:59:36 PDT 2022
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/JumpThreading.cpp:327
if (F.hasProfileData()) {
- LoopInfo LI{DominatorTree(F)};
- BPI.reset(new BranchProbabilityInfo(F, LI, TLI));
- BFI.reset(new BlockFrequencyInfo(F, *BPI, LI));
+ auto LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
+ BPI.reset(new BranchProbabilityInfo(F, *LI, TLI));
----------------
You'd have to also register it with AnalysisUses and initialize a pass dependency. I'd suggest to leave the LegacyPM implementation alone.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124439/new/
https://reviews.llvm.org/D124439
More information about the llvm-commits
mailing list