[Mlir-commits] [mlir] c20875a - [MLIR][NFC] Adopt hasNItems() for SizedRegion predicate

Rahul Joshi llvmlistbot at llvm.org
Mon Jun 22 16:43:33 PDT 2020


Author: Rahul Joshi
Date: 2020-06-22T16:43:02-07:00
New Revision: c20875a48c3b6633b9187f81476519c6be217fa1

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

LOG: [MLIR][NFC] Adopt hasNItems() for SizedRegion predicate

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

Added: 
    

Modified: 
    mlir/include/mlir/IR/OpBase.td

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/IR/OpBase.td b/mlir/include/mlir/IR/OpBase.td
index 232a6ddcd9c6..ae0fde0e939b 100644
--- a/mlir/include/mlir/IR/OpBase.td
+++ b/mlir/include/mlir/IR/OpBase.td
@@ -1586,7 +1586,7 @@ def AnyRegion : Region<CPred<"true">, "any region">;
 
 // A region with the given number of blocks.
 class SizedRegion<int numBlocks> : Region<
-  CPred<"$_self.getBlocks().size() == " # numBlocks>,
+  CPred<"llvm::hasNItems($_self, " # numBlocks # ")">,
   "region with " # numBlocks # " blocks">;
 
 // A variadic region constraint. It expands to zero or more of the base region.


        


More information about the Mlir-commits mailing list