LLZK 0.1.0
Veridise's ZK Language IR
Loading...
Searching...
No Matches
Ops.h.inc
Go to the documentation of this file.
1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* Op Declarations *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* From: Ops.td *|
7|* *|
8\*===----------------------------------------------------------------------===*/
9
10namespace llzk {
11namespace undef {
12class UndefOp;
13} // namespace undef
14} // namespace llzk
15#ifdef GET_OP_CLASSES
16#undef GET_OP_CLASSES
17
18namespace llzk {
19namespace undef {
20
21//===----------------------------------------------------------------------===//
22// ::llzk::undef::UndefOp declarations
23//===----------------------------------------------------------------------===//
24
25namespace detail {
27public:
28protected:
29 ::mlir::DictionaryAttr odsAttrs;
30 ::std::optional<::mlir::OperationName> odsOpName;
31 ::mlir::RegionRange odsRegions;
32public:
33 UndefOpGenericAdaptorBase(::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), odsRegions(regions) { if (odsAttrs)
34 odsOpName.emplace("undef.undef", odsAttrs.getContext());
35 }
36
37 UndefOpGenericAdaptorBase(::mlir::Operation *op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), odsRegions(op->getRegions()) {}
38
39 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
40 return {index, 1};
41 }
42
43 ::mlir::DictionaryAttr getAttributes() {
44 return odsAttrs;
45 }
46
47};
48} // namespace detail
49template <typename RangeT>
51 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
53public:
54 UndefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
55
56 UndefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : UndefOpGenericAdaptor(values, attrs, (properties ? *properties.as<::mlir::EmptyProperties *>() : ::mlir::EmptyProperties{}), regions) {}
57
58 UndefOpGenericAdaptor(RangeT values, const UndefOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
59
60 template <typename LateInst = UndefOp, typename = std::enable_if_t<std::is_same_v<LateInst, UndefOp>>>
61 UndefOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
62
63 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
64 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
65 }
66
67 RangeT getODSOperands(unsigned index) {
68 auto valueRange = getODSOperandIndexAndLength(index);
69 return {std::next(odsOperands.begin(), valueRange.first),
70 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
71 }
72
73 RangeT getOperands() {
74 return odsOperands;
75 }
76
77private:
78 RangeT odsOperands;
79};
80class UndefOpAdaptor : public UndefOpGenericAdaptor<::mlir::ValueRange> {
81public:
84
85 ::llvm::LogicalResult verify(::mlir::Location loc);
86};
87class UndefOp : public ::mlir::Op<UndefOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> {
88public:
89 using Op::Op;
90 using Op::print;
92 template <typename RangeT>
95 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
96 return {};
97 }
98
99 static constexpr ::llvm::StringLiteral getOperationName() {
100 return ::llvm::StringLiteral("undef.undef");
101 }
102
103 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
104 return {index, 1};
105 }
106
107 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
108 auto valueRange = getODSOperandIndexAndLength(index);
109 return {std::next(getOperation()->operand_begin(), valueRange.first),
110 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
111 }
112
113 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
114 return {index, 1};
115 }
116
117 ::mlir::Operation::result_range getODSResults(unsigned index) {
118 auto valueRange = getODSResultIndexAndLength(index);
119 return {std::next(getOperation()->result_begin(), valueRange.first),
120 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
121 }
122
123 ::mlir::TypedValue<::mlir::Type> getRes() {
124 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
125 }
126
127 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
128 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
129 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
130 ::llvm::LogicalResult verifyInvariantsImpl();
131 ::llvm::LogicalResult verifyInvariants();
132 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
133 void print(::mlir::OpAsmPrinter &_odsPrinter);
134 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
135public:
136};
137} // namespace undef
138} // namespace llzk
139MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::undef::UndefOp)
140
141
142#endif // GET_OP_CLASSES
143
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:49
UndefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:54
UndefOpGenericAdaptor(RangeT values, const UndefOpGenericAdaptorBase &base)
Definition Ops.h.inc:58
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:63
UndefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:56
UndefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:54
UndefOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:61
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:67
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:108
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:95
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:99
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:103
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:70
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:83
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:122
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res)
Definition Ops.cpp.inc:53
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:94
UndefOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:93
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:107
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:113
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:117
::mlir::TypedValue<::mlir::Type > getRes()
Definition Ops.h.inc:123
UndefOpAdaptor Adaptor
Definition Ops.h.inc:91
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:87
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:30
::mlir::DictionaryAttr getAttributes()
Definition Ops.h.inc:43
UndefOpGenericAdaptorBase(::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:33
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:39
UndefOpGenericAdaptorBase(::mlir::Operation *op)
Definition Ops.h.inc:37