[mlir] Add enclosingOpOk parameter to properlyDominates
authorMatthias Springer <springerm@google.com>
Mon, 18 Oct 2021 23:59:32 +0000 (08:59 +0900)
committerMatthias Springer <springerm@google.com>
Mon, 18 Oct 2021 23:59:56 +0000 (08:59 +0900)
Differential Revision: https://reviews.llvm.org/D111959

mlir/include/mlir/IR/Dominance.h

index dcf4513..83b2b81 100644 (file)
@@ -124,8 +124,12 @@ public:
   /// an SSACFG region, Operation A dominates Operation B in the same block if A
   /// preceeds B. In a Graph region, all operations in a block dominate all
   /// other operations in the same block.
-  bool properlyDominates(Operation *a, Operation *b) const {
-    return properlyDominatesImpl(a, b, /*enclosingOpOk=*/true);
+  ///
+  /// The `enclosingOpOk` flag says whether we should return true if the B op
+  /// is enclosed by a region on A.
+  bool properlyDominates(Operation *a, Operation *b,
+                         bool enclosingOpOk = true) const {
+    return properlyDominatesImpl(a, b, enclosingOpOk);
   }
 
   /// Return true if operation A dominates operation B, i.e. if A and B are the