[Mlir-commits] [mlir] e86119b - [mlir] Minor fixes after removing types from attributes

Diego Caballero llvmlistbot at llvm.org
Mon Aug 15 12:08:34 PDT 2022


Author: Diego Caballero
Date: 2022-08-15T19:07:25Z
New Revision: e86119b4ff42426474828a558d9e5dedb09c4330

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

LOG: [mlir] Minor fixes after removing types from attributes

D130092 removed types from attributes. This patch fixes a minor
issues what was exposed when integrating that change in IREE. An
explicit cast is needed so that the template type of `makeArrayRef`
is automatically deduced.

Co-authored-by: Lei Zhang <antiagainst at google.com>

Reviewed By: Mogball

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

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 9e2b7ab062643..7a4606da93bbc 100644
--- a/mlir/include/mlir/IR/OpBase.td
+++ b/mlir/include/mlir/IR/OpBase.td
@@ -2288,7 +2288,11 @@ class ElementCount<string name> :
 class ElementType<string name> : StrFunc<"getElementTypeOrSelf($" # name # ")">;
 
 class AllMatchPred<list<string> values> :
-    CPred<"::llvm::is_splat({" # !interleave(values, ", ") # "})">;
+  CPred<!if(!lt(!size(values), 2),
+            "true",
+            !foldl("(" # !head(values) # ")", !tail(values), acc, v,
+                   acc # " == (" # v # ") && (" # v # ")")
+              # " == (" # !head(values) # ")")>;
 
 class AllMatch<list<string> values, string summary> :
     PredOpTrait<summary, AllMatchPred<values>>;


        


More information about the Mlir-commits mailing list