From 03a102e3b2c8b03bd5308741ddbbde9e8e5ce067 Mon Sep 17 00:00:00 2001 From: Evgeniy Brevnov Date: Thu, 15 Sep 2022 12:24:56 +0700 Subject: [PATCH] [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. --- llvm/lib/Transforms/Scalar/JumpThreading.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Transforms/Scalar/JumpThreading.cpp b/llvm/lib/Transforms/Scalar/JumpThreading.cpp index c1d4251..f9cd4cd 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 BFI; std::unique_ptr 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)); } -- 2.7.4