Skip to content

Commit 9879261

Browse files
committed
[mlir] Update tests to use kEmitAccessorPrefix_Prefixed
These aren't user facing, so just flip them directly to prefixed.
1 parent 019e207 commit 9879261

File tree

5 files changed

+75
-90
lines changed

5 files changed

+75
-90
lines changed

mlir/test/mlir-tblgen/interfaces-as-constraints.td

+2-5
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ include "mlir/IR/OpBase.td"
44

55
def Test_Dialect : Dialect {
66
let name = "test";
7-
8-
// TODO: Flip to _Prefixed
9-
let emitAccessorPrefix = kEmitAccessorPrefix_Raw;
107
}
118

129
def TopLevelTypeInterface : TypeInterface<"TopLevelTypeInterface">;
@@ -46,5 +43,5 @@ def OpUsingAllOfThose : Op<Test_Dialect, "OpUsingAllOfThose"> {
4643
// CHECK-NEXT: return op->emitOpError("attribute '") << attrName
4744
// CHECK-NEXT: << "' failed to satisfy constraint: AttrInterfaceInNamespace instance";
4845

49-
// CHECK: TopLevelAttrInterface OpUsingAllOfThose::attr1()
50-
// CHECK: test::AttrInterfaceInNamespace OpUsingAllOfThose::attr2()
46+
// CHECK: TopLevelAttrInterface OpUsingAllOfThose::getAttr1()
47+
// CHECK: test::AttrInterfaceInNamespace OpUsingAllOfThose::getAttr2()

mlir/test/mlir-tblgen/op-attribute.td

+62-65
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ include "mlir/IR/OpBase.td"
99
def Test_Dialect : Dialect {
1010
let name = "test";
1111
let cppNamespace = "foobar";
12-
13-
// TODO: Flip to _Prefixed
14-
let emitAccessorPrefix = kEmitAccessorPrefix_Raw;
1512
}
1613
class NS_Op<string mnemonic, list<Trait> traits> :
1714
Op<Test_Dialect, mnemonic, traits>;
@@ -49,19 +46,19 @@ def AOp : NS_Op<"a_op", []> {
4946
// DECL-SAME: {::llvm::StringRef("aAttr"), ::llvm::StringRef("bAttr"), ::llvm::StringRef("cAttr"), ::llvm::StringRef("dAttr")};
5047
// DECL-NEXT: return ::llvm::makeArrayRef(attrNames);
5148

52-
// DECL: ::mlir::StringAttr aAttrAttrName()
49+
// DECL: ::mlir::StringAttr getAAttrAttrName()
5350
// DECL-NEXT: return getAttributeNameForIndex(0);
54-
// DECL: ::mlir::StringAttr aAttrAttrName(::mlir::OperationName name)
51+
// DECL: ::mlir::StringAttr getAAttrAttrName(::mlir::OperationName name)
5552
// DECL-NEXT: return getAttributeNameForIndex(name, 0);
5653

57-
// DECL: ::mlir::StringAttr bAttrAttrName()
54+
// DECL: ::mlir::StringAttr getBAttrAttrName()
5855
// DECL-NEXT: return getAttributeNameForIndex(1);
59-
// DECL: ::mlir::StringAttr bAttrAttrName(::mlir::OperationName name)
56+
// DECL: ::mlir::StringAttr getBAttrAttrName(::mlir::OperationName name)
6057
// DECL-NEXT: return getAttributeNameForIndex(name, 1);
6158

62-
// DECL: ::mlir::StringAttr cAttrAttrName()
59+
// DECL: ::mlir::StringAttr getCAttrAttrName()
6360
// DECL-NEXT: return getAttributeNameForIndex(2);
64-
// DECL: ::mlir::StringAttr cAttrAttrName(::mlir::OperationName name)
61+
// DECL: ::mlir::StringAttr getCAttrAttrName(::mlir::OperationName name)
6562
// DECL-NEXT: return getAttributeNameForIndex(name, 2);
6663

6764
// DEF-LABEL: AOp definitions
@@ -74,7 +71,7 @@ def AOp : NS_Op<"a_op", []> {
7471
// DEF-NEXT: while (true) {
7572
// DEF-NEXT: if (namedAttrIt == namedAttrRange.end())
7673
// DEF-NEXT: return emitError(loc, "'test.a_op' op ""requires attribute 'aAttr'");
77-
// DEF-NEXT: if (namedAttrIt->getName() == AOp::aAttrAttrName(*odsOpName)) {
74+
// DEF-NEXT: if (namedAttrIt->getName() == AOp::getAAttrAttrName(*odsOpName)) {
7875
// DEF-NEXT: tblgen_aAttr = namedAttrIt->getValue();
7976
// DEF-NEXT: break;
8077
// DEF: ::mlir::Attribute tblgen_bAttr;
@@ -83,9 +80,9 @@ def AOp : NS_Op<"a_op", []> {
8380
// DEF-NEXT: while (true) {
8481
// DEF-NEXT: if (namedAttrIt == namedAttrRange.end())
8582
// DEF-NEXT: break;
86-
// DEF: if (namedAttrIt->getName() == AOp::bAttrAttrName(*odsOpName))
83+
// DEF: if (namedAttrIt->getName() == AOp::getBAttrAttrName(*odsOpName))
8784
// DEF-NEXT: tblgen_bAttr = namedAttrIt->getValue();
88-
// DEF: if (namedAttrIt->getName() == AOp::cAttrAttrName(*odsOpName))
85+
// DEF: if (namedAttrIt->getName() == AOp::getCAttrAttrName(*odsOpName))
8986
// DEF-NEXT: tblgen_cAttr = namedAttrIt->getValue();
9087
// DEF: if (tblgen_aAttr && !((some-condition)))
9188
// DEF-NEXT: return emitError(loc, "'test.a_op' op ""attribute 'aAttr' failed to satisfy constraint: some attribute kind");
@@ -99,68 +96,68 @@ def AOp : NS_Op<"a_op", []> {
9996
// Test getter methods
10097
// ---
10198

102-
// DEF: some-attr-kind AOp::aAttrAttr()
103-
// DEF-NEXT: ::mlir::impl::getAttrFromSortedRange((*this)->getAttrs().begin() + 0, (*this)->getAttrs().end() - 0, aAttrAttrName()).cast<some-attr-kind>()
104-
// DEF: some-return-type AOp::aAttr() {
105-
// DEF-NEXT: auto attr = aAttrAttr()
99+
// DEF: some-attr-kind AOp::getAAttrAttr()
100+
// DEF-NEXT: ::mlir::impl::getAttrFromSortedRange((*this)->getAttrs().begin() + 0, (*this)->getAttrs().end() - 0, getAAttrAttrName()).cast<some-attr-kind>()
101+
// DEF: some-return-type AOp::getAAttr() {
102+
// DEF-NEXT: auto attr = getAAttrAttr()
106103
// DEF-NEXT: return attr.some-convert-from-storage();
107104

108-
// DEF: some-attr-kind AOp::bAttrAttr()
109-
// DEF-NEXT: ::mlir::impl::getAttrFromSortedRange((*this)->getAttrs().begin() + 1, (*this)->getAttrs().end() - 0, bAttrAttrName()).dyn_cast_or_null<some-attr-kind>()
110-
// DEF: some-return-type AOp::bAttr() {
111-
// DEF-NEXT: auto attr = bAttrAttr();
105+
// DEF: some-attr-kind AOp::getBAttrAttr()
106+
// DEF-NEXT: ::mlir::impl::getAttrFromSortedRange((*this)->getAttrs().begin() + 1, (*this)->getAttrs().end() - 0, getBAttrAttrName()).dyn_cast_or_null<some-attr-kind>()
107+
// DEF: some-return-type AOp::getBAttr() {
108+
// DEF-NEXT: auto attr = getBAttrAttr();
112109
// DEF-NEXT: return attr.some-convert-from-storage();
113110

114-
// DEF: some-attr-kind AOp::cAttrAttr()
115-
// DEF-NEXT: ::mlir::impl::getAttrFromSortedRange((*this)->getAttrs().begin() + 1, (*this)->getAttrs().end() - 0, cAttrAttrName()).dyn_cast_or_null<some-attr-kind>()
116-
// DEF: ::llvm::Optional<some-return-type> AOp::cAttr() {
117-
// DEF-NEXT: auto attr = cAttrAttr()
111+
// DEF: some-attr-kind AOp::getCAttrAttr()
112+
// DEF-NEXT: ::mlir::impl::getAttrFromSortedRange((*this)->getAttrs().begin() + 1, (*this)->getAttrs().end() - 0, getCAttrAttrName()).dyn_cast_or_null<some-attr-kind>()
113+
// DEF: ::llvm::Optional<some-return-type> AOp::getCAttr() {
114+
// DEF-NEXT: auto attr = getCAttrAttr()
118115
// DEF-NEXT: return attr ? ::llvm::Optional<some-return-type>(attr.some-convert-from-storage()) : (::llvm::None);
119116

120-
// DEF: some-attr-kind AOp::dAttrAttr()
121-
// DEF-NEXT: ::mlir::impl::getAttrFromSortedRange((*this)->getAttrs().begin() + 1, (*this)->getAttrs().end() - 0, dAttrAttrName()).dyn_cast_or_null<some-attr-kind>()
122-
// DEF: some-return-type AOp::dAttr() {
123-
// DEF-NEXT: auto attr = dAttrAttr();
117+
// DEF: some-attr-kind AOp::getDAttrAttr()
118+
// DEF-NEXT: ::mlir::impl::getAttrFromSortedRange((*this)->getAttrs().begin() + 1, (*this)->getAttrs().end() - 0, getDAttrAttrName()).dyn_cast_or_null<some-attr-kind>()
119+
// DEF: some-return-type AOp::getDAttr() {
120+
// DEF-NEXT: auto attr = getDAttrAttr();
124121
// DEF-NEXT: if (!attr)
125122
// DEF-NEXT: return some-const-builder-call(::mlir::Builder((*this)->getContext()), 4.2).some-convert-from-storage();
126123
// DEF-NEXT: return attr.some-convert-from-storage();
127124

128125
// Test setter methods
129126
// ---
130127

131-
// DEF: void AOp::aAttrAttr(some-attr-kind attr) {
132-
// DEF-NEXT: (*this)->setAttr(aAttrAttrName(), attr);
133-
// DEF: void AOp::bAttrAttr(some-attr-kind attr) {
134-
// DEF-NEXT: (*this)->setAttr(bAttrAttrName(), attr);
135-
// DEF: void AOp::cAttrAttr(some-attr-kind attr) {
136-
// DEF-NEXT: (*this)->setAttr(cAttrAttrName(), attr);
128+
// DEF: void AOp::setAAttrAttr(some-attr-kind attr) {
129+
// DEF-NEXT: (*this)->setAttr(getAAttrAttrName(), attr);
130+
// DEF: void AOp::setBAttrAttr(some-attr-kind attr) {
131+
// DEF-NEXT: (*this)->setAttr(getBAttrAttrName(), attr);
132+
// DEF: void AOp::setCAttrAttr(some-attr-kind attr) {
133+
// DEF-NEXT: (*this)->setAttr(getCAttrAttrName(), attr);
137134

138135
// Test remove methods
139136
// ---
140137

141138
// DEF: ::mlir::Attribute AOp::removeCAttrAttr() {
142-
// DEF-NEXT: return (*this)->removeAttr(cAttrAttrName());
139+
// DEF-NEXT: return (*this)->removeAttr(getCAttrAttrName());
143140

144141
// Test build methods
145142
// ---
146143

147144
// DEF: void AOp::build(
148-
// DEF: odsState.addAttribute(aAttrAttrName(odsState.name), aAttr);
149-
// DEF: odsState.addAttribute(bAttrAttrName(odsState.name), bAttr);
145+
// DEF: odsState.addAttribute(getAAttrAttrName(odsState.name), aAttr);
146+
// DEF: odsState.addAttribute(getBAttrAttrName(odsState.name), bAttr);
150147
// DEF: if (cAttr) {
151-
// DEF-NEXT: odsState.addAttribute(cAttrAttrName(odsState.name), cAttr);
148+
// DEF-NEXT: odsState.addAttribute(getCAttrAttrName(odsState.name), cAttr);
152149

153-
// DEF: odsState.addAttribute(aAttrAttrName(odsState.name), some-const-builder-call(odsBuilder, aAttr));
154-
// DEF-NEXT: odsState.addAttribute(bAttrAttrName(odsState.name), some-const-builder-call(odsBuilder, bAttr));
150+
// DEF: odsState.addAttribute(getAAttrAttrName(odsState.name), some-const-builder-call(odsBuilder, aAttr));
151+
// DEF-NEXT: odsState.addAttribute(getBAttrAttrName(odsState.name), some-const-builder-call(odsBuilder, bAttr));
155152
// DEF-NEXT: if (cAttr) {
156-
// DEF-NEXT: odsState.addAttribute(cAttrAttrName(odsState.name), cAttr);
153+
// DEF-NEXT: odsState.addAttribute(getCAttrAttrName(odsState.name), cAttr);
157154
// DEF-NEXT: }
158155
// DEF-NOT: if (dAttr)
159-
// DEF: odsState.addAttribute(dAttrAttrName(odsState.name), some-const-builder-call(odsBuilder, dAttr));
156+
// DEF: odsState.addAttribute(getDAttrAttrName(odsState.name), some-const-builder-call(odsBuilder, dAttr));
160157

161158
// DEF: void AOp::build(
162159
// DEF: some-return-type aAttr, some-return-type bAttr, /*optional*/some-attr-kind cAttr
163-
// DEF: odsState.addAttribute(aAttrAttrName(odsState.name), some-const-builder-call(odsBuilder, aAttr));
160+
// DEF: odsState.addAttribute(getAAttrAttrName(odsState.name), some-const-builder-call(odsBuilder, aAttr));
164161

165162
// DEF: void AOp::build(
166163
// DEF: ::llvm::ArrayRef<::mlir::NamedAttribute> attributes
@@ -321,19 +318,19 @@ def BOp : NS_Op<"b_op", []> {
321318
// Test common attribute kind getters' return types
322319
// ---
323320

324-
// DEF: ::mlir::Attribute BOp::any_attr()
325-
// DEF: bool BOp::bool_attr()
326-
// DEF: uint32_t BOp::i32_attr()
327-
// DEF: uint64_t BOp::i64_attr()
328-
// DEF: ::llvm::APFloat BOp::f32_attr()
329-
// DEF: ::llvm::APFloat BOp::f64_attr()
330-
// DEF: ::llvm::StringRef BOp::str_attr()
331-
// DEF: ::mlir::ElementsAttr BOp::elements_attr()
332-
// DEF: ::llvm::StringRef BOp::function_attr()
333-
// DEF: SomeType BOp::some_type_attr()
334-
// DEF: ::mlir::ArrayAttr BOp::array_attr()
335-
// DEF: ::mlir::ArrayAttr BOp::some_attr_array()
336-
// DEF: ::mlir::Type BOp::type_attr()
321+
// DEF: ::mlir::Attribute BOp::getAnyAttr()
322+
// DEF: bool BOp::getBoolAttr()
323+
// DEF: uint32_t BOp::getI32Attr()
324+
// DEF: uint64_t BOp::getI64Attr()
325+
// DEF: ::llvm::APFloat BOp::getF32Attr()
326+
// DEF: ::llvm::APFloat BOp::getF64Attr()
327+
// DEF: ::llvm::StringRef BOp::getStrAttr()
328+
// DEF: ::mlir::ElementsAttr BOp::getElementsAttr()
329+
// DEF: ::llvm::StringRef BOp::getFunctionAttr()
330+
// DEF: SomeType BOp::getSomeTypeAttr()
331+
// DEF: ::mlir::ArrayAttr BOp::getArrayAttr()
332+
// DEF: ::mlir::ArrayAttr BOp::getSomeAttrArray()
333+
// DEF: ::mlir::Type BOp::getTypeAttr()
337334

338335
// Test building constant values for array attribute kinds
339336
// ---
@@ -384,8 +381,8 @@ def DOp : NS_Op<"d_op", []> {
384381
// DECL: static void build({{.*}}, uint32_t i32_attr, ::llvm::APFloat f64_attr, ::llvm::StringRef str_attr, bool bool_attr, ::SomeI32Enum enum_attr, uint32_t dv_i32_attr, ::llvm::APFloat dv_f64_attr, ::llvm::StringRef dv_str_attr = "abc", bool dv_bool_attr = true, ::SomeI32Enum dv_enum_attr = ::SomeI32Enum::case5)
385382

386383
// DEF-LABEL: DOp definitions
387-
// DEF: odsState.addAttribute(str_attrAttrName(odsState.name), odsBuilder.getStringAttr(str_attr));
388-
// DEF: odsState.addAttribute(dv_str_attrAttrName(odsState.name), odsBuilder.getStringAttr(dv_str_attr));
384+
// DEF: odsState.addAttribute(getStrAttrAttrName(odsState.name), odsBuilder.getStringAttr(str_attr));
385+
// DEF: odsState.addAttribute(getDvStrAttrAttrName(odsState.name), odsBuilder.getStringAttr(dv_str_attr));
389386

390387
// Test derived type attr.
391388
// ---
@@ -435,7 +432,7 @@ def NamespaceOp : NS_Op<"namespace_op", []> {
435432
);
436433
}
437434
// DECL: NamespaceOp
438-
// DECL: foobar::SomeAttrAttr AttrDef()
435+
// DECL: foobar::SomeAttrAttr getAttrDef()
439436

440437

441438
// Test mixing operands and attributes in arbitrary order
@@ -470,11 +467,11 @@ def OpWithDefaultAndSuccessor : NS_Op<"default_with_succ", []> {
470467
// DECL: static void build({{.*}}, bool dv_bool_attr, ::mlir::BlockRange succ)
471468

472469
// DEF-LABEL: MixOperandsAndAttrs definitions
473-
// DEF-DAG: ::mlir::TypedValue<::mlir::FloatType> MixOperandsAndAttrs::operand()
474-
// DEF-DAG: ::mlir::TypedValue<::mlir::FloatType> MixOperandsAndAttrs::otherArg()
470+
// DEF-DAG: ::mlir::TypedValue<::mlir::FloatType> MixOperandsAndAttrs::getOperand()
471+
// DEF-DAG: ::mlir::TypedValue<::mlir::FloatType> MixOperandsAndAttrs::getOtherArg()
475472
// DEF-DAG: void MixOperandsAndAttrs::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::FloatAttr attr, ::mlir::Value operand, ::mlir::FloatAttr otherAttr, ::mlir::Value otherArg)
476-
// DEF-DAG: ::llvm::APFloat MixOperandsAndAttrs::attr()
477-
// DEF-DAG: ::llvm::APFloat MixOperandsAndAttrs::otherAttr()
473+
// DEF-DAG: ::llvm::APFloat MixOperandsAndAttrs::getAttr()
474+
// DEF-DAG: ::llvm::APFloat MixOperandsAndAttrs::getOtherAttr()
478475

479476
// Test unit attributes.
480477
// ---
@@ -484,11 +481,11 @@ def UnitAttrOp : NS_Op<"unit_attr_op", []> {
484481
}
485482

486483
// DEF-LABEL: UnitAttrOp definitions
487-
// DEF: bool UnitAttrOp::attr() {
484+
// DEF: bool UnitAttrOp::getAttr() {
488485
// DEF: return {{.*}} != nullptr
489486

490487
// DEF: ::mlir::Attribute UnitAttrOp::removeAttrAttr() {
491-
// DEF-NEXT: (*this)->removeAttr(attrAttrName());
488+
// DEF-NEXT: (*this)->removeAttr(getAttrAttrName());
492489

493490
// DEF: build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::UnitAttr attr)
494491

mlir/test/mlir-tblgen/op-operand.td

+5-8
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ include "mlir/IR/OpBase.td"
44

55
def Test_Dialect : Dialect {
66
let name = "test";
7-
8-
// TODO: Flip to _Prefixed
9-
let emitAccessorPrefix = kEmitAccessorPrefix_Raw;
107
}
118
class NS_Op<string mnemonic, list<Trait> traits> :
129
Op<Test_Dialect, mnemonic, traits>;
@@ -42,19 +39,19 @@ def OpD : NS_Op<"mix_variadic_and_normal_inputs_op", [SameVariadicOperandSize]>
4239
let arguments = (ins Variadic<AnyTensor>:$input1, AnyTensor:$input2, Variadic<AnyTensor>:$input3);
4340
}
4441

45-
// CHECK-LABEL: ::mlir::ValueRange OpDAdaptor::input1
42+
// CHECK-LABEL: ::mlir::ValueRange OpDAdaptor::getInput1
4643
// CHECK-NEXT: return getODSOperands(0);
4744

48-
// CHECK-LABEL: ::mlir::Value OpDAdaptor::input2
45+
// CHECK-LABEL: ::mlir::Value OpDAdaptor::getInput2
4946
// CHECK-NEXT: return *getODSOperands(1).begin();
5047

51-
// CHECK-LABEL: ::mlir::ValueRange OpDAdaptor::input3
48+
// CHECK-LABEL: ::mlir::ValueRange OpDAdaptor::getInput3
5249
// CHECK-NEXT: return getODSOperands(2);
5350

54-
// CHECK-LABEL: ::mlir::Operation::operand_range OpD::input1
51+
// CHECK-LABEL: ::mlir::Operation::operand_range OpD::getInput1
5552
// CHECK-NEXT: return getODSOperands(0);
5653

57-
// CHECK-LABEL: ::mlir::TypedValue<::mlir::TensorType> OpD::input2
54+
// CHECK-LABEL: ::mlir::TypedValue<::mlir::TensorType> OpD::getInput2
5855
// CHECK-NEXT: return *getODSOperands(1).begin();
5956

6057
// CHECK-LABEL: OpD::build

mlir/test/mlir-tblgen/op-result.td

+3-6
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ include "mlir/Interfaces/InferTypeOpInterface.td"
55

66
def Test_Dialect : Dialect {
77
let name = "test";
8-
9-
// TODO: Flip to _Prefixed
10-
let emitAccessorPrefix = kEmitAccessorPrefix_Raw;
118
}
129
class NS_Op<string mnemonic, list<Trait> traits> :
1310
Op<Test_Dialect, mnemonic, traits>;
@@ -99,10 +96,10 @@ def OpI : NS_Op<"mix_variadic_and_normal_results_op", [SameVariadicResultSize]>
9996
let results = (outs Variadic<AnyTensor>:$output1, AnyTensor:$output2, Variadic<AnyTensor>:$output3);
10097
}
10198

102-
// CHECK-LABEL: ::mlir::Operation::result_range OpI::output1
99+
// CHECK-LABEL: ::mlir::Operation::result_range OpI::getOutput1
103100
// CHECK-NEXT: return getODSResults(0);
104101

105-
// CHECK-LABEL: ::mlir::TypedValue<::mlir::TensorType> OpI::output2
102+
// CHECK-LABEL: ::mlir::TypedValue<::mlir::TensorType> OpI::getOutput2
106103
// CHECK-NEXT: return *getODSResults(1).begin();
107104

108105
// CHECK-LABEL: OpI::build
@@ -163,4 +160,4 @@ def OpM : NS_Op<"mix_diff_size_variadic_and_normal_results_op", [AttrSizedResult
163160
}
164161

165162
// CHECK-LABEL: OpM::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange output1, ::mlir::Type output2, /*optional*/::mlir::Type output3)
166-
// CHECK: odsState.addAttribute(result_segment_sizesAttrName(odsState.name), odsBuilder.getDenseI32ArrayAttr({static_cast<int32_t>(output1.size()), 1, (output3 ? 1 : 0)}));
163+
// CHECK: odsState.addAttribute(getResultSegmentSizesAttrName(odsState.name), odsBuilder.getDenseI32ArrayAttr({static_cast<int32_t>(output1.size()), 1, (output3 ? 1 : 0)}));

mlir/test/mlir-tblgen/op-side-effects.td

+3-6
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ include "mlir/Interfaces/SideEffectInterfaces.td"
44

55
def TEST_Dialect : Dialect {
66
let name = "test";
7-
8-
// TODO: Flip to _Prefixed
9-
let emitAccessorPrefix = kEmitAccessorPrefix_Raw;
107
}
118
class TEST_Op<string mnemonic, list<Trait> traits = []> :
129
Op<TEST_Dialect, mnemonic, traits>;
@@ -29,9 +26,9 @@ def SideEffectOpB : TEST_Op<"side_effect_op_b",
2926
// CHECK: void SideEffectOpA::getEffects
3027
// CHECK: for (::mlir::Value value : getODSOperands(0))
3128
// CHECK: effects.emplace_back(::mlir::MemoryEffects::Read::get(), value, ::mlir::SideEffects::DefaultResource::get());
32-
// CHECK: effects.emplace_back(::mlir::MemoryEffects::Read::get(), symbolAttr(), ::mlir::SideEffects::DefaultResource::get());
33-
// CHECK: effects.emplace_back(::mlir::MemoryEffects::Write::get(), flat_symbolAttr(), ::mlir::SideEffects::DefaultResource::get());
34-
// CHECK: if (auto symbolRef = optional_symbolAttr())
29+
// CHECK: effects.emplace_back(::mlir::MemoryEffects::Read::get(), getSymbolAttr(), ::mlir::SideEffects::DefaultResource::get());
30+
// CHECK: effects.emplace_back(::mlir::MemoryEffects::Write::get(), getFlatSymbolAttr(), ::mlir::SideEffects::DefaultResource::get());
31+
// CHECK: if (auto symbolRef = getOptionalSymbolAttr())
3532
// CHECK: effects.emplace_back(::mlir::MemoryEffects::Read::get(), symbolRef, ::mlir::SideEffects::DefaultResource::get());
3633
// CHECK: for (::mlir::Value value : getODSResults(0))
3734
// CHECK: effects.emplace_back(::mlir::MemoryEffects::Allocate::get(), value, CustomResource::get());

0 commit comments

Comments
 (0)