[Mlir-commits] [mlir] 252386a - [mlir] Add enclosingOpOk parameter to properlyDominates

Matthias Springer llvmlistbot at llvm.org
Mon Oct 18 17:04:18 PDT 2021


Author: Matthias Springer
Date: 2021-10-19T08:59:56+09:00
New Revision: 252386ac81f944ab713dfd5158e67cd547fba53c

URL: https://github.com/llvm/llvm-project/commit/252386ac81f944ab713dfd5158e67cd547fba53c
DIFF: https://github.com/llvm/llvm-project/commit/252386ac81f944ab713dfd5158e67cd547fba53c.diff

LOG: [mlir] Add enclosingOpOk parameter to properlyDominates

Differential Revision: https://reviews.llvm.org/D111959

Added: 
    

Modified: 
    mlir/include/mlir/IR/Dominance.h

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/IR/Dominance.h b/mlir/include/mlir/IR/Dominance.h
index dcf45130ad1e..83b2b819a5ce 100644
--- a/mlir/include/mlir/IR/Dominance.h
+++ b/mlir/include/mlir/IR/Dominance.h
@@ -124,8 +124,12 @@ class DominanceInfo : public detail::DominanceInfoBase</*IsPostDom=*/false> {
   /// 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


        


More information about the Mlir-commits mailing list