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
10#if defined(GET_OP_CLASSES) || defined(GET_OP_FWD_DEFINES)
11#undef GET_OP_FWD_DEFINES
12namespace llzk {
13namespace undef {
14class UndefOp;
15} // namespace undef
16} // namespace llzk
17#endif
18
19#ifdef GET_OP_CLASSES
20#undef GET_OP_CLASSES
21
22
23//===----------------------------------------------------------------------===//
24// Local Utility Method Definitions
25//===----------------------------------------------------------------------===//
26
27namespace llzk {
28namespace undef {
29
30//===----------------------------------------------------------------------===//
31// ::llzk::undef::UndefOp declarations
32//===----------------------------------------------------------------------===//
33
34namespace detail {
36public:
37protected:
38 ::mlir::DictionaryAttr odsAttrs;
39 ::std::optional<::mlir::OperationName> odsOpName;
40 ::mlir::RegionRange odsRegions;
41public:
42 UndefOpGenericAdaptorBase(::mlir::DictionaryAttr attrs = nullptr, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {});
43
45
46 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
47 ::mlir::DictionaryAttr getAttributes();
48};
49} // namespace detail
50template <typename RangeT>
52 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
54public:
55 UndefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
56
57 UndefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : UndefOpGenericAdaptor(values, attrs, (properties ? *properties.as<::mlir::EmptyProperties *>() : ::mlir::EmptyProperties{}), regions) {}
58
59 template <typename LateInst = UndefOp, typename = std::enable_if_t<std::is_same_v<LateInst, UndefOp>>>
60 UndefOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
61
62 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
63 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
64 }
65
66 RangeT getODSOperands(unsigned index) {
67 auto valueRange = getODSOperandIndexAndLength(index);
68 return {std::next(odsOperands.begin(), valueRange.first),
69 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
70 }
71
72 RangeT getOperands() {
73 return odsOperands;
74 }
75
76private:
77 RangeT odsOperands;
78};
79class UndefOpAdaptor : public UndefOpGenericAdaptor<::mlir::ValueRange> {
80public:
83
84 ::mlir::LogicalResult verify(::mlir::Location loc);
85};
86class 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> {
87public:
88 using Op::Op;
89 using Op::print;
91 template <typename RangeT>
94 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
95 return {};
96 }
97
98 static constexpr ::llvm::StringLiteral getOperationName() {
99 return ::llvm::StringLiteral("undef.undef");
100 }
101
102 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
103 ::mlir::Operation::operand_range getODSOperands(unsigned index);
104 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index);
105 ::mlir::Operation::result_range getODSResults(unsigned index);
106 ::mlir::Value getRes();
107 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res);
108 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
109 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
110 ::mlir::LogicalResult verifyInvariantsImpl();
111 ::mlir::LogicalResult verifyInvariants();
112 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
113 void print(::mlir::OpAsmPrinter &_odsPrinter);
114 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
115public:
116};
117} // namespace undef
118} // namespace llzk
119MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::undef::UndefOp)
120
121
122#endif // GET_OP_CLASSES
123
::mlir::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:63
UndefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:55
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:62
UndefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:57
UndefOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:60
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:66
UndefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:55
::mlir::Value getRes()
Definition Ops.cpp.inc:87
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:146
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:94
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:98
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.cpp.inc:67
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.cpp.inc:71
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:160
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res)
Definition Ops.cpp.inc:91
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:93
::mlir::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:108
UndefOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:92
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.cpp.inc:81
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.cpp.inc:77
::mlir::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:121
UndefOpAdaptor Adaptor
Definition Ops.h.inc:90
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:125
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:39
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.cpp.inc:52
UndefOpGenericAdaptorBase(::mlir::DictionaryAttr attrs=nullptr, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.cpp.inc:46