Skip to content

Commit d9c7fc6

Browse files
committed
Revert "[MLIR] Add IndexAttr to primitive attributes kinds in tablegen."
This reverts commit 997f33c. Breaks check-mlir ******************** TEST 'MLIR :: IR/attribute.mlir' FAILED ******************** Script: -- : 'RUN: at line 1'; mlir-opt llvm-project/mlir/test/IR/attribute.mlir -split-input-file -verify-diagnostics | /FileCheck llvm-project/mlir/test/IR/attribute.mlir -- Exit Code: 1 Command Output (stderr): -- llvm-project/mlir/test/IR/attribute.mlir split at line #1:19:3: error: unexpected error: 'test.int_attrs' op requires attribute 'index_attr' "test.int_attrs"() { ^ llvm-project/mlir/test/IR/attribute.mlir split at line llvm#120:6:3: error: unexpected error: 'test.int_attrs' op requires attribute 'index_attr' "test.int_attrs"() { ^ llvm-project/mlir/test/IR/attribute.mlir split at line llvm#120:5:6: error: expected error "'si32_attr' failed to satisfy constraint: 32-bit signed integer attribute" was not produced // expected-error @+1 {{'si32_attr' failed to satisfy constraint: 32-bit signed integer attribute}} ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ llvm-project/mlir/test/IR/attribute.mlir split at line llvm#133:5:3: error: unexpected error: 'test.int_attrs' op requires attribute 'index_attr' "test.int_attrs"() { ^ llvm-project/mlir/test/IR/attribute.mlir split at line llvm#133:4:6: error: expected error "'ui32_attr' failed to satisfy constraint: 32-bit unsigned integer attribute" was not produced // expected-error @+1 {{'ui32_attr' failed to satisfy constraint: 32-bit unsigned integer attribute}} ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ llvm-project/mlir/test/IR/attribute.mlir:9:12: error: CHECK: expected string not found in input // CHECK: any_i32_attr = 5 : ui32 ^ <stdin>:3:1: note: scanning from here module { ^ <stdin>:21:28: note: possible intended match here "test.non_negative_int_attr"() {i32attr = 5 : i32, i64attr = 10 : i64} : () -> ()
1 parent 69040d5 commit d9c7fc6

File tree

3 files changed

+0
-13
lines changed

3 files changed

+0
-13
lines changed

mlir/include/mlir/IR/OpBase.td

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -845,16 +845,6 @@ def BoolAttr : Attr<CPred<"$_self.isa<BoolAttr>()">, "bool attribute"> {
845845
let constBuilderCall = "$_builder.getBoolAttr($0)";
846846
}
847847

848-
// Index attribute.
849-
def IndexAttr :
850-
TypedAttrBase<
851-
Index, "IntegerAttr",
852-
And<[CPred<"$_self.isa<IntegerAttr>()">,
853-
CPred<"$_self.cast<IntegerAttr>().getType().isa<IndexType>()">]>,
854-
"index attribute"> {
855-
let returnType = [{ APInt }];
856-
}
857-
858848
// Base class for any integer (regardless of signedness semantics) attributes
859849
// of fixed width.
860850
class AnyIntegerAttrBase<AnyI attrValType, string descr> :

mlir/test/IR/attribute.mlir

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ func @int_attrs_pass() {
88
"test.int_attrs"() {
99
// CHECK: any_i32_attr = 5 : ui32
1010
any_i32_attr = 5 : ui32,
11-
// CHECK-SAME: index_attr = 8 : index
12-
index_attr = 8 : index,
1311
// CHECK-SAME: si32_attr = 7 : si32
1412
si32_attr = 7 : si32,
1513
// CHECK-SAME: ui32_attr = 6 : ui32

mlir/test/lib/Dialect/Test/TestOps.td

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,6 @@ def I64EnumAttrOp : TEST_Op<"i64_enum_attr"> {
199199
def IntAttrOp : TEST_Op<"int_attrs"> {
200200
let arguments = (ins
201201
AnyI32Attr:$any_i32_attr,
202-
IndexAttr:$index_attr,
203202
UI32Attr:$ui32_attr,
204203
SI32Attr:$si32_attr
205204
);

0 commit comments

Comments
 (0)