[DominanceInfo] Make the ctor take a defaulted value for the operand. NFC.
authorChris Lattner <clattner@nondot.org>
Mon, 14 Jun 2021 01:24:53 +0000 (18:24 -0700)
committerChris Lattner <clattner@nondot.org>
Mon, 14 Jun 2021 01:25:47 +0000 (18:25 -0700)
This allows it to be default constructible, which makes sense given it
ignores the operand.

mlir/include/mlir/IR/Dominance.h
mlir/lib/IR/Verifier.cpp

index 68513c2..dcf4513 100644 (file)
@@ -35,7 +35,7 @@ class DominanceInfoBase {
   using DomTree = llvm::DominatorTreeBase<Block, IsPostDom>;
 
 public:
-  DominanceInfoBase(Operation *op) {}
+  DominanceInfoBase(Operation *op = nullptr) {}
   DominanceInfoBase(DominanceInfoBase &&) = default;
   DominanceInfoBase &operator=(DominanceInfoBase &&) = default;
   ~DominanceInfoBase();
index ec1ee8b..30c6476 100644 (file)
@@ -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();