[llvm] 03a102e - [JumpThreading][NFC] Reuse existing DT instead of recomputation (newPM)
Evgeniy Brevnov via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 14 22:28:09 PDT 2022
Author: Evgeniy Brevnov
Date: 2022-09-15T12:27:57+07:00
New Revision: 03a102e3b2c8b03bd5308741ddbbde9e8e5ce067
URL: https://github.com/llvm/llvm-project/commit/03a102e3b2c8b03bd5308741ddbbde9e8e5ce067
DIFF: https://github.com/llvm/llvm-project/commit/03a102e3b2c8b03bd5308741ddbbde9e8e5ce067.diff
LOG: [JumpThreading][NFC] Reuse existing DT instead of recomputation (newPM)
This is the same change as
503d5771b6c5e3544a9fa3be6b8d085ffbbd4057 with the same intent but for new pass manager.
Added:
Modified:
llvm/lib/Transforms/Scalar/JumpThreading.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/JumpThreading.cpp b/llvm/lib/Transforms/Scalar/JumpThreading.cpp
index c1d4251b31af9..f9cd4cdf3d17c 100644
--- a/llvm/lib/Transforms/Scalar/JumpThreading.cpp
+++ b/llvm/lib/Transforms/Scalar/JumpThreading.cpp
@@ -347,7 +347,7 @@ PreservedAnalyses JumpThreadingPass::run(Function &F,
std::unique_ptr<BlockFrequencyInfo> BFI;
std::unique_ptr<BranchProbabilityInfo> BPI;
if (F.hasProfileData()) {
- LoopInfo LI{DominatorTree(F)};
+ LoopInfo LI{DT};
BPI.reset(new BranchProbabilityInfo(F, LI, &TLI));
BFI.reset(new BlockFrequencyInfo(F, *BPI, LI));
}
More information about the llvm-commits
mailing list