71 auto &propStorage = this->constant;
72 return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(propStorage);
75 this->constant = propValue;
81 auto &propStorage = this->initial_value;
82 return ::llvm::dyn_cast_or_null<::mlir::Attribute>(propStorage);
85 this->initial_value = propValue;
91 auto &propStorage = this->sym_name;
92 return ::llvm::cast<::mlir::StringAttr>(propStorage);
95 this->sym_name = propValue;
101 auto &propStorage = this->type;
102 return ::llvm::cast<::mlir::TypeAttr>(propStorage);
104 void setType(const ::mlir::TypeAttr &propValue) {
105 this->type = propValue;
112 rhs.
type == this->type &&
116 return !(*
this == rhs);
144 auto attr = ::llvm::cast<::mlir::StringAttr>(
getProperties().sym_name);
152 auto attr = ::llvm::cast<::mlir::TypeAttr>(
getProperties().type);
162template <
typename RangeT>
164 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
175 template <
typename LateInst = GlobalDefOp,
typename = std::enable_if_t<std::is_same_v<LateInst, GlobalDefOp>>>
184 return {std::next(odsOperands.begin(), valueRange.first),
185 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
200 ::llvm::LogicalResult
verify(::mlir::Location loc);
202class GlobalDefOp :
public ::mlir::Op<GlobalDefOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::HasParent<mlir::ModuleOp>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::SymbolUserOpInterface::Trait, ::mlir::SymbolOpInterface::Trait> {
207 template <
typename RangeT>
212 static ::llvm::StringRef attrNames[] = {::llvm::StringRef(
"constant"), ::llvm::StringRef(
"initial_value"), ::llvm::StringRef(
"sym_name"), ::llvm::StringRef(
"type")};
213 return ::llvm::ArrayRef(attrNames);
217 return getAttributeNameForIndex(0);
221 return getAttributeNameForIndex(name, 0);
225 return getAttributeNameForIndex(1);
229 return getAttributeNameForIndex(name, 1);
233 return getAttributeNameForIndex(2);
237 return getAttributeNameForIndex(name, 2);
241 return getAttributeNameForIndex(3);
245 return getAttributeNameForIndex(name, 3);
249 return ::llvm::StringLiteral(
"global.def");
258 return {std::next(getOperation()->operand_begin(), valueRange.first),
259 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
268 return {std::next(getOperation()->result_begin(), valueRange.first),
269 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
272 static ::llvm::LogicalResult
setPropertiesFromAttr(
Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
275 static std::optional<mlir::Attribute>
getInherentAttr(::mlir::MLIRContext *ctx,
const Properties &prop, llvm::StringRef name);
278 static ::llvm::LogicalResult
verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
279 static ::llvm::LogicalResult
readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
282 return ::llvm::cast<::mlir::StringAttr>(getProperties().sym_name);
287 return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().constant);
292 return ::llvm::cast<::mlir::TypeAttr>(getProperties().type);
297 return ::llvm::dyn_cast_or_null<::mlir::Attribute>(getProperties().initial_value);
302 getProperties().sym_name = attr;
307 getProperties().constant = attr;
312 getProperties().type = attr;
315 void setType(::mlir::Type attrValue);
317 getProperties().initial_value = attr;
321 auto attr = getProperties().constant;
322 getProperties().constant = {};
326 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name, ::mlir::UnitAttr constant, ::mlir::TypeAttr type, ::mlir::Attribute initial_value =
nullptr);
327 static GlobalDefOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::StringAttr sym_name, ::mlir::UnitAttr constant, ::mlir::TypeAttr type, ::mlir::Attribute initial_value =
nullptr);
328 static GlobalDefOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::StringAttr sym_name, ::mlir::UnitAttr constant, ::mlir::TypeAttr type, ::mlir::Attribute initial_value =
nullptr);
329 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name, ::mlir::UnitAttr constant, ::mlir::TypeAttr type, ::mlir::Attribute initial_value =
nullptr);
330 static GlobalDefOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name, ::mlir::UnitAttr constant, ::mlir::TypeAttr type, ::mlir::Attribute initial_value =
nullptr);
331 static GlobalDefOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name, ::mlir::UnitAttr constant, ::mlir::TypeAttr type, ::mlir::Attribute initial_value =
nullptr);
332 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef sym_name,
bool constant, ::mlir::Type type, ::mlir::Attribute initial_value);
333 static GlobalDefOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::llvm::StringRef sym_name,
bool constant, ::mlir::Type type, ::mlir::Attribute initial_value);
334 static GlobalDefOp create(::mlir::ImplicitLocOpBuilder &builder, ::llvm::StringRef sym_name,
bool constant, ::mlir::Type type, ::mlir::Attribute initial_value);
335 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name,
bool constant, ::mlir::Type type, ::mlir::Attribute initial_value);
336 static GlobalDefOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name,
bool constant, ::mlir::Type type, ::mlir::Attribute initial_value);
337 static GlobalDefOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name,
bool constant, ::mlir::Type type, ::mlir::Attribute initial_value);
338 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
339 static GlobalDefOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
340 static GlobalDefOp
create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
341 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
342 static GlobalDefOp
create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
343 static GlobalDefOp
create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
345 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
346 void print(::mlir::OpAsmPrinter &p);
349 ::llvm::LogicalResult
verify();
350 ::llvm::LogicalResult
verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
353 ::mlir::StringAttr getAttributeNameForIndex(
unsigned index) {
354 return getAttributeNameForIndex((*this)->getName(), index);
357 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name,
unsigned index) {
358 assert(index < 4 &&
"invalid attribute index");
359 assert(name.getStringRef() ==
getOperationName() &&
"invalid operation name");
360 assert(name.isRegistered() &&
"Operation isn't registered, missing a "
361 "dependent dialect loading?");
362 return name.getAttributeNames()[index];
390 auto &propStorage = this->constant;
391 return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(propStorage);
394 this->constant = propValue;
400 auto &propStorage = this->name_ref;
401 return ::llvm::cast<::mlir::SymbolRefAttr>(propStorage);
404 this->name_ref = propValue;
413 return !(*
this == rhs);
443 auto attr = ::llvm::cast<::mlir::SymbolRefAttr>(
getProperties().name_ref);
451template <
typename RangeT>
453 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
464 template <
typename LateInst = GlobalReadOp,
typename = std::enable_if_t<std::is_same_v<LateInst, GlobalReadOp>>>
473 return {std::next(odsOperands.begin(), valueRange.first),
474 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
489 ::llvm::LogicalResult
verify(::mlir::Location loc);
491class GlobalReadOp :
public ::mlir::Op<GlobalReadOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::MemoryEffectOpInterface::Trait, ::llzk::global::GlobalRefOpInterface::Trait, ::mlir::SymbolUserOpInterface::Trait> {
496 template <
typename RangeT>
501 static ::llvm::StringRef attrNames[] = {::llvm::StringRef(
"constant"), ::llvm::StringRef(
"name_ref")};
502 return ::llvm::ArrayRef(attrNames);
506 return getAttributeNameForIndex(0);
510 return getAttributeNameForIndex(name, 0);
514 return getAttributeNameForIndex(1);
518 return getAttributeNameForIndex(name, 1);
522 return ::llvm::StringLiteral(
"global.read");
531 return {std::next(getOperation()->operand_begin(), valueRange.first),
532 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
541 return {std::next(getOperation()->result_begin(), valueRange.first),
542 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
545 ::mlir::TypedValue<::mlir::Type>
getVal() {
546 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*
getODSResults(0).begin());
549 static ::llvm::LogicalResult
setPropertiesFromAttr(
Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
552 static std::optional<mlir::Attribute>
getInherentAttr(::mlir::MLIRContext *ctx,
const Properties &prop, llvm::StringRef name);
555 static ::llvm::LogicalResult
verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
556 static ::llvm::LogicalResult
readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
559 return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().constant);
564 return ::llvm::cast<::mlir::SymbolRefAttr>(getProperties().name_ref);
569 getProperties().constant = attr;
574 getProperties().name_ref = attr;
578 auto attr = getProperties().constant;
579 getProperties().constant = {};
583 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type val, ::mlir::UnitAttr constant, ::mlir::SymbolRefAttr name_ref);
584 static GlobalReadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type val, ::mlir::UnitAttr constant, ::mlir::SymbolRefAttr name_ref);
585 static GlobalReadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type val, ::mlir::UnitAttr constant, ::mlir::SymbolRefAttr name_ref);
586 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::UnitAttr constant, ::mlir::SymbolRefAttr name_ref);
587 static GlobalReadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::UnitAttr constant, ::mlir::SymbolRefAttr name_ref);
588 static GlobalReadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::UnitAttr constant, ::mlir::SymbolRefAttr name_ref);
589 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type val,
bool constant, ::mlir::SymbolRefAttr name_ref);
590 static GlobalReadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type val,
bool constant, ::mlir::SymbolRefAttr name_ref);
591 static GlobalReadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type val,
bool constant, ::mlir::SymbolRefAttr name_ref);
592 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes,
bool constant, ::mlir::SymbolRefAttr name_ref);
593 static GlobalReadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes,
bool constant, ::mlir::SymbolRefAttr name_ref);
594 static GlobalReadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes,
bool constant, ::mlir::SymbolRefAttr name_ref);
595 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
596 static GlobalReadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
597 static GlobalReadOp
create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
598 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
599 static GlobalReadOp
create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
600 static GlobalReadOp
create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
603 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
604 ::llvm::LogicalResult
verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
605 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
606 void print(::mlir::OpAsmPrinter &_odsPrinter);
608 ::mlir::StringAttr getAttributeNameForIndex(
unsigned index) {
609 return getAttributeNameForIndex((*this)->getName(), index);
612 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name,
unsigned index) {
613 assert(index < 2 &&
"invalid attribute index");
614 assert(name.getStringRef() ==
getOperationName() &&
"invalid operation name");
615 assert(name.isRegistered() &&
"Operation isn't registered, missing a "
616 "dependent dialect loading?");
617 return name.getAttributeNames()[index];
645 auto &propStorage = this->name_ref;
646 return ::llvm::cast<::mlir::SymbolRefAttr>(propStorage);
649 this->name_ref = propValue;
657 return !(*
this == rhs);
685 auto attr = ::llvm::cast<::mlir::SymbolRefAttr>(
getProperties().name_ref);
693template <
typename RangeT>
695 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
697 static constexpr int odsIndex_val = 0;
707 template <
typename LateInst = GlobalWriteOp,
typename = std::enable_if_t<std::is_same_v<LateInst, GlobalWriteOp>>>
716 return {std::next(odsOperands.begin(), valueRange.first),
717 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
736 ::llvm::LogicalResult
verify(::mlir::Location loc);
738class GlobalWriteOp :
public ::mlir::Op<GlobalWriteOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::llzk::function::WitnessGen, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::MemoryEffectOpInterface::Trait, ::llzk::global::GlobalRefOpInterface::Trait, ::mlir::SymbolUserOpInterface::Trait> {
743 template <
typename RangeT>
749 static ::llvm::StringRef attrNames[] = {::llvm::StringRef(
"name_ref")};
750 return ::llvm::ArrayRef(attrNames);
754 return getAttributeNameForIndex(0);
758 return getAttributeNameForIndex(name, 0);
762 return ::llvm::StringLiteral(
"global.write");
771 return {std::next(getOperation()->operand_begin(), valueRange.first),
772 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
775 ::mlir::TypedValue<::mlir::Type>
getVal() {
776 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*
getODSOperands(0).begin());
781 return getOperation()->getOpOperand(range.first);
790 return {std::next(getOperation()->result_begin(), valueRange.first),
791 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
794 static ::llvm::LogicalResult
setPropertiesFromAttr(
Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
797 static std::optional<mlir::Attribute>
getInherentAttr(::mlir::MLIRContext *ctx,
const Properties &prop, llvm::StringRef name);
800 static ::llvm::LogicalResult
verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
801 static ::llvm::LogicalResult
readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
804 return ::llvm::cast<::mlir::SymbolRefAttr>(getProperties().name_ref);
809 getProperties().name_ref = attr;
812 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::SymbolRefAttr name_ref, ::mlir::Value val);
813 static GlobalWriteOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::SymbolRefAttr name_ref, ::mlir::Value val);
814 static GlobalWriteOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::SymbolRefAttr name_ref, ::mlir::Value val);
815 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::SymbolRefAttr name_ref, ::mlir::Value val);
816 static GlobalWriteOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::SymbolRefAttr name_ref, ::mlir::Value val);
817 static GlobalWriteOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::SymbolRefAttr name_ref, ::mlir::Value val);
818 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
819 static GlobalWriteOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
820 static GlobalWriteOp
create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
821 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
822 static GlobalWriteOp
create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
823 static GlobalWriteOp
create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
826 ::llvm::LogicalResult
verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
827 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
828 void print(::mlir::OpAsmPrinter &_odsPrinter);
829 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
831 ::mlir::StringAttr getAttributeNameForIndex(
unsigned index) {
832 return getAttributeNameForIndex((*this)->getName(), index);
835 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name,
unsigned index) {
836 assert(index < 1 &&
"invalid attribute index");
837 assert(name.getStringRef() ==
getOperationName() &&
"invalid operation name");
838 assert(name.isRegistered() &&
"Operation isn't registered, missing a "
839 "dependent dialect loading?");
840 return name.getAttributeNames()[index];
845 inline ::mlir::FailureOr<SymbolLookupResult<GlobalDefOp>>
getGlobalDefOp(::mlir::SymbolTableCollection &tables) {
846 return ::llvm::cast<GlobalRefOpInterface>(getOperation()).getGlobalDefOp(tables);
::llvm::LogicalResult verify(::mlir::Location loc)
GlobalDefOpAdaptor(GlobalDefOp op)
GlobalDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
GlobalDefOpGenericAdaptor(RangeT values, const GlobalDefOpGenericAdaptorBase &base)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
GlobalDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
RangeT getODSOperands(unsigned index)
GlobalDefOpGenericAdaptor(RangeT values, LateInst op)
GlobalDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
GlobalDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
void setInitialValueAttr(::mlir::Attribute attr)
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties)
GlobalDefOpAdaptor Adaptor
FoldAdaptor::Properties Properties
::mlir::Attribute getInitialValue()
void setType(::mlir::Type attrValue)
::mlir::StringAttr getSymNameAttrName(::mlir::OperationName name)
::mlir::Attribute removeConstantAttr()
::mlir::StringAttr getConstantAttrName(::mlir::OperationName name)
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
void setTypeAttr(::mlir::TypeAttr attr)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::llvm::LogicalResult verifyInvariants()
::mlir::TypeAttr getTypeAttr()
::llvm::StringRef getSymName()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
::mlir::StringAttr getSymNameAttrName()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static GlobalDefOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::StringAttr sym_name, ::mlir::UnitAttr constant, ::mlir::TypeAttr type, ::mlir::Attribute initial_value=nullptr)
bool isConstant()
Returns true when this def is marked as const.
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
::mlir::Attribute getInitialValueAttr()
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
GlobalDefOpGenericAdaptor< RangeT > GenericAdaptor
void print(::mlir::OpAsmPrinter &p)
::mlir::StringAttr getSymNameAttr()
::mlir::StringAttr getInitialValueAttrName(::mlir::OperationName name)
::mlir::UnitAttr getConstantAttr()
void setSymName(::llvm::StringRef attrValue)
void writeProperties(::mlir::DialectBytecodeWriter &writer)
::mlir::StringAttr getTypeAttrName(::mlir::OperationName name)
::llvm::LogicalResult verifyInvariantsImpl()
::mlir::StringAttr getTypeAttrName()
void setConstant(bool attrValue)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static constexpr ::llvm::StringLiteral getOperationName()
void setConstantAttr(::mlir::UnitAttr attr)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name, ::mlir::UnitAttr constant, ::mlir::TypeAttr type, ::mlir::Attribute initial_value=nullptr)
::mlir::StringAttr getInitialValueAttrName()
::llvm::LogicalResult verify()
static llvm::hash_code computePropertiesHash(const Properties &prop)
::mlir::Operation::result_range getODSResults(unsigned index)
::mlir::StringAttr getConstantAttrName()
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
::mlir::Operation::operand_range getODSOperands(unsigned index)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
void setSymNameAttr(::mlir::StringAttr attr)
GlobalReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
GlobalReadOpAdaptor(GlobalReadOp op)
GlobalReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
GlobalReadOpGenericAdaptor(RangeT values, const GlobalReadOpGenericAdaptorBase &base)
GlobalReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
RangeT getODSOperands(unsigned index)
GlobalReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
GlobalReadOpGenericAdaptor(RangeT values, LateInst op)
::mlir::StringAttr getNameRefAttrName()
void writeProperties(::mlir::DialectBytecodeWriter &writer)
static GlobalReadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type val, ::mlir::UnitAttr constant, ::mlir::SymbolRefAttr name_ref)
::mlir::UnitAttr getConstantAttr()
FoldAdaptor::Properties Properties
static constexpr ::llvm::StringLiteral getOperationName()
GlobalReadOpAdaptor Adaptor
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
GlobalReadOpGenericAdaptor< RangeT > GenericAdaptor
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type val, ::mlir::UnitAttr constant, ::mlir::SymbolRefAttr name_ref)
::mlir::Operation::result_range getODSResults(unsigned index)
::llvm::LogicalResult verifyInvariants()
::mlir::Attribute removeConstantAttr()
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
void print(::mlir::OpAsmPrinter &_odsPrinter)
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
::mlir::StringAttr getConstantAttrName(::mlir::OperationName name)
void setConstant(bool attrValue)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
static llvm::hash_code computePropertiesHash(const Properties &prop)
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
bool isConstant()
Returns true when this read is marked as const.
::mlir::StringAttr getConstantAttrName()
void setConstantAttr(::mlir::UnitAttr attr)
::mlir::StringAttr getNameRefAttrName(::mlir::OperationName name)
void setNameRefAttr(::mlir::SymbolRefAttr attr)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::mlir::SymbolRefAttr getNameRefAttr()
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::mlir::TypedValue<::mlir::Type > getVal()
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::SymbolRefAttr getNameRef()
::mlir::Operation::operand_range getODSOperands(unsigned index)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::llvm::LogicalResult verifyInvariantsImpl()
GlobalWriteOpAdaptor(GlobalWriteOp op)
GlobalWriteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
GlobalWriteOpGenericAdaptor(RangeT values, const GlobalWriteOpGenericAdaptorBase &base)
GlobalWriteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
RangeT getODSOperands(unsigned index)
GlobalWriteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
GlobalWriteOpGenericAdaptor(RangeT values, LateInst op)
GlobalWriteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
::mlir::OpOperand & getValMutable()
::mlir::TypedValue<::mlir::Type > getVal()
static llvm::hash_code computePropertiesHash(const Properties &prop)
::mlir::StringAttr getNameRefAttrName()
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
static constexpr ::llvm::StringLiteral getOperationName()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::SymbolRefAttr getNameRefAttr()
static constexpr int odsIndex_val
::mlir::StringAttr getNameRefAttrName(::mlir::OperationName name)
::mlir::Operation::operand_range getODSOperands(unsigned index)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
void print(::mlir::OpAsmPrinter &_odsPrinter)
GlobalWriteOpAdaptor Adaptor
inline ::mlir::FailureOr< SymbolLookupResult< GlobalDefOp > > getGlobalDefOp(::mlir::SymbolTableCollection &tables)
Gets the definition for the global referenced in this op.
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
FoldAdaptor::Properties Properties
void setNameRefAttr(::mlir::SymbolRefAttr attr)
GlobalWriteOpGenericAdaptor< RangeT > GenericAdaptor
::llvm::LogicalResult verifyInvariants()
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::Operation::result_range getODSResults(unsigned index)
static GlobalWriteOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::SymbolRefAttr name_ref, ::mlir::Value val)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::SymbolRefAttr name_ref, ::mlir::Value val)
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
void writeProperties(::mlir::DialectBytecodeWriter &writer)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::llvm::LogicalResult verifyInvariantsImpl()
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::SymbolRefAttr getNameRef()
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::DictionaryAttr odsAttrs
::mlir::Attribute getInitialValueAttr()
GlobalDefOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::RegionRange odsRegions
::llvm::StringRef getSymName()
::std::optional<::mlir::OperationName > odsOpName
::mlir::UnitAttr getConstantAttr()
::mlir::DictionaryAttr getAttributes()
const Properties & getProperties()
::mlir::Attribute getInitialValue()
::mlir::TypeAttr getTypeAttr()
::mlir::StringAttr getSymNameAttr()
::mlir::UnitAttr getConstantAttr()
::mlir::DictionaryAttr getAttributes()
const Properties & getProperties()
::mlir::SymbolRefAttr getNameRef()
::mlir::RegionRange odsRegions
GlobalReadOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::DictionaryAttr odsAttrs
::std::optional<::mlir::OperationName > odsOpName
::mlir::SymbolRefAttr getNameRefAttr()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::DictionaryAttr getAttributes()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::SymbolRefAttr getNameRefAttr()
::mlir::RegionRange odsRegions
const Properties & getProperties()
::mlir::SymbolRefAttr getNameRef()
::std::optional<::mlir::OperationName > odsOpName
GlobalWriteOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::DictionaryAttr odsAttrs
Common interface for operations that read or write from a global.
void setInitialValue(const ::mlir::Attribute &propValue)
::mlir::StringAttr sym_nameTy
::mlir::UnitAttr constantTy
bool operator!=(const Properties &rhs) const
bool operator==(const Properties &rhs) const
void setType(const ::mlir::TypeAttr &propValue)
auto getInitialValue() const
::mlir::Attribute initial_valueTy
initial_valueTy initial_value
void setSymName(const ::mlir::StringAttr &propValue)
void setConstant(const ::mlir::UnitAttr &propValue)
bool operator!=(const Properties &rhs) const
::mlir::SymbolRefAttr name_refTy
::mlir::UnitAttr constantTy
void setConstant(const ::mlir::UnitAttr &propValue)
bool operator==(const Properties &rhs) const
void setNameRef(const ::mlir::SymbolRefAttr &propValue)
::mlir::SymbolRefAttr name_refTy
bool operator!=(const Properties &rhs) const
bool operator==(const Properties &rhs) const
void setNameRef(const ::mlir::SymbolRefAttr &propValue)