[llvm] 1ee1da1 - [NFC] Fix unused var warning
Jordan Rupprecht via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 21 09:28:04 PDT 2020
Author: Jordan Rupprecht
Date: 2020-07-21T09:26:01-07:00
New Revision: 1ee1da1ea5728c2fe07bbf18bb25728ac3512e92
URL: https://github.com/llvm/llvm-project/commit/1ee1da1ea5728c2fe07bbf18bb25728ac3512e92
DIFF: https://github.com/llvm/llvm-project/commit/1ee1da1ea5728c2fe07bbf18bb25728ac3512e92.diff
LOG: [NFC] Fix unused var warning
Added:
Modified:
llvm/lib/Transforms/Scalar/LoopFuse.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/LoopFuse.cpp b/llvm/lib/Transforms/Scalar/LoopFuse.cpp
index 10cd34a8afe7..da18812f67b1 100644
--- a/llvm/lib/Transforms/Scalar/LoopFuse.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopFuse.cpp
@@ -387,26 +387,25 @@ struct FusionCandidateCompare {
bool operator()(const FusionCandidate &LHS,
const FusionCandidate &RHS) const {
const DominatorTree *DT = LHS.DT;
- const PostDominatorTree *PDT = LHS.PDT;
BasicBlock *LHSEntryBlock = LHS.getEntryBlock();
BasicBlock *RHSEntryBlock = RHS.getEntryBlock();
// Do not save PDT to local variable as it is only used in asserts and thus
// will trigger an unused variable warning if building without asserts.
- assert(DT && PDT && "Expecting valid dominator tree");
+ assert(DT && LHS.PDT && "Expecting valid dominator tree");
// Do this compare first so if LHS == RHS, function returns false.
if (DT->dominates(RHSEntryBlock, LHSEntryBlock)) {
// RHS dominates LHS
// Verify LHS post-dominates RHS
- assert(PDT->dominates(LHSEntryBlock, RHSEntryBlock));
+ assert(LHS.PDT->dominates(LHSEntryBlock, RHSEntryBlock));
return false;
}
if (DT->dominates(LHSEntryBlock, RHSEntryBlock)) {
// Verify RHS Postdominates LHS
- assert(PDT->dominates(RHSEntryBlock, LHSEntryBlock));
+ assert(LHS.PDT->dominates(RHSEntryBlock, LHSEntryBlock));
return true;
}
More information about the llvm-commits
mailing list