[PATCH] D124439: [JumpThreading][NFC][CompileTime] Reuse existing LoopInfo instead of recomputation
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 27 05:38:02 PDT 2022
mkazantsev 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));
----------------
nikic wrote:
> You'd have to also register it with AnalysisUses and initialize a pass dependency. I'd suggest to leave the LegacyPM implementation alone.
You're right.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124439/new/
https://reviews.llvm.org/D124439
More information about the llvm-commits
mailing list