[PATCH] D70602: [JumpThreading] NFC: Don't cache F.hasProfileData()
Kazu Hirata via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 22 08:54:12 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rGa1955566282b: [JumpThreading] NFC: Don't cache F.hasProfileData() (authored by kazu).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70602/new/
https://reviews.llvm.org/D70602
Files:
llvm/lib/Transforms/Scalar/JumpThreading.cpp
Index: llvm/lib/Transforms/Scalar/JumpThreading.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/JumpThreading.cpp
+++ llvm/lib/Transforms/Scalar/JumpThreading.cpp
@@ -306,14 +306,13 @@
DomTreeUpdater DTU(*DT, DomTreeUpdater::UpdateStrategy::Lazy);
std::unique_ptr<BlockFrequencyInfo> BFI;
std::unique_ptr<BranchProbabilityInfo> BPI;
- bool HasProfileData = F.hasProfileData();
- if (HasProfileData) {
+ if (F.hasProfileData()) {
LoopInfo LI{DominatorTree(F)};
BPI.reset(new BranchProbabilityInfo(F, LI, TLI));
BFI.reset(new BlockFrequencyInfo(F, *BPI, LI));
}
- bool Changed = Impl.runImpl(F, TLI, LVI, AA, &DTU, HasProfileData,
+ bool Changed = Impl.runImpl(F, TLI, LVI, AA, &DTU, F.hasProfileData(),
std::move(BFI), std::move(BPI));
if (PrintLVIAfterJumpThreading) {
dbgs() << "LVI for function '" << F.getName() << "':\n";
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70602.230663.patch
Type: text/x-patch
Size: 954 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191122/35ddfb22/attachment.bin>
More information about the llvm-commits
mailing list