[Mlir-commits] [mlir] 0b158c6 - [mlir][ods] Fix unused uniqued attr constraint
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Sun Nov 14 15:24:14 PST 2021
Author: Mogball
Date: 2021-11-14T23:23:14Z
New Revision: 0b158c6c7df8c459d1c12121949fef9d68e59ed2
URL: https://github.com/llvm/llvm-project/commit/0b158c6c7df8c459d1c12121949fef9d68e59ed2
DIFF: https://github.com/llvm/llvm-project/commit/0b158c6c7df8c459d1c12121949fef9d68e59ed2.diff
LOG: [mlir][ods] Fix unused uniqued attr constraint
Derived attributes' constraints are no longer uniqued - derived
attributes' verifiers are not automatically generated.
Added:
Modified:
mlir/tools/mlir-tblgen/CodeGenHelpers.cpp
Removed:
################################################################################
diff --git a/mlir/tools/mlir-tblgen/CodeGenHelpers.cpp b/mlir/tools/mlir-tblgen/CodeGenHelpers.cpp
index d1bf32561aac9..13357327928ed 100644
--- a/mlir/tools/mlir-tblgen/CodeGenHelpers.cpp
+++ b/mlir/tools/mlir-tblgen/CodeGenHelpers.cpp
@@ -313,6 +313,7 @@ void StaticVerifierFunctionEmitter::collectOpConstraints(
/// Collect attribute constraints.
for (const NamedAttribute &namedAttr : op.getAttributes()) {
if (!namedAttr.attr.getPredicate().isNull() &&
+ !namedAttr.attr.isDerivedAttr() &&
canUniqueAttrConstraint(namedAttr.attr))
collectConstraint(attrConstraints, "attr", namedAttr.attr);
}
More information about the Mlir-commits
mailing list