Skip to content

Commit

Permalink
Revert "[MLIR] Add IndexAttr to primitive attributes kinds in tablegen."
Browse files Browse the repository at this point in the history
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 llvm#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} : () -> ()
  • Loading branch information
d0k committed Apr 16, 2020
1 parent 69040d5 commit d9c7fc6
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 13 deletions.
10 changes: 0 additions & 10 deletions mlir/include/mlir/IR/OpBase.td
Original file line number Diff line number Diff line change
Expand Up @@ -845,16 +845,6 @@ def BoolAttr : Attr<CPred<"$_self.isa<BoolAttr>()">, "bool attribute"> {
let constBuilderCall = "$_builder.getBoolAttr($0)";
}

// Index attribute.
def IndexAttr :
TypedAttrBase<
Index, "IntegerAttr",
And<[CPred<"$_self.isa<IntegerAttr>()">,
CPred<"$_self.cast<IntegerAttr>().getType().isa<IndexType>()">]>,
"index attribute"> {
let returnType = [{ APInt }];
}

// Base class for any integer (regardless of signedness semantics) attributes
// of fixed width.
class AnyIntegerAttrBase<AnyI attrValType, string descr> :
Expand Down
2 changes: 0 additions & 2 deletions mlir/test/IR/attribute.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ func @int_attrs_pass() {
"test.int_attrs"() {
// CHECK: any_i32_attr = 5 : ui32
any_i32_attr = 5 : ui32,
// CHECK-SAME: index_attr = 8 : index
index_attr = 8 : index,
// CHECK-SAME: si32_attr = 7 : si32
si32_attr = 7 : si32,
// CHECK-SAME: ui32_attr = 6 : ui32
Expand Down
1 change: 0 additions & 1 deletion mlir/test/lib/Dialect/Test/TestOps.td
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ def I64EnumAttrOp : TEST_Op<"i64_enum_attr"> {
def IntAttrOp : TEST_Op<"int_attrs"> {
let arguments = (ins
AnyI32Attr:$any_i32_attr,
IndexAttr:$index_attr,
UI32Attr:$ui32_attr,
SI32Attr:$si32_attr
);
Expand Down

0 comments on commit d9c7fc6

Please sign in to comment.