Ematch
ematch
Ematch = Dialect('ematch', [GetClassValsOp, GetClassRepresentativeOp, GetClassResultOp, GetClassResultsOp, UnionOp, DedupOp])
module-attribute
GetClassValsOp
Bases: IRDLOperation
Take a value and return all values in its equivalence class.
If the value is an equivalence.class result, return the operands of the class, otherwise return a range containing the value itself.
Source code in xdsl/dialects/ematch.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | |
name = 'ematch.get_class_vals'
class-attribute
instance-attribute
value = operand_def(ValueType)
class-attribute
instance-attribute
result = result_def(RangeType[ValueType])
class-attribute
instance-attribute
assembly_format = '$value attr-dict'
class-attribute
instance-attribute
__init__(value: SSAValue) -> None
Source code in xdsl/dialects/ematch.py
35 36 37 38 39 | |
GetClassRepresentativeOp
Bases: IRDLOperation
Get one of the values in the equivalence class of v.
Source code in xdsl/dialects/ematch.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | |
name = 'ematch.get_class_representative'
class-attribute
instance-attribute
value = operand_def(ValueType)
class-attribute
instance-attribute
result = result_def(ValueType)
class-attribute
instance-attribute
assembly_format = '$value attr-dict'
class-attribute
instance-attribute
__init__(value: SSAValue) -> None
Source code in xdsl/dialects/ematch.py
54 55 56 57 58 | |
GetClassResultOp
Bases: IRDLOperation
Get the equivalence.class result corresponding to the equivalence class of v.
Source code in xdsl/dialects/ematch.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | |
name = 'ematch.get_class_result'
class-attribute
instance-attribute
value = operand_def(ValueType)
class-attribute
instance-attribute
result = result_def(ValueType)
class-attribute
instance-attribute
assembly_format = '$value attr-dict'
class-attribute
instance-attribute
__init__(value: SSAValue) -> None
Source code in xdsl/dialects/ematch.py
73 74 75 76 77 | |
GetClassResultsOp
Bases: IRDLOperation
Get the equivalence.class results corresponding to the equivalence classes of a range of values.
Source code in xdsl/dialects/ematch.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | |
name = 'ematch.get_class_results'
class-attribute
instance-attribute
values = operand_def(RangeType[ValueType])
class-attribute
instance-attribute
result = result_def(RangeType[ValueType])
class-attribute
instance-attribute
assembly_format = '$values attr-dict'
class-attribute
instance-attribute
__init__(values: SSAValue) -> None
Source code in xdsl/dialects/ematch.py
93 94 95 96 97 | |
UnionOp
Bases: IRDLOperation
Merge two values, an operation and a value range, or two value ranges into equivalence class(es).
Supported operand type combinations:
- (value, value): merge two values
- (operation, range
Source code in xdsl/dialects/ematch.py
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | |
name = 'ematch.union'
class-attribute
instance-attribute
lhs = operand_def(ValueType | OperationType | RangeType[ValueType])
class-attribute
instance-attribute
rhs = operand_def(ValueType | RangeType[ValueType])
class-attribute
instance-attribute
assembly_format = '$lhs `:` type($lhs) `,` $rhs `:` type($rhs) attr-dict'
class-attribute
instance-attribute
__init__(lhs: SSAValue, rhs: SSAValue) -> None
Source code in xdsl/dialects/ematch.py
118 119 | |
DedupOp
Bases: IRDLOperation
Check if the operation already exists in the hashcons.
If so, remove the new one and return the existing one.
Source code in xdsl/dialects/ematch.py
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | |
name = 'ematch.dedup'
class-attribute
instance-attribute
input_op = operand_def(OperationType)
class-attribute
instance-attribute
result_op = result_def(OperationType)
class-attribute
instance-attribute
assembly_format = '$input_op attr-dict'
class-attribute
instance-attribute
__init__(input_op: SSAValue) -> None
Source code in xdsl/dialects/ematch.py
136 137 138 139 140 | |