[Mlir-commits] [mlir] 9879261 - [mlir] Update tests to use kEmitAccessorPrefix_Prefixed
River Riddle
llvmlistbot at llvm.org
Tue Sep 20 23:58:01 PDT 2022
Author: River Riddle
Date: 2022-09-20T23:46:27-07:00
New Revision: 9879261d7a061cc1df18f6fe164f42044fb4cff1
URL: https://github.com/llvm/llvm-project/commit/9879261d7a061cc1df18f6fe164f42044fb4cff1
DIFF: https://github.com/llvm/llvm-project/commit/9879261d7a061cc1df18f6fe164f42044fb4cff1.diff
LOG: [mlir] Update tests to use kEmitAccessorPrefix_Prefixed
These aren't user facing, so just flip them directly to prefixed.
Added:
Modified:
mlir/test/mlir-tblgen/interfaces-as-constraints.td
mlir/test/mlir-tblgen/op-attribute.td
mlir/test/mlir-tblgen/op-operand.td
mlir/test/mlir-tblgen/op-result.td
mlir/test/mlir-tblgen/op-side-effects.td
Removed:
################################################################################
diff --git a/mlir/test/mlir-tblgen/interfaces-as-constraints.td b/mlir/test/mlir-tblgen/interfaces-as-constraints.td
index 34c42d2dc41b9..093868000ff92 100644
--- a/mlir/test/mlir-tblgen/interfaces-as-constraints.td
+++ b/mlir/test/mlir-tblgen/interfaces-as-constraints.td
@@ -4,9 +4,6 @@ include "mlir/IR/OpBase.td"
def Test_Dialect : Dialect {
let name = "test";
-
- // TODO: Flip to _Prefixed
- let emitAccessorPrefix = kEmitAccessorPrefix_Raw;
}
def TopLevelTypeInterface : TypeInterface<"TopLevelTypeInterface">;
@@ -46,5 +43,5 @@ def OpUsingAllOfThose : Op<Test_Dialect, "OpUsingAllOfThose"> {
// CHECK-NEXT: return op->emitOpError("attribute '") << attrName
// CHECK-NEXT: << "' failed to satisfy constraint: AttrInterfaceInNamespace instance";
-// CHECK: TopLevelAttrInterface OpUsingAllOfThose::attr1()
-// CHECK: test::AttrInterfaceInNamespace OpUsingAllOfThose::attr2()
+// CHECK: TopLevelAttrInterface OpUsingAllOfThose::getAttr1()
+// CHECK: test::AttrInterfaceInNamespace OpUsingAllOfThose::getAttr2()
diff --git a/mlir/test/mlir-tblgen/op-attribute.td b/mlir/test/mlir-tblgen/op-attribute.td
index ac18dedec337c..b25adfb4c4263 100644
--- a/mlir/test/mlir-tblgen/op-attribute.td
+++ b/mlir/test/mlir-tblgen/op-attribute.td
@@ -9,9 +9,6 @@ include "mlir/IR/OpBase.td"
def Test_Dialect : Dialect {
let name = "test";
let cppNamespace = "foobar";
-
- // TODO: Flip to _Prefixed
- let emitAccessorPrefix = kEmitAccessorPrefix_Raw;
}
class NS_Op<string mnemonic, list<Trait> traits> :
Op<Test_Dialect, mnemonic, traits>;
@@ -49,19 +46,19 @@ def AOp : NS_Op<"a_op", []> {
// DECL-SAME: {::llvm::StringRef("aAttr"), ::llvm::StringRef("bAttr"), ::llvm::StringRef("cAttr"), ::llvm::StringRef("dAttr")};
// DECL-NEXT: return ::llvm::makeArrayRef(attrNames);
-// DECL: ::mlir::StringAttr aAttrAttrName()
+// DECL: ::mlir::StringAttr getAAttrAttrName()
// DECL-NEXT: return getAttributeNameForIndex(0);
-// DECL: ::mlir::StringAttr aAttrAttrName(::mlir::OperationName name)
+// DECL: ::mlir::StringAttr getAAttrAttrName(::mlir::OperationName name)
// DECL-NEXT: return getAttributeNameForIndex(name, 0);
-// DECL: ::mlir::StringAttr bAttrAttrName()
+// DECL: ::mlir::StringAttr getBAttrAttrName()
// DECL-NEXT: return getAttributeNameForIndex(1);
-// DECL: ::mlir::StringAttr bAttrAttrName(::mlir::OperationName name)
+// DECL: ::mlir::StringAttr getBAttrAttrName(::mlir::OperationName name)
// DECL-NEXT: return getAttributeNameForIndex(name, 1);
-// DECL: ::mlir::StringAttr cAttrAttrName()
+// DECL: ::mlir::StringAttr getCAttrAttrName()
// DECL-NEXT: return getAttributeNameForIndex(2);
-// DECL: ::mlir::StringAttr cAttrAttrName(::mlir::OperationName name)
+// DECL: ::mlir::StringAttr getCAttrAttrName(::mlir::OperationName name)
// DECL-NEXT: return getAttributeNameForIndex(name, 2);
// DEF-LABEL: AOp definitions
@@ -74,7 +71,7 @@ def AOp : NS_Op<"a_op", []> {
// DEF-NEXT: while (true) {
// DEF-NEXT: if (namedAttrIt == namedAttrRange.end())
// DEF-NEXT: return emitError(loc, "'test.a_op' op ""requires attribute 'aAttr'");
-// DEF-NEXT: if (namedAttrIt->getName() == AOp::aAttrAttrName(*odsOpName)) {
+// DEF-NEXT: if (namedAttrIt->getName() == AOp::getAAttrAttrName(*odsOpName)) {
// DEF-NEXT: tblgen_aAttr = namedAttrIt->getValue();
// DEF-NEXT: break;
// DEF: ::mlir::Attribute tblgen_bAttr;
@@ -83,9 +80,9 @@ def AOp : NS_Op<"a_op", []> {
// DEF-NEXT: while (true) {
// DEF-NEXT: if (namedAttrIt == namedAttrRange.end())
// DEF-NEXT: break;
-// DEF: if (namedAttrIt->getName() == AOp::bAttrAttrName(*odsOpName))
+// DEF: if (namedAttrIt->getName() == AOp::getBAttrAttrName(*odsOpName))
// DEF-NEXT: tblgen_bAttr = namedAttrIt->getValue();
-// DEF: if (namedAttrIt->getName() == AOp::cAttrAttrName(*odsOpName))
+// DEF: if (namedAttrIt->getName() == AOp::getCAttrAttrName(*odsOpName))
// DEF-NEXT: tblgen_cAttr = namedAttrIt->getValue();
// DEF: if (tblgen_aAttr && !((some-condition)))
// DEF-NEXT: return emitError(loc, "'test.a_op' op ""attribute 'aAttr' failed to satisfy constraint: some attribute kind");
@@ -99,28 +96,28 @@ def AOp : NS_Op<"a_op", []> {
// Test getter methods
// ---
-// DEF: some-attr-kind AOp::aAttrAttr()
-// DEF-NEXT: ::mlir::impl::getAttrFromSortedRange((*this)->getAttrs().begin() + 0, (*this)->getAttrs().end() - 0, aAttrAttrName()).cast<some-attr-kind>()
-// DEF: some-return-type AOp::aAttr() {
-// DEF-NEXT: auto attr = aAttrAttr()
+// DEF: some-attr-kind AOp::getAAttrAttr()
+// DEF-NEXT: ::mlir::impl::getAttrFromSortedRange((*this)->getAttrs().begin() + 0, (*this)->getAttrs().end() - 0, getAAttrAttrName()).cast<some-attr-kind>()
+// DEF: some-return-type AOp::getAAttr() {
+// DEF-NEXT: auto attr = getAAttrAttr()
// DEF-NEXT: return attr.some-convert-from-storage();
-// DEF: some-attr-kind AOp::bAttrAttr()
-// DEF-NEXT: ::mlir::impl::getAttrFromSortedRange((*this)->getAttrs().begin() + 1, (*this)->getAttrs().end() - 0, bAttrAttrName()).dyn_cast_or_null<some-attr-kind>()
-// DEF: some-return-type AOp::bAttr() {
-// DEF-NEXT: auto attr = bAttrAttr();
+// DEF: some-attr-kind AOp::getBAttrAttr()
+// DEF-NEXT: ::mlir::impl::getAttrFromSortedRange((*this)->getAttrs().begin() + 1, (*this)->getAttrs().end() - 0, getBAttrAttrName()).dyn_cast_or_null<some-attr-kind>()
+// DEF: some-return-type AOp::getBAttr() {
+// DEF-NEXT: auto attr = getBAttrAttr();
// DEF-NEXT: return attr.some-convert-from-storage();
-// DEF: some-attr-kind AOp::cAttrAttr()
-// DEF-NEXT: ::mlir::impl::getAttrFromSortedRange((*this)->getAttrs().begin() + 1, (*this)->getAttrs().end() - 0, cAttrAttrName()).dyn_cast_or_null<some-attr-kind>()
-// DEF: ::llvm::Optional<some-return-type> AOp::cAttr() {
-// DEF-NEXT: auto attr = cAttrAttr()
+// DEF: some-attr-kind AOp::getCAttrAttr()
+// DEF-NEXT: ::mlir::impl::getAttrFromSortedRange((*this)->getAttrs().begin() + 1, (*this)->getAttrs().end() - 0, getCAttrAttrName()).dyn_cast_or_null<some-attr-kind>()
+// DEF: ::llvm::Optional<some-return-type> AOp::getCAttr() {
+// DEF-NEXT: auto attr = getCAttrAttr()
// DEF-NEXT: return attr ? ::llvm::Optional<some-return-type>(attr.some-convert-from-storage()) : (::llvm::None);
-// DEF: some-attr-kind AOp::dAttrAttr()
-// DEF-NEXT: ::mlir::impl::getAttrFromSortedRange((*this)->getAttrs().begin() + 1, (*this)->getAttrs().end() - 0, dAttrAttrName()).dyn_cast_or_null<some-attr-kind>()
-// DEF: some-return-type AOp::dAttr() {
-// DEF-NEXT: auto attr = dAttrAttr();
+// DEF: some-attr-kind AOp::getDAttrAttr()
+// DEF-NEXT: ::mlir::impl::getAttrFromSortedRange((*this)->getAttrs().begin() + 1, (*this)->getAttrs().end() - 0, getDAttrAttrName()).dyn_cast_or_null<some-attr-kind>()
+// DEF: some-return-type AOp::getDAttr() {
+// DEF-NEXT: auto attr = getDAttrAttr();
// DEF-NEXT: if (!attr)
// DEF-NEXT: return some-const-builder-call(::mlir::Builder((*this)->getContext()), 4.2).some-convert-from-storage();
// DEF-NEXT: return attr.some-convert-from-storage();
@@ -128,39 +125,39 @@ def AOp : NS_Op<"a_op", []> {
// Test setter methods
// ---
-// DEF: void AOp::aAttrAttr(some-attr-kind attr) {
-// DEF-NEXT: (*this)->setAttr(aAttrAttrName(), attr);
-// DEF: void AOp::bAttrAttr(some-attr-kind attr) {
-// DEF-NEXT: (*this)->setAttr(bAttrAttrName(), attr);
-// DEF: void AOp::cAttrAttr(some-attr-kind attr) {
-// DEF-NEXT: (*this)->setAttr(cAttrAttrName(), attr);
+// DEF: void AOp::setAAttrAttr(some-attr-kind attr) {
+// DEF-NEXT: (*this)->setAttr(getAAttrAttrName(), attr);
+// DEF: void AOp::setBAttrAttr(some-attr-kind attr) {
+// DEF-NEXT: (*this)->setAttr(getBAttrAttrName(), attr);
+// DEF: void AOp::setCAttrAttr(some-attr-kind attr) {
+// DEF-NEXT: (*this)->setAttr(getCAttrAttrName(), attr);
// Test remove methods
// ---
// DEF: ::mlir::Attribute AOp::removeCAttrAttr() {
-// DEF-NEXT: return (*this)->removeAttr(cAttrAttrName());
+// DEF-NEXT: return (*this)->removeAttr(getCAttrAttrName());
// Test build methods
// ---
// DEF: void AOp::build(
-// DEF: odsState.addAttribute(aAttrAttrName(odsState.name), aAttr);
-// DEF: odsState.addAttribute(bAttrAttrName(odsState.name), bAttr);
+// DEF: odsState.addAttribute(getAAttrAttrName(odsState.name), aAttr);
+// DEF: odsState.addAttribute(getBAttrAttrName(odsState.name), bAttr);
// DEF: if (cAttr) {
-// DEF-NEXT: odsState.addAttribute(cAttrAttrName(odsState.name), cAttr);
+// DEF-NEXT: odsState.addAttribute(getCAttrAttrName(odsState.name), cAttr);
-// DEF: odsState.addAttribute(aAttrAttrName(odsState.name), some-const-builder-call(odsBuilder, aAttr));
-// DEF-NEXT: odsState.addAttribute(bAttrAttrName(odsState.name), some-const-builder-call(odsBuilder, bAttr));
+// DEF: odsState.addAttribute(getAAttrAttrName(odsState.name), some-const-builder-call(odsBuilder, aAttr));
+// DEF-NEXT: odsState.addAttribute(getBAttrAttrName(odsState.name), some-const-builder-call(odsBuilder, bAttr));
// DEF-NEXT: if (cAttr) {
-// DEF-NEXT: odsState.addAttribute(cAttrAttrName(odsState.name), cAttr);
+// DEF-NEXT: odsState.addAttribute(getCAttrAttrName(odsState.name), cAttr);
// DEF-NEXT: }
// DEF-NOT: if (dAttr)
-// DEF: odsState.addAttribute(dAttrAttrName(odsState.name), some-const-builder-call(odsBuilder, dAttr));
+// DEF: odsState.addAttribute(getDAttrAttrName(odsState.name), some-const-builder-call(odsBuilder, dAttr));
// DEF: void AOp::build(
// DEF: some-return-type aAttr, some-return-type bAttr, /*optional*/some-attr-kind cAttr
-// DEF: odsState.addAttribute(aAttrAttrName(odsState.name), some-const-builder-call(odsBuilder, aAttr));
+// DEF: odsState.addAttribute(getAAttrAttrName(odsState.name), some-const-builder-call(odsBuilder, aAttr));
// DEF: void AOp::build(
// DEF: ::llvm::ArrayRef<::mlir::NamedAttribute> attributes
@@ -321,19 +318,19 @@ def BOp : NS_Op<"b_op", []> {
// Test common attribute kind getters' return types
// ---
-// DEF: ::mlir::Attribute BOp::any_attr()
-// DEF: bool BOp::bool_attr()
-// DEF: uint32_t BOp::i32_attr()
-// DEF: uint64_t BOp::i64_attr()
-// DEF: ::llvm::APFloat BOp::f32_attr()
-// DEF: ::llvm::APFloat BOp::f64_attr()
-// DEF: ::llvm::StringRef BOp::str_attr()
-// DEF: ::mlir::ElementsAttr BOp::elements_attr()
-// DEF: ::llvm::StringRef BOp::function_attr()
-// DEF: SomeType BOp::some_type_attr()
-// DEF: ::mlir::ArrayAttr BOp::array_attr()
-// DEF: ::mlir::ArrayAttr BOp::some_attr_array()
-// DEF: ::mlir::Type BOp::type_attr()
+// DEF: ::mlir::Attribute BOp::getAnyAttr()
+// DEF: bool BOp::getBoolAttr()
+// DEF: uint32_t BOp::getI32Attr()
+// DEF: uint64_t BOp::getI64Attr()
+// DEF: ::llvm::APFloat BOp::getF32Attr()
+// DEF: ::llvm::APFloat BOp::getF64Attr()
+// DEF: ::llvm::StringRef BOp::getStrAttr()
+// DEF: ::mlir::ElementsAttr BOp::getElementsAttr()
+// DEF: ::llvm::StringRef BOp::getFunctionAttr()
+// DEF: SomeType BOp::getSomeTypeAttr()
+// DEF: ::mlir::ArrayAttr BOp::getArrayAttr()
+// DEF: ::mlir::ArrayAttr BOp::getSomeAttrArray()
+// DEF: ::mlir::Type BOp::getTypeAttr()
// Test building constant values for array attribute kinds
// ---
@@ -384,8 +381,8 @@ def DOp : NS_Op<"d_op", []> {
// 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)
// DEF-LABEL: DOp definitions
-// DEF: odsState.addAttribute(str_attrAttrName(odsState.name), odsBuilder.getStringAttr(str_attr));
-// DEF: odsState.addAttribute(dv_str_attrAttrName(odsState.name), odsBuilder.getStringAttr(dv_str_attr));
+// DEF: odsState.addAttribute(getStrAttrAttrName(odsState.name), odsBuilder.getStringAttr(str_attr));
+// DEF: odsState.addAttribute(getDvStrAttrAttrName(odsState.name), odsBuilder.getStringAttr(dv_str_attr));
// Test derived type attr.
// ---
@@ -435,7 +432,7 @@ def NamespaceOp : NS_Op<"namespace_op", []> {
);
}
// DECL: NamespaceOp
-// DECL: foobar::SomeAttrAttr AttrDef()
+// DECL: foobar::SomeAttrAttr getAttrDef()
// Test mixing operands and attributes in arbitrary order
@@ -470,11 +467,11 @@ def OpWithDefaultAndSuccessor : NS_Op<"default_with_succ", []> {
// DECL: static void build({{.*}}, bool dv_bool_attr, ::mlir::BlockRange succ)
// DEF-LABEL: MixOperandsAndAttrs definitions
-// DEF-DAG: ::mlir::TypedValue<::mlir::FloatType> MixOperandsAndAttrs::operand()
-// DEF-DAG: ::mlir::TypedValue<::mlir::FloatType> MixOperandsAndAttrs::otherArg()
+// DEF-DAG: ::mlir::TypedValue<::mlir::FloatType> MixOperandsAndAttrs::getOperand()
+// DEF-DAG: ::mlir::TypedValue<::mlir::FloatType> MixOperandsAndAttrs::getOtherArg()
// DEF-DAG: void MixOperandsAndAttrs::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::FloatAttr attr, ::mlir::Value operand, ::mlir::FloatAttr otherAttr, ::mlir::Value otherArg)
-// DEF-DAG: ::llvm::APFloat MixOperandsAndAttrs::attr()
-// DEF-DAG: ::llvm::APFloat MixOperandsAndAttrs::otherAttr()
+// DEF-DAG: ::llvm::APFloat MixOperandsAndAttrs::getAttr()
+// DEF-DAG: ::llvm::APFloat MixOperandsAndAttrs::getOtherAttr()
// Test unit attributes.
// ---
@@ -484,11 +481,11 @@ def UnitAttrOp : NS_Op<"unit_attr_op", []> {
}
// DEF-LABEL: UnitAttrOp definitions
-// DEF: bool UnitAttrOp::attr() {
+// DEF: bool UnitAttrOp::getAttr() {
// DEF: return {{.*}} != nullptr
// DEF: ::mlir::Attribute UnitAttrOp::removeAttrAttr() {
-// DEF-NEXT: (*this)->removeAttr(attrAttrName());
+// DEF-NEXT: (*this)->removeAttr(getAttrAttrName());
// DEF: build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, /*optional*/::mlir::UnitAttr attr)
diff --git a/mlir/test/mlir-tblgen/op-operand.td b/mlir/test/mlir-tblgen/op-operand.td
index c4f904dc0a14a..67ad724e1bd88 100644
--- a/mlir/test/mlir-tblgen/op-operand.td
+++ b/mlir/test/mlir-tblgen/op-operand.td
@@ -4,9 +4,6 @@ include "mlir/IR/OpBase.td"
def Test_Dialect : Dialect {
let name = "test";
-
- // TODO: Flip to _Prefixed
- let emitAccessorPrefix = kEmitAccessorPrefix_Raw;
}
class NS_Op<string mnemonic, list<Trait> traits> :
Op<Test_Dialect, mnemonic, traits>;
@@ -42,19 +39,19 @@ def OpD : NS_Op<"mix_variadic_and_normal_inputs_op", [SameVariadicOperandSize]>
let arguments = (ins Variadic<AnyTensor>:$input1, AnyTensor:$input2, Variadic<AnyTensor>:$input3);
}
-// CHECK-LABEL: ::mlir::ValueRange OpDAdaptor::input1
+// CHECK-LABEL: ::mlir::ValueRange OpDAdaptor::getInput1
// CHECK-NEXT: return getODSOperands(0);
-// CHECK-LABEL: ::mlir::Value OpDAdaptor::input2
+// CHECK-LABEL: ::mlir::Value OpDAdaptor::getInput2
// CHECK-NEXT: return *getODSOperands(1).begin();
-// CHECK-LABEL: ::mlir::ValueRange OpDAdaptor::input3
+// CHECK-LABEL: ::mlir::ValueRange OpDAdaptor::getInput3
// CHECK-NEXT: return getODSOperands(2);
-// CHECK-LABEL: ::mlir::Operation::operand_range OpD::input1
+// CHECK-LABEL: ::mlir::Operation::operand_range OpD::getInput1
// CHECK-NEXT: return getODSOperands(0);
-// CHECK-LABEL: ::mlir::TypedValue<::mlir::TensorType> OpD::input2
+// CHECK-LABEL: ::mlir::TypedValue<::mlir::TensorType> OpD::getInput2
// CHECK-NEXT: return *getODSOperands(1).begin();
// CHECK-LABEL: OpD::build
diff --git a/mlir/test/mlir-tblgen/op-result.td b/mlir/test/mlir-tblgen/op-result.td
index 5c356e0137fd7..90876fe2e38d0 100644
--- a/mlir/test/mlir-tblgen/op-result.td
+++ b/mlir/test/mlir-tblgen/op-result.td
@@ -5,9 +5,6 @@ include "mlir/Interfaces/InferTypeOpInterface.td"
def Test_Dialect : Dialect {
let name = "test";
-
- // TODO: Flip to _Prefixed
- let emitAccessorPrefix = kEmitAccessorPrefix_Raw;
}
class NS_Op<string mnemonic, list<Trait> traits> :
Op<Test_Dialect, mnemonic, traits>;
@@ -99,10 +96,10 @@ def OpI : NS_Op<"mix_variadic_and_normal_results_op", [SameVariadicResultSize]>
let results = (outs Variadic<AnyTensor>:$output1, AnyTensor:$output2, Variadic<AnyTensor>:$output3);
}
-// CHECK-LABEL: ::mlir::Operation::result_range OpI::output1
+// CHECK-LABEL: ::mlir::Operation::result_range OpI::getOutput1
// CHECK-NEXT: return getODSResults(0);
-// CHECK-LABEL: ::mlir::TypedValue<::mlir::TensorType> OpI::output2
+// CHECK-LABEL: ::mlir::TypedValue<::mlir::TensorType> OpI::getOutput2
// CHECK-NEXT: return *getODSResults(1).begin();
// CHECK-LABEL: OpI::build
@@ -163,4 +160,4 @@ def OpM : NS_Op<"mix_
diff _size_variadic_and_normal_results_op", [AttrSizedResult
}
// CHECK-LABEL: OpM::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange output1, ::mlir::Type output2, /*optional*/::mlir::Type output3)
-// CHECK: odsState.addAttribute(result_segment_sizesAttrName(odsState.name), odsBuilder.getDenseI32ArrayAttr({static_cast<int32_t>(output1.size()), 1, (output3 ? 1 : 0)}));
+// CHECK: odsState.addAttribute(getResultSegmentSizesAttrName(odsState.name), odsBuilder.getDenseI32ArrayAttr({static_cast<int32_t>(output1.size()), 1, (output3 ? 1 : 0)}));
diff --git a/mlir/test/mlir-tblgen/op-side-effects.td b/mlir/test/mlir-tblgen/op-side-effects.td
index 574b7be617355..b8e5f6a0f72d9 100644
--- a/mlir/test/mlir-tblgen/op-side-effects.td
+++ b/mlir/test/mlir-tblgen/op-side-effects.td
@@ -4,9 +4,6 @@ include "mlir/Interfaces/SideEffectInterfaces.td"
def TEST_Dialect : Dialect {
let name = "test";
-
- // TODO: Flip to _Prefixed
- let emitAccessorPrefix = kEmitAccessorPrefix_Raw;
}
class TEST_Op<string mnemonic, list<Trait> traits = []> :
Op<TEST_Dialect, mnemonic, traits>;
@@ -29,9 +26,9 @@ def SideEffectOpB : TEST_Op<"side_effect_op_b",
// CHECK: void SideEffectOpA::getEffects
// CHECK: for (::mlir::Value value : getODSOperands(0))
// CHECK: effects.emplace_back(::mlir::MemoryEffects::Read::get(), value, ::mlir::SideEffects::DefaultResource::get());
-// CHECK: effects.emplace_back(::mlir::MemoryEffects::Read::get(), symbolAttr(), ::mlir::SideEffects::DefaultResource::get());
-// CHECK: effects.emplace_back(::mlir::MemoryEffects::Write::get(), flat_symbolAttr(), ::mlir::SideEffects::DefaultResource::get());
-// CHECK: if (auto symbolRef = optional_symbolAttr())
+// CHECK: effects.emplace_back(::mlir::MemoryEffects::Read::get(), getSymbolAttr(), ::mlir::SideEffects::DefaultResource::get());
+// CHECK: effects.emplace_back(::mlir::MemoryEffects::Write::get(), getFlatSymbolAttr(), ::mlir::SideEffects::DefaultResource::get());
+// CHECK: if (auto symbolRef = getOptionalSymbolAttr())
// CHECK: effects.emplace_back(::mlir::MemoryEffects::Read::get(), symbolRef, ::mlir::SideEffects::DefaultResource::get());
// CHECK: for (::mlir::Value value : getODSResults(0))
// CHECK: effects.emplace_back(::mlir::MemoryEffects::Allocate::get(), value, CustomResource::get());
More information about the Mlir-commits
mailing list