From 4fa8677860436b7cf75c5d8bb80a0996c3a83327 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 13 Jun 2021 18:24:53 -0700 Subject: [PATCH] [DominanceInfo] Make the ctor take a defaulted value for the operand. NFC. This allows it to be default constructible, which makes sense given it ignores the operand. --- mlir/include/mlir/IR/Dominance.h | 2 +- mlir/lib/IR/Verifier.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mlir/include/mlir/IR/Dominance.h b/mlir/include/mlir/IR/Dominance.h index 68513c2..dcf4513 100644 --- a/mlir/include/mlir/IR/Dominance.h +++ b/mlir/include/mlir/IR/Dominance.h @@ -35,7 +35,7 @@ class DominanceInfoBase { using DomTree = llvm::DominatorTreeBase; public: - DominanceInfoBase(Operation *op) {} + DominanceInfoBase(Operation *op = nullptr) {} DominanceInfoBase(DominanceInfoBase &&) = default; DominanceInfoBase &operator=(DominanceInfoBase &&) = default; ~DominanceInfoBase(); diff --git a/mlir/lib/IR/Verifier.cpp b/mlir/lib/IR/Verifier.cpp index ec1ee8b..30c6476 100644 --- a/mlir/lib/IR/Verifier.cpp +++ b/mlir/lib/IR/Verifier.cpp @@ -83,7 +83,7 @@ LogicalResult OperationVerifier::verifyOpAndDominance(Operation &op) { // check for any nested regions. We do this as a second pass since malformed // CFG's can cause dominator analysis constructure to crash and we want the // verifier to be resilient to malformed code. - DominanceInfo theDomInfo(&op); + DominanceInfo theDomInfo; domInfo = &theDomInfo; if (failed(verifyDominanceOfContainedRegions(op))) return failure(); -- 2.7.4