C++ API

The C++ reference is generated from header comments using Doxygen and rendered through Breathe. Use the directives below to expose additional symbols, or browse the auto-generated namespace listings.

mlir::equivalence

namespace equivalence

Typedefs

using NodeCostFn = std::function<int64_t(Operation*)>

A NodeCostFn takes an Operation* and returns its base cost.

Return -1 to indicate “unresolvable / infinitely expensive”.

using CostReductionFn = std::function<int64_t(int64_t baseCost, ArrayRef<int64_t> childCosts)>

A CostReductionFn takes (baseCost, childCosts) and returns the combined cost, or -1 if unresolvable.

Functions

std::unique_ptr<::mlir::Pass> createEquivalenceExtract()
std::unique_ptr<::mlir::Pass> createEquivalenceExtract(EquivalenceExtractOptions options)
std::unique_ptr<::mlir::Pass> createEquivalenceGraphSize()
std::unique_ptr<::mlir::Pass> createEquivalenceInsertGraph()
std::unique_ptr<::mlir::Pass> createEquivalenceRestoreInvariants()
std::unique_ptr<::mlir::Pass> createEquivalenceSelectConstants()
std::unique_ptr<::mlir::Pass> createEquivalenceSelectGreedy()
std::unique_ptr<::mlir::Pass> createEquivalenceSelectGreedy(EquivalenceSelectGreedyOptions options)
std::unique_ptr<::mlir::Pass> createEquivalenceSelectIlp()
std::unique_ptr<::mlir::Pass> createEquivalenceSelectIlp(EquivalenceSelectIlpOptions options)
inline void registerEquivalenceExtract()
inline void registerEquivalenceExtractPass()
inline void registerEquivalenceGraphSize()
inline void registerEquivalenceGraphSizePass()
inline void registerEquivalenceInsertGraph()
inline void registerEquivalenceInsertGraphPass()
inline void registerEquivalenceRestoreInvariants()
inline void registerEquivalenceRestoreInvariantsPass()
inline void registerEquivalenceSelectConstants()
inline void registerEquivalenceSelectConstantsPass()
inline void registerEquivalenceSelectGreedy()
inline void registerEquivalenceSelectGreedyPass()
inline void registerEquivalenceSelectIlp()
inline void registerEquivalenceSelectIlpPass()
inline void registerEquivalencePasses()
void insertNestedGraphs(Region &region, bool insertSingleElementEqs)

Wrap region’s single-block body in a GraphOp, then recurse into the single-block regions of speculatable operations inside it, wrapping each in its own nested graph.

The region’s terminator operands become the graph outputs; the terminator is replaced by a YieldOp inside the graph and a clone of it (now consuming the graph’s results) is appended after the graph. No-op if region is not single-block. If insertSingleElementEqs is true, all values are wrapped in ClassOps.

LogicalResult insertGraphInFunction(FunctionOpInterface funcOp, bool insertSingleElementEqs)

Transform a function by wrapping its body in a GraphOp.

If insertSingleElementEqs is true, all values are wrapped in ClassOps. Returns success if the transformation was successful.

GraphSize computeGraphSize(GraphOp graphOp)

Compute the number of e-classes and e-nodes in a GraphOp.

Each ClassOp is an e-class. Each result of a non-ClassOp is an e-node; results that are not already wrapped in a (single-use) ClassOp count as an implicit e-class too.

inline int64_t costReductionSum(int64_t baseCost, ArrayRef<int64_t> childCosts)
inline int64_t costReductionMax(int64_t baseCost, ArrayRef<int64_t> childCosts)
DenseMap<Operation*, int64_t> computeGraphCosts(GraphOp graphOp, const NodeCostFn &nodeCostFn, llvm::StringRef costAttributeName = "equivalence.cost", const CostReductionFn &reductionFn = costReductionSum)

Compute total costs for all operations in a GraphOp using bottom-up fixed-point iteration.

Returns the cost map. For each ClassOp, the cost is the minimum among its operands. For other ops, the cost is computed via the reductionFn applied to base cost and child costs.

inline DenseMap<Operation*, int64_t> computeGraphCosts(GraphOp graphOp, int64_t defaultCost, llvm::StringRef costAttributeName = "equivalence.cost", const CostReductionFn &reductionFn = costReductionSum)

Convenience overload using a uniform default cost for all operations.

void selectGreedy(GraphOp graphOp, const NodeCostFn &nodeCostFn, llvm::StringRef costAttributeName = "equivalence.cost", const CostReductionFn &reductionFn = costReductionSum)

Run greedy cost-based selection on a single GraphOp.

Assigns min_cost_index attributes to ClassOps based on minimum-cost operands.

inline void selectGreedy(GraphOp graphOp, int64_t defaultCost, llvm::StringRef costAttributeName = "equivalence.cost", const CostReductionFn &reductionFn = costReductionSum)

Convenience overload using a uniform default cost for all operations.

void selectConstants(GraphOp graphOp)

Run constant-driven selection on a single GraphOp.

For each ClassOp that does not already have a min_cost_index and that has a constant operand, selects that constant by setting min_cost_index. Classes without a constant operand or that already have a selection are left untouched.

void clearSelection(GraphOp graphOp, llvm::StringRef costAttributeName = "equivalence.cost")

Clear all selection state from a GraphOp: remove min_cost_index from ClassOps and the cost attribute from all other operations.

void extractFromGraph(GraphOp graphOp)

Extract selected nodes from equivalence classes in a GraphOp.

For each ClassOp with min_cost_index set, replaces its result with the selected operand, erases non-selected operand ops, and removes the cost attribute. ClassOps with no uses are erased entirely. ClassOps without min_cost_index are left untouched.

void inlineGraphOp(GraphOp graphOp)

Inline a GraphOp by splicing its body into the parent block, replacing graph results with yielded values, and erasing the GraphOp.

SmallVector<Operation*> computeSelectedTopoSort(GraphOp graphOp)

Compute topological sort of operations in a GraphOp, considering only operations selected by min_cost_index attributes on ClassOps.

Returns the sorted operations (excluding YieldOp).

LogicalResult restoreClassInvariants(Operation *root)

Restore the equivalence-class normal form under root by applying the ClassOp canonicalization patterns to a genuine fixpoint (no greedy-driver iteration or rewrite limit).

This re-establishes the invariants that verify() deliberately does not enforce: a class result is never an operand of another class (nested classes are merged), a class’s operands are used only by that class (external uses are rerouted through the class result), and operands are unique. Folding and constant CSE are disabled so that optimizing rewrites (e.g. collapsing single-element classes, hoisting constants) do not destroy e-graph structure callers depend on. Returns failure if the greedy driver fails.

static LoopLikeOpInterface getEnclosingLoop(GraphOp op)
static int64_t getNodeBaseCost(Operation *op, const NodeCostFn &nodeCostFn, llvm::StringRef costAttributeName)
static bool isFreeLeaf(Value v, Region *graphRegion)
static int64_t computeNodeCost(Operation *op, Region *graphRegion, const NodeCostFn &nodeCostFn, DenseMap<Operation*, int64_t> &opCosts, const CostReductionFn &reductionFn, llvm::StringRef costAttributeName)
struct EquivalenceExtractOptions
#include <EquivalenceDialect.h>

Public Members

bool removeGraphs = false
struct EquivalenceSelectGreedyOptions
#include <EquivalenceDialect.h>

Public Members

std::string costFile
int defaultCost = -1
std::string costAttributeName = "equivalence.cost"
struct EquivalenceSelectIlpOptions
#include <EquivalenceDialect.h>

Public Members

int defaultCost = -1
std::string costAttributeName = "equivalence.cost"
bool warmStart = true
struct GraphSize
#include <EquivalenceUtils.h>

The size of a GraphOp, expressed as the number of e-classes and e-nodes it contains.

Public Members

int classes = 0
int nodes = 0
class CostAttr : public mlir::Attribute::AttrBase<CostAttr, ::mlir::Attribute, detail::CostAttrStorage>

Public Functions

void print(::mlir::AsmPrinter &odsPrinter) const
int64_t getValue() const

Public Static Functions

static CostAttr get(::mlir::MLIRContext *context, int64_t value)
static inline ::llvm::StringLiteral getMnemonic()
static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType)

Public Static Attributes

static ::llvm::StringLiteral name = "equivalence.cost"
static ::llvm::StringLiteral dialectName = "equivalence"
class EquivalenceDialect : public mlir::Dialect

A dialect for representing e-graphs as MLIR operations.

The equivalence dialect represents e-graphs: equivalence.graph holds an unordered region of operations, and equivalence.class groups values that are known to be equivalent.

Public Functions

~EquivalenceDialect() override
::mlir::Attribute parseAttribute(::mlir::DialectAsmParser &parser, ::mlir::Type type) const override

Parse an attribute registered to this dialect.

void printAttribute(::mlir::Attribute attr, ::mlir::DialectAsmPrinter &os) const override

Print an attribute registered to this dialect.

void registerAttributes()

Public Static Functions

static inline ::llvm::StringLiteral getDialectNamespace()

Friends

friend class ::mlir::MLIRContext
template<typename RangeT>
class ClassOpGenericAdaptor : public mlir::equivalence::detail::ClassOpGenericAdaptorBase

Public Functions

inline ClassOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {})
inline ClassOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {})
inline ClassOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs)
inline ClassOpGenericAdaptor(RangeT values, const ClassOpGenericAdaptorBase &base)
template<typename LateInst = ClassOp, typename = std::enable_if_t<std::is_same_v<LateInst, ClassOp>>>
inline ClassOpGenericAdaptor(RangeT values, LateInst op)
inline std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index)
inline RangeT getODSOperands(unsigned index)
inline RangeT getInputs()
inline ValueT getLeader()
inline RangeT getOperands()
class ClassOpAdaptor : public mlir::equivalence::ClassOpGenericAdaptor<::mlir::ValueRange>

Public Functions

ClassOpAdaptor(ClassOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
inline ClassOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {})
inline ClassOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {})
inline ClassOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs)
inline ClassOpGenericAdaptor(RangeT values, const ClassOpGenericAdaptorBase &base)
template<typename LateInst = ClassOp, typename = std::enable_if_t<std::is_same_v<LateInst, ClassOp>>>
inline ClassOpGenericAdaptor(RangeT values, LateInst op)
class ClassOp : public mlir::Op<ClassOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::VariadicOperands, ::mlir::OpTrait::AttrSizedOperandSegments, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType>

Public Types

using Adaptor = ClassOpAdaptor
template<typename RangeT>
using GenericAdaptor = ClassOpGenericAdaptor<RangeT>
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>
using Properties = FoldAdaptor::Properties

Public Functions

inline ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames()
inline ::mlir::StringAttr getMinCostIndexAttrName()
inline ::mlir::StringAttr getOperandSegmentSizesAttrName()
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index)
inline ::mlir::Operation::operand_range getODSOperands(unsigned index)
inline ::mlir::Operation::operand_range getInputs()
inline ::mlir::TypedValue<::mlir::Type> getLeader()
::mlir::MutableOperandRange getInputsMutable()
::mlir::MutableOperandRange getLeaderMutable()
inline std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index)
inline ::mlir::Operation::result_range getODSResults(unsigned index)
inline ::mlir::TypedValue<::mlir::Type> getResult()
void writeProperties(::mlir::DialectBytecodeWriter &writer)
inline ::mlir::IntegerAttr getMinCostIndexAttr()
::std::optional<uint64_t> getMinCostIndex()
inline void setMinCostIndexAttr(::mlir::IntegerAttr attr)
void setMinCostIndex(::std::optional<uint64_t> attrValue)
inline ::mlir::Attribute removeMinCostIndexAttr()
::llvm::LogicalResult verifyInvariantsImpl()
::llvm::LogicalResult verifyInvariants()
::llvm::LogicalResult verify()
::mlir::OpFoldResult fold(FoldAdaptor adaptor)
void print(::mlir::OpAsmPrinter &_odsPrinter)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects)

Public Static Functions

static inline ::mlir::StringAttr getMinCostIndexAttrName(::mlir::OperationName name)
static inline ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name)
static inline ::llvm::StringLiteral getOperationName()
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static llvm::hash_code computePropertiesHash(const Properties &prop)
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::ValueRange inputs, ::mlir::Value leader, ::mlir::IntegerAttr min_cost_index)
static ClassOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::ValueRange inputs, ::mlir::Value leader, ::mlir::IntegerAttr min_cost_index)
static ClassOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::ValueRange inputs, ::mlir::Value leader, ::mlir::IntegerAttr min_cost_index)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange inputs, ::mlir::Value leader, ::mlir::IntegerAttr min_cost_index)
static ClassOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange inputs, ::mlir::Value leader, ::mlir::IntegerAttr min_cost_index)
static ClassOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange inputs, ::mlir::Value leader, ::mlir::IntegerAttr min_cost_index)
static void build(::mlir::OpBuilder&, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static ClassOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static ClassOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static void build(::mlir::OpBuilder&, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static ClassOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static ClassOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange inputs, ::mlir::Value leader, ::mlir::IntegerAttr min_cost_index)
static ClassOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange inputs, ::mlir::Value leader, ::mlir::IntegerAttr min_cost_index)
static ClassOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange inputs, ::mlir::Value leader, ::mlir::IntegerAttr min_cost_index)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static ClassOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static ClassOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static ClassOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static ClassOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static ::llvm::LogicalResult canonicalize(ClassOp op, ::mlir::PatternRewriter &rewriter)
static void getCanonicalizationPatterns(::mlir::RewritePatternSet &results, ::mlir::MLIRContext *context)
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)

Public Static Attributes

static int odsIndex_inputs = 0
static int odsIndex_leader = 1
template<typename RangeT>
class GraphOpGenericAdaptor : public mlir::equivalence::detail::GraphOpGenericAdaptorBase

Public Functions

inline GraphOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {})
inline GraphOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {})
inline GraphOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr)
inline GraphOpGenericAdaptor(RangeT values, const GraphOpGenericAdaptorBase &base)
template<typename LateInst = GraphOp, typename = std::enable_if_t<std::is_same_v<LateInst, GraphOp>>>
inline GraphOpGenericAdaptor(RangeT values, LateInst op)
inline std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index)
inline RangeT getODSOperands(unsigned index)
inline RangeT getOperands()
class GraphOpAdaptor : public mlir::equivalence::GraphOpGenericAdaptor<::mlir::ValueRange>

Public Functions

GraphOpAdaptor(GraphOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
inline GraphOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {})
inline GraphOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {})
inline GraphOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr)
inline GraphOpGenericAdaptor(RangeT values, const GraphOpGenericAdaptorBase &base)
template<typename LateInst = GraphOp, typename = std::enable_if_t<std::is_same_v<LateInst, GraphOp>>>
inline GraphOpGenericAdaptor(RangeT values, LateInst op)
class GraphOp : public mlir::Op<GraphOp, ::mlir::OpTrait::OneRegion, ::mlir::OpTrait::VariadicResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::SingleBlock, ::mlir::OpTrait::SingleBlockImplicitTerminator<YieldOp>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::RegionKindInterface::Trait, ::mlir::LoopLikeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::RecursivelySpeculatableImplTrait>

Public Types

using Adaptor = GraphOpAdaptor
template<typename RangeT>
using GenericAdaptor = GraphOpGenericAdaptor<RangeT>
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>
using Properties = FoldAdaptor::Properties

Public Functions

inline ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames()
inline std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index)
inline ::mlir::Operation::operand_range getODSOperands(unsigned index)
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index)
inline ::mlir::Operation::result_range getODSResults(unsigned index)
inline ::mlir::Operation::result_range getOutputs()
inline ::mlir::Region &getBody()
::llvm::LogicalResult verifyInvariantsImpl()
::llvm::LogicalResult verifyInvariants()
bool isDefinedOutsideOfLoop(::mlir::Value value)
::llvm::SmallVector<::mlir::Region*> getLoopRegions()
void moveOutOfLoop(::mlir::Operation *op)
void print(::mlir::OpAsmPrinter &_odsPrinter)

Public Static Functions

static inline ::llvm::StringLiteral getOperationName()
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static llvm::hash_code computePropertiesHash(const Properties &prop)
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange outputs)
static GraphOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange outputs)
static GraphOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange outputs)
static void build(::mlir::OpBuilder&, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static GraphOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static GraphOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static void build(::mlir::OpBuilder&, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static GraphOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static GraphOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static ::mlir::RegionKind getRegionKind(unsigned index)
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
template<typename RangeT>
class YieldOpGenericAdaptor : public mlir::equivalence::detail::YieldOpGenericAdaptorBase

Public Functions

inline YieldOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {})
inline YieldOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {})
inline YieldOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr)
inline YieldOpGenericAdaptor(RangeT values, const YieldOpGenericAdaptorBase &base)
template<typename LateInst = YieldOp, typename = std::enable_if_t<std::is_same_v<LateInst, YieldOp>>>
inline YieldOpGenericAdaptor(RangeT values, LateInst op)
inline std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index)
inline RangeT getODSOperands(unsigned index)
inline RangeT getValues()
inline RangeT getOperands()
class YieldOpAdaptor : public mlir::equivalence::YieldOpGenericAdaptor<::mlir::ValueRange>

Public Functions

YieldOpAdaptor(YieldOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
inline YieldOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {})
inline YieldOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {})
inline YieldOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr)
inline YieldOpGenericAdaptor(RangeT values, const YieldOpGenericAdaptorBase &base)
template<typename LateInst = YieldOp, typename = std::enable_if_t<std::is_same_v<LateInst, YieldOp>>>
inline YieldOpGenericAdaptor(RangeT values, LateInst op)
class YieldOp : public mlir::Op<YieldOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::VariadicOperands, ::mlir::OpTrait::HasParent<GraphOp>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::RegionBranchTerminatorOpInterface::Trait, ::mlir::OpTrait::ReturnLike, ::mlir::OpTrait::IsTerminator>

Public Types

using Adaptor = YieldOpAdaptor
template<typename RangeT>
using GenericAdaptor = YieldOpGenericAdaptor<RangeT>
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>
using Properties = FoldAdaptor::Properties

Public Functions

inline ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames()
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index)
inline ::mlir::Operation::operand_range getODSOperands(unsigned index)
inline ::mlir::Operation::operand_range getValues()
::mlir::MutableOperandRange getValuesMutable()
inline std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index)
inline ::mlir::Operation::result_range getODSResults(unsigned index)
::llvm::LogicalResult verifyInvariantsImpl()
::llvm::LogicalResult verifyInvariants()
void print(::mlir::OpAsmPrinter &_odsPrinter)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects)

Public Static Functions

static inline ::llvm::StringLiteral getOperationName()
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static llvm::hash_code computePropertiesHash(const Properties &prop)
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState)
static YieldOp create(::mlir::OpBuilder &builder, ::mlir::Location location)
static YieldOp create(::mlir::ImplicitLocOpBuilder &builder)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange values)
static YieldOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange values)
static YieldOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange values)
static void build(::mlir::OpBuilder&, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static YieldOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static YieldOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static void build(::mlir::OpBuilder&, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static YieldOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static YieldOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)

Public Static Attributes

static int odsIndex_values = 0
namespace impl

Functions

std::unique_ptr<::mlir::Pass> createEquivalenceExtract()
std::unique_ptr<::mlir::Pass> createEquivalenceExtract(EquivalenceExtractOptions options)
std::unique_ptr<::mlir::Pass> createEquivalenceGraphSize()
std::unique_ptr<::mlir::Pass> createEquivalenceInsertGraph()
std::unique_ptr<::mlir::Pass> createEquivalenceRestoreInvariants()
std::unique_ptr<::mlir::Pass> createEquivalenceSelectConstants()
std::unique_ptr<::mlir::Pass> createEquivalenceSelectGreedy()
std::unique_ptr<::mlir::Pass> createEquivalenceSelectGreedy(EquivalenceSelectGreedyOptions options)
std::unique_ptr<::mlir::Pass> createEquivalenceSelectIlp()
std::unique_ptr<::mlir::Pass> createEquivalenceSelectIlp(EquivalenceSelectIlpOptions options)
template<typename DerivedT>
class EquivalenceExtractBase : public mlir::OperationPass<::mlir::ModuleOp>

Public Types

using Base = EquivalenceExtractBase

Public Functions

inline EquivalenceExtractBase()
inline EquivalenceExtractBase(const EquivalenceExtractBase &other)
EquivalenceExtractBase &operator=(const EquivalenceExtractBase&) = delete
EquivalenceExtractBase(EquivalenceExtractBase&&) = delete
EquivalenceExtractBase &operator=(EquivalenceExtractBase&&) = delete
~EquivalenceExtractBase() = default
inline ::llvm::StringRef getArgument() const override
inline ::llvm::StringRef getDescription() const override
inline ::llvm::StringRef getName() const override
inline std::unique_ptr<::mlir::Pass> clonePass() const override

A clone method to create a copy of this pass.

inline void getDependentDialects(::mlir::DialectRegistry &registry) const override

Return the dialect that must be loaded in the context before this pass.

inline EquivalenceExtractBase(EquivalenceExtractOptions options)

Explicitly declare the TypeID for this class. We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Public Static Functions

static inline ::llvm::StringLiteral getArgumentName()

Returns the command-line argument attached to this pass.

static inline ::llvm::StringLiteral getPassName()

Returns the derived pass name.

static inline bool classof(const ::mlir::Pass *pass)

Support isa/dyn_cast functionality for the derived pass class.

template<typename DerivedT>
class EquivalenceGraphSizeBase : public mlir::OperationPass<::mlir::ModuleOp>

Public Types

using Base = EquivalenceGraphSizeBase

Public Functions

inline EquivalenceGraphSizeBase()
inline EquivalenceGraphSizeBase(const EquivalenceGraphSizeBase &other)
EquivalenceGraphSizeBase &operator=(const EquivalenceGraphSizeBase&) = delete
EquivalenceGraphSizeBase(EquivalenceGraphSizeBase&&) = delete
EquivalenceGraphSizeBase &operator=(EquivalenceGraphSizeBase&&) = delete
~EquivalenceGraphSizeBase() = default
inline ::llvm::StringRef getArgument() const override
inline ::llvm::StringRef getDescription() const override
inline ::llvm::StringRef getName() const override
inline std::unique_ptr<::mlir::Pass> clonePass() const override

A clone method to create a copy of this pass.

inline void getDependentDialects(::mlir::DialectRegistry &registry) const override

Return the dialect that must be loaded in the context before this pass.

Public Static Functions

static inline ::llvm::StringLiteral getArgumentName()

Returns the command-line argument attached to this pass.

static inline ::llvm::StringLiteral getPassName()

Returns the derived pass name.

static inline bool classof(const ::mlir::Pass *pass)

Support isa/dyn_cast functionality for the derived pass class.

template<typename DerivedT>
class EquivalenceInsertGraphBase : public mlir::OperationPass<::mlir::ModuleOp>

Public Types

using Base = EquivalenceInsertGraphBase

Public Functions

inline EquivalenceInsertGraphBase()
inline EquivalenceInsertGraphBase(const EquivalenceInsertGraphBase &other)
EquivalenceInsertGraphBase &operator=(const EquivalenceInsertGraphBase&) = delete
EquivalenceInsertGraphBase(EquivalenceInsertGraphBase&&) = delete
EquivalenceInsertGraphBase &operator=(EquivalenceInsertGraphBase&&) = delete
~EquivalenceInsertGraphBase() = default
inline ::llvm::StringRef getArgument() const override
inline ::llvm::StringRef getDescription() const override
inline ::llvm::StringRef getName() const override
inline std::unique_ptr<::mlir::Pass> clonePass() const override

A clone method to create a copy of this pass.

inline void getDependentDialects(::mlir::DialectRegistry &registry) const override

Return the dialect that must be loaded in the context before this pass.

Public Static Functions

static inline ::llvm::StringLiteral getArgumentName()

Returns the command-line argument attached to this pass.

static inline ::llvm::StringLiteral getPassName()

Returns the derived pass name.

static inline bool classof(const ::mlir::Pass *pass)

Support isa/dyn_cast functionality for the derived pass class.

template<typename DerivedT>
class EquivalenceRestoreInvariantsBase : public mlir::OperationPass<::mlir::ModuleOp>

Public Types

using Base = EquivalenceRestoreInvariantsBase

Public Functions

inline EquivalenceRestoreInvariantsBase()
inline EquivalenceRestoreInvariantsBase(const EquivalenceRestoreInvariantsBase &other)
EquivalenceRestoreInvariantsBase &operator=(const EquivalenceRestoreInvariantsBase&) = delete
EquivalenceRestoreInvariantsBase(EquivalenceRestoreInvariantsBase&&) = delete
EquivalenceRestoreInvariantsBase &operator=(EquivalenceRestoreInvariantsBase&&) = delete
~EquivalenceRestoreInvariantsBase() = default
inline ::llvm::StringRef getArgument() const override
inline ::llvm::StringRef getDescription() const override
inline ::llvm::StringRef getName() const override
inline std::unique_ptr<::mlir::Pass> clonePass() const override

A clone method to create a copy of this pass.

inline void getDependentDialects(::mlir::DialectRegistry &registry) const override

Return the dialect that must be loaded in the context before this pass.

Public Static Functions

static inline ::llvm::StringLiteral getArgumentName()

Returns the command-line argument attached to this pass.

static inline ::llvm::StringLiteral getPassName()

Returns the derived pass name.

static inline bool classof(const ::mlir::Pass *pass)

Support isa/dyn_cast functionality for the derived pass class.

template<typename DerivedT>
class EquivalenceSelectConstantsBase : public mlir::OperationPass<::mlir::ModuleOp>

Public Types

using Base = EquivalenceSelectConstantsBase

Public Functions

inline EquivalenceSelectConstantsBase()
inline EquivalenceSelectConstantsBase(const EquivalenceSelectConstantsBase &other)
EquivalenceSelectConstantsBase &operator=(const EquivalenceSelectConstantsBase&) = delete
EquivalenceSelectConstantsBase(EquivalenceSelectConstantsBase&&) = delete
EquivalenceSelectConstantsBase &operator=(EquivalenceSelectConstantsBase&&) = delete
~EquivalenceSelectConstantsBase() = default
inline ::llvm::StringRef getArgument() const override
inline ::llvm::StringRef getDescription() const override
inline ::llvm::StringRef getName() const override
inline std::unique_ptr<::mlir::Pass> clonePass() const override

A clone method to create a copy of this pass.

inline void getDependentDialects(::mlir::DialectRegistry &registry) const override

Return the dialect that must be loaded in the context before this pass.

Public Static Functions

static inline ::llvm::StringLiteral getArgumentName()

Returns the command-line argument attached to this pass.

static inline ::llvm::StringLiteral getPassName()

Returns the derived pass name.

static inline bool classof(const ::mlir::Pass *pass)

Support isa/dyn_cast functionality for the derived pass class.

template<typename DerivedT>
class EquivalenceSelectGreedyBase : public mlir::OperationPass<::mlir::ModuleOp>

Public Types

using Base = EquivalenceSelectGreedyBase

Public Functions

inline EquivalenceSelectGreedyBase()
inline EquivalenceSelectGreedyBase(const EquivalenceSelectGreedyBase &other)
EquivalenceSelectGreedyBase &operator=(const EquivalenceSelectGreedyBase&) = delete
EquivalenceSelectGreedyBase(EquivalenceSelectGreedyBase&&) = delete
EquivalenceSelectGreedyBase &operator=(EquivalenceSelectGreedyBase&&) = delete
~EquivalenceSelectGreedyBase() = default
inline ::llvm::StringRef getArgument() const override
inline ::llvm::StringRef getDescription() const override
inline ::llvm::StringRef getName() const override
inline std::unique_ptr<::mlir::Pass> clonePass() const override

A clone method to create a copy of this pass.

inline void getDependentDialects(::mlir::DialectRegistry &registry) const override

Return the dialect that must be loaded in the context before this pass.

inline EquivalenceSelectGreedyBase(EquivalenceSelectGreedyOptions options)

Explicitly declare the TypeID for this class. We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Public Static Functions

static inline ::llvm::StringLiteral getArgumentName()

Returns the command-line argument attached to this pass.

static inline ::llvm::StringLiteral getPassName()

Returns the derived pass name.

static inline bool classof(const ::mlir::Pass *pass)

Support isa/dyn_cast functionality for the derived pass class.

template<typename DerivedT>
class EquivalenceSelectIlpBase : public mlir::OperationPass<::mlir::ModuleOp>

Public Types

using Base = EquivalenceSelectIlpBase

Public Functions

inline EquivalenceSelectIlpBase()
inline EquivalenceSelectIlpBase(const EquivalenceSelectIlpBase &other)
EquivalenceSelectIlpBase &operator=(const EquivalenceSelectIlpBase&) = delete
EquivalenceSelectIlpBase(EquivalenceSelectIlpBase&&) = delete
EquivalenceSelectIlpBase &operator=(EquivalenceSelectIlpBase&&) = delete
~EquivalenceSelectIlpBase() = default
inline ::llvm::StringRef getArgument() const override
inline ::llvm::StringRef getDescription() const override
inline ::llvm::StringRef getName() const override
inline std::unique_ptr<::mlir::Pass> clonePass() const override

A clone method to create a copy of this pass.

inline void getDependentDialects(::mlir::DialectRegistry &registry) const override

Return the dialect that must be loaded in the context before this pass.

inline EquivalenceSelectIlpBase(EquivalenceSelectIlpOptions options)

Explicitly declare the TypeID for this class. We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Public Static Functions

static inline ::llvm::StringLiteral getArgumentName()

Returns the command-line argument attached to this pass.

static inline ::llvm::StringLiteral getPassName()

Returns the derived pass name.

static inline bool classof(const ::mlir::Pass *pass)

Support isa/dyn_cast functionality for the derived pass class.

namespace detail
struct CostAttrStorage : public mlir::AttributeStorage

Public Types

using KeyTy = std::tuple<int64_t>

Public Functions

inline CostAttrStorage(int64_t value)
inline KeyTy getAsKey() const
inline bool operator==(const KeyTy &tblgenKey) const

Public Members

int64_t value

Public Static Functions

static inline ::llvm::hash_code hashKey(const KeyTy &tblgenKey)
static inline CostAttrStorage *construct(::mlir::AttributeStorageAllocator &allocator, KeyTy &&tblgenKey)
class ClassOpGenericAdaptorBase

Subclassed by mlir::equivalence::ClassOpGenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > >, mlir::equivalence::ClassOpGenericAdaptor<::mlir::ValueRange >, mlir::equivalence::ClassOpGenericAdaptor< RangeT >

Public Functions

inline ClassOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {})
ClassOpGenericAdaptorBase(ClassOp op)
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
inline const Properties &getProperties()
inline ::mlir::DictionaryAttr getAttributes()
inline ::mlir::IntegerAttr getMinCostIndexAttr()
::std::optional<uint64_t> getMinCostIndex()
struct Properties

Public Types

using min_cost_indexTy = ::mlir::IntegerAttr
using operandSegmentSizesTy = std::array<int32_t, 2>

Public Functions

inline auto getMinCostIndex() const
inline void setMinCostIndex(const ::mlir::IntegerAttr &propValue)
inline ::llvm::ArrayRef<int32_t> getOperandSegmentSizes() const
inline void setOperandSegmentSizes(::llvm::ArrayRef<int32_t> propValue)
inline bool operator==(const Properties &rhs) const
inline bool operator!=(const Properties &rhs) const

Public Members

min_cost_indexTy min_cost_index
operandSegmentSizesTy operandSegmentSizes
class GraphOpGenericAdaptorBase

Subclassed by mlir::equivalence::GraphOpGenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > >, mlir::equivalence::GraphOpGenericAdaptor<::mlir::ValueRange >, mlir::equivalence::GraphOpGenericAdaptor< RangeT >

Public Types

using Properties = ::mlir::EmptyProperties

Public Functions

inline GraphOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {})
GraphOpGenericAdaptorBase(GraphOp op)
inline std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
inline const Properties &getProperties()
inline ::mlir::DictionaryAttr getAttributes()
inline ::mlir::Region &getBody()
inline ::mlir::RegionRange getRegions()
class YieldOpGenericAdaptorBase

Subclassed by mlir::equivalence::YieldOpGenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > >, mlir::equivalence::YieldOpGenericAdaptor<::mlir::ValueRange >, mlir::equivalence::YieldOpGenericAdaptor< RangeT >

Public Types

using Properties = ::mlir::EmptyProperties

Public Functions

inline YieldOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {})
YieldOpGenericAdaptorBase(YieldOp op)
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
inline const Properties &getProperties()
inline ::mlir::DictionaryAttr getAttributes()

mlir::ematch

namespace ematch

Typedefs

using ScopeId = mlir::Region*

A scope is the body region of an equivalence.graph.

A null scope means “outside every graph”.

using AllocatorTy = llvm::RecyclingAllocator<llvm::BumpPtrAllocator, mlir::ematch::MutableScopedHashTableVal<Operation*, Operation*>>

Allocator type for hash consing.

using ScopedMapTy = MutableScopedHashTable<Operation*, Operation*, SimpleOperationInfo, AllocatorTy>

Scoped hash table type for operation deduplication.

Functions

void registerEmatchRewrites(PDLPatternModule &pdlPattern)

Register the e-class traversal helpers used by the matcher bytecode to walk the e-graph (get_class_vals, get_class_representative, …) and the are_equivalent constraint.

bool isEquivalenceDialectOp(Operation *op)

Operations in the equivalence dialect are skipped when walking the IR for matching: they form the e-graph scaffolding, not user payload.

std::unique_ptr<::mlir::Pass> createApplyPDLInterpPass()
std::unique_ptr<::mlir::Pass> createConvertEmatchToMatchPass()
std::unique_ptr<::mlir::Pass> createConvertEmatchToPDLInterpPass()
std::unique_ptr<::mlir::Pass> createConvertPDLToEmatchPDLInterpPass()
std::unique_ptr<::mlir::Pass> createEmatchSaturateBenchmarkPass()
std::unique_ptr<::mlir::Pass> createEmatchSaturateBenchmarkPass(EmatchSaturateBenchmarkPassOptions options)
std::unique_ptr<::mlir::Pass> createEmatchSaturatePass()
std::unique_ptr<::mlir::Pass> createEmatchSaturatePass(EmatchSaturatePassOptions options)
std::unique_ptr<::mlir::Pass> createEmatchifyPass()
std::unique_ptr<::mlir::Pass> createEquivalenceGraphContainsPass()
std::unique_ptr<::mlir::Pass> createEquivalenceGraphContainsPass(EquivalenceGraphContainsPassOptions options)
inline void registerApplyPDLInterpPass()
inline void registerApplyPDLInterpPassPass()
inline void registerConvertEmatchToMatchPass()
inline void registerConvertEmatchToMatchPassPass()
inline void registerConvertEmatchToPDLInterpPass()
inline void registerConvertEmatchToPDLInterpPassPass()
inline void registerConvertPDLToEmatchPDLInterpPass()
inline void registerConvertPDLToEmatchPDLInterpPassPass()
inline void registerEmatchSaturateBenchmarkPass()
inline void registerEmatchSaturateBenchmarkPassPass()
inline void registerEmatchSaturatePass()
inline void registerEmatchSaturatePassPass()
inline void registerEmatchifyPass()
inline void registerEmatchifyPassPass()
inline void registerEquivalenceGraphContainsPass()
inline void registerEquivalenceGraphContainsPassPass()
inline void registerEmatchPasses()
void convertEmatchOpsToApplyRewrites(ModuleOp module)

Convert all ematch operations in the given module to their corresponding pdl_interp.apply_rewrite operations.

Each ematch op (get_class_vals, get_class_representative, get_class_result, get_class_results, union, dedup) is replaced by a pdl_interp.apply_rewrite with the same name and signature.

void ematchifyMatchPatterns(ModuleOp module)

Rewrite the match.matcher and match.rewriter ops in the given module, as produced by convert-pdl-to-match, so that they match and rewrite over the e-classes of an e-graph.

Expects one matcher per pattern, i.e. it runs before the matchers are combined. The e-matching logic is expressed with ematch ops, which convertEmatchOpsToMatch lowers.

void convertEmatchOpsToMatch(ModuleOp module)

Lower the ematch ops in the match.matcher and match.rewriter ops of the given module to match.apply_native_rewrite/apply_native_constraint ops with the names under which runSaturation registers their implementations.

LogicalResult convertPDLToEmatchPDLInterp(ModuleOp module)

Lower the pdl.pattern ops in the given module to e-matching pdl_interp by going through the match dialect: convert-pdl-to-match, ematchify, match-combine-matchers (with deferred loops), convert-ematch-to-match and convert-match-to-pdl-interp.

Before the ematch ops are lowered, the e-class helpers are moved to their first use.

LogicalResult lowerPDLPatterns(ModuleOp patternsModule)

The e-matching passes take their patterns as either e-matching pdl_interp or pdl.

Lower the pdl.pattern ops in the given patterns module, if any, with convertPDLToEmatchPDLInterp.

bool runSaturation(MLIRContext *ctx, PDLPatternModule pdlPattern, ModuleOp irModule, int maxIters, int maxNodes, RewriterBase::Listener *listener = nullptr, bool eagerRewrite = true)

Run equality saturation on the given IR module using the provided PDL pattern module.

Returns true on success.

SmallVector<mlir::Value> getClassVals(mlir::PatternRewriter &rewriter, mlir::Value val)

Helper function to get all values from a ClassOp.

mlir::Value getClassRepresentative(mlir::PatternRewriter &rewriter, mlir::Value val)

Helper function to get the first value from a ClassOp.

equivalence::ClassOp getCanonicalLeader(equivalence::ClassOp classOp)

Follow the leader chain of a ClassOp to find the canonical leader, performing path compression along the way.

equivalence::ClassOp getRootLeader(equivalence::ClassOp classOp)

Return the root of the leader chain of classOp without path compression, so it is safe to call while the IR must not be mutated (e.g.

matching).

bool areEquivalent(mlir::Value lhs, mlir::Value rhs)

Return true if lhs and rhs are in the same e-class: either the same value, or equivalence.class results with the same root leader.

mlir::Value getClassResult(mlir::PatternRewriter &rewriter, mlir::Value val)

Helper function to get the result of a ClassOp.

SmallVector<Value> getClassResults(mlir::PatternRewriter &rewriter, mlir::ValueRange vals)
equivalence::ClassOp getClassOpIfExists(mlir::Value val)

Return the ClassOp associated with val (as its defining op or as a user), or null if val is not part of any e-class yet.

equivalence::ClassOp getClassOp(mlir::PatternRewriter &rewriter, mlir::Value val)

Helper function to get or create a ClassOp for a value.

void swappedErase(equivalence::ClassOp classOp, mlir::Value target)

Erase the first occurrence of target from classOp’s input list.

Swaps with the last element first so the erase is O(1).

ScopeId scopeOf(Operation *op)

The scope of op: the nearest enclosing equivalence.graph body region, or null if op is not inside any graph.

ScopeId scopeOf(equivalence::ClassOp c)
ScopeId parentScope(ScopeId s)

The enclosing scope of scope s (the next graph body out), or null at the outermost graph / for a null scope.

unsigned depthOf(ScopeId s)

Distance from the outermost graph (0 for a top-level graph body); a null (out-of-graph) scope also reports 0.

unsigned depthOf(equivalence::ClassOp c)
bool encloses(ScopeId outer, ScopeId inner)

Ancestor-or-equal test: does graph scope outer enclose inner?

A scope encloses itself, so equal scopes test true.

equivalence::ClassOp *findByScope(SmallVectorImpl<equivalence::ClassOp> &row, ScopeId s)

Find the (unique) rep of row living in scope s, or null.

Linear scan; rows have at most #scopes entries, so this beats a nested map.

equivalence::ClassOp outermost(SmallVectorImpl<equivalence::ClassOp> &row)

The outermost (minimum-depth) rep of a non-empty row.

equivalence::ClassOp nearestEnclosingRep(SmallVectorImpl<equivalence::ClassOp> &row, ScopeId s)

The nearest strictly enclosing rep of scope s present in row, or null if none (i.e.

s is the outermost occupied scope).

equivalence::ClassOp deepestRepEnclosing(SmallVectorImpl<equivalence::ClassOp> &row, ScopeId s)

The deepest rep enclosing scope s (walk s outward to the first rep in row), or null if none encloses s.

struct EmatchSaturateBenchmarkPassOptions
#include <EmatchDialect.h>

Public Members

int numRuns = 10
int maxIters = 4
int maxNodes = 0
struct EmatchSaturatePassOptions
#include <EmatchDialect.h>

Public Members

int maxIters = 4
int maxNodes = 0
std::string patternsFile = ""
bool eagerRewrite = true
struct EquivalenceGraphContainsPassOptions
#include <EmatchDialect.h>

Public Members

std::string patternsFile = ""
class CongruenceEngine
#include <CongruenceEngine.h>

Scope-aware congruence engine for equality saturation over equivalence.graph e-graphs.

Public Functions

void classUnion(mlir::PatternRewriter &rewriter, mlir::Value a, mlir::Value b)

Union two individual values.

void classUnion(mlir::PatternRewriter &rewriter, mlir::Operation *op, mlir::ValueRange vals)

Union an operation’s results with corresponding values.

void classUnion(mlir::PatternRewriter &rewriter, mlir::ValueRange a, mlir::ValueRange b)

Union two value ranges pairwise.

void queueClassUnion(mlir::Value a, mlir::Value b)

Queue a union of two individual values for later processing.

void queueClassUnion(mlir::Operation *op, mlir::ValueRange vals)

Queue unions of an operation’s results with corresponding values.

void queueClassUnion(mlir::ValueRange a, mlir::ValueRange b)

Queue pairwise unions of two value ranges.

void processPendingClassUnions(mlir::PatternRewriter &rewriter)

Process all pending queued class unions.

bool rebuild(HashConsPatternRewriter &rewriter)

Repair the parents of each ClassOp in the worklist.

This also clears the worklist. Returns false when the worklist was empty, otherwise true.

void hashconsGraph(HashConsPatternRewriter &rewriter, equivalence::GraphOp graph)

Create a hash-cons scope for the given graph’s region and insert every non-ClassOp operation into it.

Duplicate operations encountered during insertion are collected and merged via mergeResults, mirroring the pair-collect-then-process pattern used by repair.

void repair(HashConsPatternRewriter &rewriter, mlir::Operation *op)

Repair e-graph by potentially deduplicating the parents (=users) of the given operation.

When op is a ClassOp this dedups users of the class result; for any other operation it dedups users of op’s results. A keep operation pushed to the worklist by mergeResults is repaired this way so that newly redirected users that became identical can be collapsed.

void repairDuplicate(mlir::Operation *dup)

dup was found congruent to an existing e-node while being re-keyed after an operand change.

Queue it so rebuild merges it into the e-node it collided with. Safe to call mid-rebuild.

void mergeDuplicate(HashConsPatternRewriter &rewriter, mlir::Operation *other, mlir::Operation *keep)

Collapse the congruent e-node other into keep: refresh keep’s hash-cons entry, reconcile their classes and replace other.

void mergeResults(HashConsPatternRewriter &rewriter, mlir::Operation *other, mlir::Operation *keep)

Merge the results of two duplicate parent operations (other -> keep), reconciling their owning ClassOps if any.

Used by repair when collapsing duplicate users of a ClassOp. After redirecting other’s users onto keep, keep is pushed onto the worklist so that any users that became identical are repaired in the next rebuild iteration.

Public Members

SmallVector<mlir::Operation*> worklist

Worklist of operations whose parents (=users) potentially need to be repaired.

Entries may be ClassOps (added by classUnion whose canonical leader needs to absorb the merged class) or arbitrary operations (added by mergeResults because the redirected users may have become identical). Entries may become stale (detached or erased) before being processed; such entries are skipped during rebuild via an op->getBlock() check.

class HashConsPatternRewriter : public PatternRewriter
#include <HashConsPatternRewriter.h>

Pattern rewriter with hash consing support.

Public Functions

explicit HashConsPatternRewriter(MLIRContext *ctx)
void startOpModification(Operation *op) override
void cancelOpModification(Operation *op) override
void finalizeOpModification(Operation *op) override
LogicalResult erase(Operation *op)

Erase an operation from its region’s hash-cons scope.

Returns success if the operation was found and removed.

LogicalResult insert(Operation *op)

Insert an operation into its region’s hash-cons scope.

Operation *lookup(Operation *op)

Lookup an operation in its region’s scope (searches parent scopes too) Returns nullptr if not found or no scope registered.

ScopedMapTy::ScopeTy *createRootScope(Region *region)

Create a root scope for a region (no parent).

ScopedMapTy::ScopeTy *createChildScope(Region *region, Region *parentRegion)

Create a child scope for a region with a parent region’s scope.

ScopedMapTy::ScopeTy *getScope(Region *region)

Get the scope for a region, or nullptr if not registered.

void removeScope(Region *region)

Remove a scope registration (does not destroy the scope).

inline uint64_t getNodeCount() const

Get the current node count.

inline void setNodeCount(uint64_t count)

Set the current node count.

inline void setEngine(CongruenceEngine *e)

Register the congruence engine so that congruences discovered while re-keying modified ops (see finalizeOpModification) can be turned into unions.

template<typename K, typename V, typename KInfo, typename AllocatorTy>
class MutableScopedHashTable : private llvm::detail::AllocatorHolder<AllocatorTy>
#include <MutableScopedHashTable.h>

Public Types

using ScopeTy = MutableScopedHashTableScope<K, V, KInfo, AllocatorTy>
using ValTy = MutableScopedHashTableVal<K, V>

Public Functions

MutableScopedHashTable() = default
MutableScopedHashTable(const MutableScopedHashTable&) = delete
MutableScopedHashTable &operator=(const MutableScopedHashTable&) = delete
inline std::unique_ptr<ScopeTy> createRootScope()

Create a root scope.

inline std::unique_ptr<ScopeTy> createChildScope(ScopeTy *parent)

Create a child scope from a parent.

Friends

friend class MutableScopedHashTableScope< K, V, KInfo, AllocatorTy >
template<typename K, typename V>
class MutableScopedHashTableVal
#include <MutableScopedHashTable.h>

Public Functions

inline const K &getKey() const
inline const V &getValue() const
inline V &getValue()
template<typename AllocatorTy>
inline void Destroy(AllocatorTy &Allocator)

Public Static Functions

template<typename AllocatorTy>
static inline MutableScopedHashTableVal *Create(const K &key, const V &val, AllocatorTy &Allocator)
template<typename K, typename V, typename KInfo = llvm::DenseMapInfo<K>, typename AllocatorTy = llvm::MallocAllocator>
class MutableScopedHashTableScope
#include <MutableScopedHashTable.h>

Public Types

using ValTy = MutableScopedHashTableVal<K, V>
using TableTy = MutableScopedHashTable<K, V, KInfo, AllocatorTy>

Public Functions

inline explicit MutableScopedHashTableScope(TableTy &ht)

Create a root scope (no parent).

inline MutableScopedHashTableScope(TableTy &ht, MutableScopedHashTableScope *parent)

Create a child scope with explicit parent.

MutableScopedHashTableScope(const MutableScopedHashTableScope&) = delete
MutableScopedHashTableScope &operator=(const MutableScopedHashTableScope&) = delete
inline ~MutableScopedHashTableScope()
inline MutableScopedHashTableScope *getParentScope()
inline const MutableScopedHashTableScope *getParentScope() const
inline void insert(const K &Key, const V &Val)

Insert a key-value pair into THIS scope.

inline std::optional<V> lookup(const K &Key) const

Lookup a key, searching this scope and all ancestors.

inline V lookupOrDefault(const K &Key) const

Lookup returning default value if not found.

inline bool count(const K &Key) const

Check if key exists in this scope or ancestors.

inline bool countLocal(const K &Key) const

Check if key exists in THIS scope only (not ancestors).

inline bool erase(const K &Key)

Erase from THIS scope only. Returns true if found and erased.

inline V *lookupMutable(const K &Key)

Get mutable reference to value (searches ancestors) Returns nullptr if not found.

struct ScopeRepIndex
#include <ScopeRepIndex.h>

Per-component index of scope representatives, keyed by union-find root.

Each row holds at most one ClassOp per scope (the reps); the keying root is the row’s outermost entry. Rows are seeded lazily (see rowFor).

Public Functions

SmallVector<equivalence::ClassOp> &rowFor(equivalence::ClassOp root)

Return the row for root, seeding it with {root} on first access.

void mergeScopeRows(equivalence::ClassOp winRoot, equivalence::ClassOp loseRoot)

Merge loseRoot’s row into winRoot’s, queueing same-scope collisions into sameScopeDups.

winRoot must enclose every entry.

void reorientComponent(SmallVectorImpl<equivalence::ClassOp> &row)

Point every non-outermost rep’s leader at its nearest enclosing rep in row; clear the outermost rep’s leader.

Rewires leader operands directly.

void verify()

Consistency check on scopeReps.

Public Members

llvm::DenseMap<equivalence::ClassOp, SmallVector<equivalence::ClassOp>> scopeReps
SmallVector<std::pair<equivalence::ClassOp, equivalence::ClassOp>> sameScopeDups
llvm::DenseMap<mlir::Operation*, unsigned> unionRank
class EmatchDialect : public mlir::Dialect

A dialect for e-matching and equality saturation.

The ematch dialect provides operations used to express e-matching and equality saturation over the e-graphs built with the equivalence dialect.

Public Functions

~EmatchDialect() override
::mlir::Type parseType(::mlir::DialectAsmParser &parser) const override

Parse a type registered to this dialect.

void printType(::mlir::Type type, ::mlir::DialectAsmPrinter &os) const override

Print a type registered to this dialect.

Public Static Functions

static inline ::llvm::StringLiteral getDialectNamespace()

Friends

friend class ::mlir::MLIRContext
template<typename RangeT>
class AreEquivalentOpGenericAdaptor : public mlir::ematch::detail::AreEquivalentOpGenericAdaptorBase

Public Functions

inline AreEquivalentOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {})
inline AreEquivalentOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {})
inline AreEquivalentOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr)
inline AreEquivalentOpGenericAdaptor(RangeT values, const AreEquivalentOpGenericAdaptorBase &base)
template<typename LateInst = AreEquivalentOp, typename = std::enable_if_t<std::is_same_v<LateInst, AreEquivalentOp>>>
inline AreEquivalentOpGenericAdaptor(RangeT values, LateInst op)
inline std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index)
inline RangeT getODSOperands(unsigned index)
inline ValueT getLhs()
inline ValueT getRhs()
inline RangeT getOperands()
class AreEquivalentOpAdaptor : public mlir::ematch::AreEquivalentOpGenericAdaptor<::mlir::ValueRange>

Public Functions

AreEquivalentOpAdaptor(AreEquivalentOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
inline AreEquivalentOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {})
inline AreEquivalentOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {})
inline AreEquivalentOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr)
inline AreEquivalentOpGenericAdaptor(RangeT values, const AreEquivalentOpGenericAdaptorBase &base)
template<typename LateInst = AreEquivalentOp, typename = std::enable_if_t<std::is_same_v<LateInst, AreEquivalentOp>>>
inline AreEquivalentOpGenericAdaptor(RangeT values, LateInst op)
class AreEquivalentOp : public mlir::Op<AreEquivalentOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::NSuccessors<2>::Impl, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::OpTrait::IsTerminator>

Public Types

using Adaptor = AreEquivalentOpAdaptor
template<typename RangeT>
using GenericAdaptor = AreEquivalentOpGenericAdaptor<RangeT>
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>
using Properties = FoldAdaptor::Properties

Public Functions

inline ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames()
inline std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index)
inline ::mlir::Operation::operand_range getODSOperands(unsigned index)
inline ::mlir::TypedValue<::mlir::pdl::ValueType> getLhs()
inline ::mlir::TypedValue<::mlir::pdl::ValueType> getRhs()
inline ::mlir::OpOperand &getLhsMutable()
inline ::mlir::OpOperand &getRhsMutable()
inline std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index)
inline ::mlir::Operation::result_range getODSResults(unsigned index)
inline ::mlir::Block *getTrueDest()
inline ::mlir::Block *getFalseDest()
::llvm::LogicalResult verifyInvariantsImpl()
::llvm::LogicalResult verifyInvariants()
void print(::mlir::OpAsmPrinter &_odsPrinter)

Public Static Functions

static inline ::llvm::StringLiteral getOperationName()
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static llvm::hash_code computePropertiesHash(const Properties &prop)
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Block *trueDest, ::mlir::Block *falseDest)
static AreEquivalentOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Block *trueDest, ::mlir::Block *falseDest)
static AreEquivalentOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Block *trueDest, ::mlir::Block *falseDest)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Block *trueDest, ::mlir::Block *falseDest)
static AreEquivalentOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Block *trueDest, ::mlir::Block *falseDest)
static AreEquivalentOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Block *trueDest, ::mlir::Block *falseDest)
static void build(::mlir::OpBuilder&, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static AreEquivalentOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static AreEquivalentOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static void build(::mlir::OpBuilder&, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static AreEquivalentOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static AreEquivalentOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)

Public Static Attributes

static int odsIndex_lhs = 0
static int odsIndex_rhs = 1
template<typename RangeT>
class DedupOpGenericAdaptor : public mlir::ematch::detail::DedupOpGenericAdaptorBase

Public Functions

inline DedupOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {})
inline DedupOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {})
inline DedupOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr)
inline DedupOpGenericAdaptor(RangeT values, const DedupOpGenericAdaptorBase &base)
template<typename LateInst = DedupOp, typename = std::enable_if_t<std::is_same_v<LateInst, DedupOp>>>
inline DedupOpGenericAdaptor(RangeT values, LateInst op)
inline std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index)
inline RangeT getODSOperands(unsigned index)
inline ValueT getInputOp()
inline RangeT getOperands()
class DedupOpAdaptor : public mlir::ematch::DedupOpGenericAdaptor<::mlir::ValueRange>

Public Functions

DedupOpAdaptor(DedupOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
inline DedupOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {})
inline DedupOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {})
inline DedupOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr)
inline DedupOpGenericAdaptor(RangeT values, const DedupOpGenericAdaptorBase &base)
template<typename LateInst = DedupOp, typename = std::enable_if_t<std::is_same_v<LateInst, DedupOp>>>
inline DedupOpGenericAdaptor(RangeT values, LateInst op)
class DedupOp : public mlir::Op<DedupOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::pdl::OperationType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::InferTypeOpInterface::Trait>

Public Types

using Adaptor = DedupOpAdaptor
template<typename RangeT>
using GenericAdaptor = DedupOpGenericAdaptor<RangeT>
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>
using Properties = FoldAdaptor::Properties

Public Functions

inline ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames()
inline std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index)
inline ::mlir::Operation::operand_range getODSOperands(unsigned index)
inline ::mlir::TypedValue<::mlir::pdl::OperationType> getInputOp()
inline ::mlir::OpOperand &getInputOpMutable()
inline std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index)
inline ::mlir::Operation::result_range getODSResults(unsigned index)
inline ::mlir::TypedValue<::mlir::pdl::OperationType> getResultOp()
::llvm::LogicalResult verifyInvariantsImpl()
::llvm::LogicalResult verifyInvariants()
void print(::mlir::OpAsmPrinter &_odsPrinter)

Public Static Functions

static inline ::llvm::StringLiteral getOperationName()
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static llvm::hash_code computePropertiesHash(const Properties &prop)
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result_op, ::mlir::Value input_op)
static DedupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result_op, ::mlir::Value input_op)
static DedupOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result_op, ::mlir::Value input_op)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value input_op)
static DedupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value input_op)
static DedupOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value input_op)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value input_op)
static DedupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value input_op)
static DedupOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value input_op)
static void build(::mlir::OpBuilder&, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static DedupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static DedupOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static DedupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static DedupOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static void build(::mlir::OpBuilder&, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static DedupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static DedupOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static DedupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static DedupOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes)
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)

Public Static Attributes

static int odsIndex_input_op = 0
template<typename RangeT>
class EquivalentOpGenericAdaptor : public mlir::ematch::detail::EquivalentOpGenericAdaptorBase

Public Functions

inline EquivalentOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {})
inline EquivalentOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {})
inline EquivalentOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr)
inline EquivalentOpGenericAdaptor(RangeT values, const EquivalentOpGenericAdaptorBase &base)
template<typename LateInst = EquivalentOp, typename = std::enable_if_t<std::is_same_v<LateInst, EquivalentOp>>>
inline EquivalentOpGenericAdaptor(RangeT values, LateInst op)
inline std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index)
inline RangeT getODSOperands(unsigned index)
inline ValueT getLhs()
inline ValueT getRhs()
inline RangeT getOperands()
class EquivalentOpAdaptor : public mlir::ematch::EquivalentOpGenericAdaptor<::mlir::ValueRange>

Public Functions

EquivalentOpAdaptor(EquivalentOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
inline EquivalentOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {})
inline EquivalentOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {})
inline EquivalentOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr)
inline EquivalentOpGenericAdaptor(RangeT values, const EquivalentOpGenericAdaptorBase &base)
template<typename LateInst = EquivalentOp, typename = std::enable_if_t<std::is_same_v<LateInst, EquivalentOp>>>
inline EquivalentOpGenericAdaptor(RangeT values, LateInst op)
class EquivalentOp : public mlir::Op<EquivalentOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants>

Public Types

using Adaptor = EquivalentOpAdaptor
template<typename RangeT>
using GenericAdaptor = EquivalentOpGenericAdaptor<RangeT>
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>
using Properties = FoldAdaptor::Properties

Public Functions

inline ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames()
inline std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index)
inline ::mlir::Operation::operand_range getODSOperands(unsigned index)
inline ::mlir::TypedValue<::mlir::pdl::ValueType> getLhs()
inline ::mlir::TypedValue<::mlir::pdl::ValueType> getRhs()
inline ::mlir::OpOperand &getLhsMutable()
inline ::mlir::OpOperand &getRhsMutable()
inline std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index)
inline ::mlir::Operation::result_range getODSResults(unsigned index)
::llvm::LogicalResult verifyInvariantsImpl()
::llvm::LogicalResult verifyInvariants()
void print(::mlir::OpAsmPrinter &_odsPrinter)

Public Static Functions

static inline ::llvm::StringLiteral getOperationName()
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static llvm::hash_code computePropertiesHash(const Properties &prop)
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs)
static EquivalentOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value lhs, ::mlir::Value rhs)
static EquivalentOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value lhs, ::mlir::Value rhs)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs)
static EquivalentOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs)
static EquivalentOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs)
static void build(::mlir::OpBuilder&, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static EquivalentOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static EquivalentOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static void build(::mlir::OpBuilder&, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static EquivalentOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static EquivalentOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)

Public Static Attributes

static int odsIndex_lhs = 0
static int odsIndex_rhs = 1
template<typename RangeT>
class GetClassRepresentativeOpGenericAdaptor : public mlir::ematch::detail::GetClassRepresentativeOpGenericAdaptorBase

Public Functions

inline GetClassRepresentativeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {})
inline GetClassRepresentativeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {})
inline GetClassRepresentativeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr)
inline GetClassRepresentativeOpGenericAdaptor(RangeT values, const GetClassRepresentativeOpGenericAdaptorBase &base)
template<typename LateInst = GetClassRepresentativeOp, typename = std::enable_if_t<std::is_same_v<LateInst, GetClassRepresentativeOp>>>
inline GetClassRepresentativeOpGenericAdaptor(RangeT values, LateInst op)
inline std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index)
inline RangeT getODSOperands(unsigned index)
inline ValueT getValue()
inline RangeT getOperands()
class GetClassRepresentativeOpAdaptor : public mlir::ematch::GetClassRepresentativeOpGenericAdaptor<::mlir::ValueRange>

Public Functions

GetClassRepresentativeOpAdaptor(GetClassRepresentativeOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
inline GetClassRepresentativeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {})
inline GetClassRepresentativeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {})
inline GetClassRepresentativeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr)
inline GetClassRepresentativeOpGenericAdaptor(RangeT values, const GetClassRepresentativeOpGenericAdaptorBase &base)
template<typename LateInst = GetClassRepresentativeOp, typename = std::enable_if_t<std::is_same_v<LateInst, GetClassRepresentativeOp>>>
inline GetClassRepresentativeOpGenericAdaptor(RangeT values, LateInst op)
class GetClassRepresentativeOp : public mlir::Op<GetClassRepresentativeOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::pdl::ValueType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::InferTypeOpInterface::Trait>

Public Types

using Adaptor = GetClassRepresentativeOpAdaptor
template<typename RangeT>
using GenericAdaptor = GetClassRepresentativeOpGenericAdaptor<RangeT>
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>
using Properties = FoldAdaptor::Properties

Public Functions

inline ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames()
inline std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index)
inline ::mlir::Operation::operand_range getODSOperands(unsigned index)
inline ::mlir::TypedValue<::mlir::pdl::ValueType> getValue()
inline ::mlir::OpOperand &getValueMutable()
inline std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index)
inline ::mlir::Operation::result_range getODSResults(unsigned index)
inline ::mlir::TypedValue<::mlir::pdl::ValueType> getResult()
::llvm::LogicalResult verifyInvariantsImpl()
::llvm::LogicalResult verifyInvariants()
void print(::mlir::OpAsmPrinter &_odsPrinter)

Public Static Functions

static inline ::llvm::StringLiteral getOperationName()
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static llvm::hash_code computePropertiesHash(const Properties &prop)
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value value)
static GetClassRepresentativeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value value)
static GetClassRepresentativeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value value)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value)
static GetClassRepresentativeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value value)
static GetClassRepresentativeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value value)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value value)
static GetClassRepresentativeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value value)
static GetClassRepresentativeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value value)
static void build(::mlir::OpBuilder&, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static GetClassRepresentativeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static GetClassRepresentativeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static GetClassRepresentativeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static GetClassRepresentativeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static void build(::mlir::OpBuilder&, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static GetClassRepresentativeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static GetClassRepresentativeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static GetClassRepresentativeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static GetClassRepresentativeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes)
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)

Public Static Attributes

static int odsIndex_value = 0
template<typename RangeT>
class GetClassResultOpGenericAdaptor : public mlir::ematch::detail::GetClassResultOpGenericAdaptorBase

Public Functions

inline GetClassResultOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {})
inline GetClassResultOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {})
inline GetClassResultOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr)
inline GetClassResultOpGenericAdaptor(RangeT values, const GetClassResultOpGenericAdaptorBase &base)
template<typename LateInst = GetClassResultOp, typename = std::enable_if_t<std::is_same_v<LateInst, GetClassResultOp>>>
inline GetClassResultOpGenericAdaptor(RangeT values, LateInst op)
inline std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index)
inline RangeT getODSOperands(unsigned index)
inline ValueT getValue()
inline RangeT getOperands()
class GetClassResultOpAdaptor : public mlir::ematch::GetClassResultOpGenericAdaptor<::mlir::ValueRange>

Public Functions

GetClassResultOpAdaptor(GetClassResultOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
inline GetClassResultOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {})
inline GetClassResultOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {})
inline GetClassResultOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr)
inline GetClassResultOpGenericAdaptor(RangeT values, const GetClassResultOpGenericAdaptorBase &base)
template<typename LateInst = GetClassResultOp, typename = std::enable_if_t<std::is_same_v<LateInst, GetClassResultOp>>>
inline GetClassResultOpGenericAdaptor(RangeT values, LateInst op)
class GetClassResultOp : public mlir::Op<GetClassResultOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::pdl::ValueType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::InferTypeOpInterface::Trait>

Public Types

using Adaptor = GetClassResultOpAdaptor
template<typename RangeT>
using GenericAdaptor = GetClassResultOpGenericAdaptor<RangeT>
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>
using Properties = FoldAdaptor::Properties

Public Functions

inline ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames()
inline std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index)
inline ::mlir::Operation::operand_range getODSOperands(unsigned index)
inline ::mlir::TypedValue<::mlir::pdl::ValueType> getValue()
inline ::mlir::OpOperand &getValueMutable()
inline std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index)
inline ::mlir::Operation::result_range getODSResults(unsigned index)
inline ::mlir::TypedValue<::mlir::pdl::ValueType> getResult()
::llvm::LogicalResult verifyInvariantsImpl()
::llvm::LogicalResult verifyInvariants()
void print(::mlir::OpAsmPrinter &_odsPrinter)

Public Static Functions

static inline ::llvm::StringLiteral getOperationName()
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static llvm::hash_code computePropertiesHash(const Properties &prop)
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value value)
static GetClassResultOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value value)
static GetClassResultOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value value)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value)
static GetClassResultOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value value)
static GetClassResultOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value value)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value value)
static GetClassResultOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value value)
static GetClassResultOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value value)
static void build(::mlir::OpBuilder&, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static GetClassResultOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static GetClassResultOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static GetClassResultOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static GetClassResultOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static void build(::mlir::OpBuilder&, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static GetClassResultOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static GetClassResultOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static GetClassResultOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static GetClassResultOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes)
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)

Public Static Attributes

static int odsIndex_value = 0
template<typename RangeT>
class GetClassResultsOpGenericAdaptor : public mlir::ematch::detail::GetClassResultsOpGenericAdaptorBase

Public Functions

inline GetClassResultsOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {})
inline GetClassResultsOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {})
inline GetClassResultsOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr)
inline GetClassResultsOpGenericAdaptor(RangeT values, const GetClassResultsOpGenericAdaptorBase &base)
template<typename LateInst = GetClassResultsOp, typename = std::enable_if_t<std::is_same_v<LateInst, GetClassResultsOp>>>
inline GetClassResultsOpGenericAdaptor(RangeT values, LateInst op)
inline std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index)
inline RangeT getODSOperands(unsigned index)
inline ValueT getValues()
inline RangeT getOperands()
class GetClassResultsOpAdaptor : public mlir::ematch::GetClassResultsOpGenericAdaptor<::mlir::ValueRange>

Public Functions

GetClassResultsOpAdaptor(GetClassResultsOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
inline GetClassResultsOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {})
inline GetClassResultsOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {})
inline GetClassResultsOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr)
inline GetClassResultsOpGenericAdaptor(RangeT values, const GetClassResultsOpGenericAdaptorBase &base)
template<typename LateInst = GetClassResultsOp, typename = std::enable_if_t<std::is_same_v<LateInst, GetClassResultsOp>>>
inline GetClassResultsOpGenericAdaptor(RangeT values, LateInst op)
class GetClassResultsOp : public mlir::Op<GetClassResultsOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::pdl::RangeType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::InferTypeOpInterface::Trait>

Public Types

using Adaptor = GetClassResultsOpAdaptor
template<typename RangeT>
using GenericAdaptor = GetClassResultsOpGenericAdaptor<RangeT>
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>
using Properties = FoldAdaptor::Properties

Public Functions

inline ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames()
inline std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index)
inline ::mlir::Operation::operand_range getODSOperands(unsigned index)
inline ::mlir::TypedValue<::mlir::pdl::RangeType> getValues()
inline ::mlir::OpOperand &getValuesMutable()
inline std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index)
inline ::mlir::Operation::result_range getODSResults(unsigned index)
inline ::mlir::TypedValue<::mlir::pdl::RangeType> getResult()
::llvm::LogicalResult verifyInvariantsImpl()
::llvm::LogicalResult verifyInvariants()
void print(::mlir::OpAsmPrinter &_odsPrinter)

Public Static Functions

static inline ::llvm::StringLiteral getOperationName()
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static llvm::hash_code computePropertiesHash(const Properties &prop)
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value values)
static GetClassResultsOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value values)
static GetClassResultsOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value values)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value values)
static GetClassResultsOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value values)
static GetClassResultsOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value values)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value values)
static GetClassResultsOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value values)
static GetClassResultsOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value values)
static void build(::mlir::OpBuilder&, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static GetClassResultsOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static GetClassResultsOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static GetClassResultsOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static GetClassResultsOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static void build(::mlir::OpBuilder&, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static GetClassResultsOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static GetClassResultsOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static GetClassResultsOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static GetClassResultsOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes)
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)

Public Static Attributes

static int odsIndex_values = 0
template<typename RangeT>
class GetClassValsOpGenericAdaptor : public mlir::ematch::detail::GetClassValsOpGenericAdaptorBase

Public Functions

inline GetClassValsOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {})
inline GetClassValsOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {})
inline GetClassValsOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr)
inline GetClassValsOpGenericAdaptor(RangeT values, const GetClassValsOpGenericAdaptorBase &base)
template<typename LateInst = GetClassValsOp, typename = std::enable_if_t<std::is_same_v<LateInst, GetClassValsOp>>>
inline GetClassValsOpGenericAdaptor(RangeT values, LateInst op)
inline std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index)
inline RangeT getODSOperands(unsigned index)
inline ValueT getValue()
inline RangeT getOperands()
class GetClassValsOpAdaptor : public mlir::ematch::GetClassValsOpGenericAdaptor<::mlir::ValueRange>

Public Functions

GetClassValsOpAdaptor(GetClassValsOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
inline GetClassValsOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {})
inline GetClassValsOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {})
inline GetClassValsOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr)
inline GetClassValsOpGenericAdaptor(RangeT values, const GetClassValsOpGenericAdaptorBase &base)
template<typename LateInst = GetClassValsOp, typename = std::enable_if_t<std::is_same_v<LateInst, GetClassValsOp>>>
inline GetClassValsOpGenericAdaptor(RangeT values, LateInst op)
class GetClassValsOp : public mlir::Op<GetClassValsOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::pdl::RangeType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::InferTypeOpInterface::Trait>

Public Types

using Adaptor = GetClassValsOpAdaptor
template<typename RangeT>
using GenericAdaptor = GetClassValsOpGenericAdaptor<RangeT>
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>
using Properties = FoldAdaptor::Properties

Public Functions

inline ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames()
inline std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index)
inline ::mlir::Operation::operand_range getODSOperands(unsigned index)
inline ::mlir::TypedValue<::mlir::pdl::ValueType> getValue()
inline ::mlir::OpOperand &getValueMutable()
inline std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index)
inline ::mlir::Operation::result_range getODSResults(unsigned index)
inline ::mlir::TypedValue<::mlir::pdl::RangeType> getResult()
::llvm::LogicalResult verifyInvariantsImpl()
::llvm::LogicalResult verifyInvariants()
void print(::mlir::OpAsmPrinter &_odsPrinter)

Public Static Functions

static inline ::llvm::StringLiteral getOperationName()
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static llvm::hash_code computePropertiesHash(const Properties &prop)
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value value)
static GetClassValsOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value value)
static GetClassValsOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value value)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value)
static GetClassValsOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value value)
static GetClassValsOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value value)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value value)
static GetClassValsOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value value)
static GetClassValsOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value value)
static void build(::mlir::OpBuilder&, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static GetClassValsOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static GetClassValsOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static GetClassValsOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static GetClassValsOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static void build(::mlir::OpBuilder&, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static GetClassValsOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static GetClassValsOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static GetClassValsOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static GetClassValsOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes)
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)

Public Static Attributes

static int odsIndex_value = 0
template<typename RangeT>
class IsArgOpGenericAdaptor : public mlir::ematch::detail::IsArgOpGenericAdaptorBase

Public Functions

inline IsArgOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {})
inline IsArgOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {})
inline IsArgOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr)
inline IsArgOpGenericAdaptor(RangeT values, const IsArgOpGenericAdaptorBase &base)
template<typename LateInst = IsArgOp, typename = std::enable_if_t<std::is_same_v<LateInst, IsArgOp>>>
inline IsArgOpGenericAdaptor(RangeT values, LateInst op)
inline std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index)
inline RangeT getODSOperands(unsigned index)
inline ValueT getValue()
inline RangeT getOperands()
class IsArgOpAdaptor : public mlir::ematch::IsArgOpGenericAdaptor<::mlir::ValueRange>

Public Functions

IsArgOpAdaptor(IsArgOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
inline IsArgOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {})
inline IsArgOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {})
inline IsArgOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr)
inline IsArgOpGenericAdaptor(RangeT values, const IsArgOpGenericAdaptorBase &base)
template<typename LateInst = IsArgOp, typename = std::enable_if_t<std::is_same_v<LateInst, IsArgOp>>>
inline IsArgOpGenericAdaptor(RangeT values, LateInst op)
class IsArgOp : public mlir::Op<IsArgOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::NSuccessors<2>::Impl, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::IsTerminator>

Public Types

using Adaptor = IsArgOpAdaptor
template<typename RangeT>
using GenericAdaptor = IsArgOpGenericAdaptor<RangeT>
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>
using Properties = FoldAdaptor::Properties

Public Functions

inline ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames()
inline ::mlir::StringAttr getIndexAttrName()
inline std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index)
inline ::mlir::Operation::operand_range getODSOperands(unsigned index)
inline ::mlir::TypedValue<::mlir::pdl::ValueType> getValue()
inline ::mlir::OpOperand &getValueMutable()
inline std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index)
inline ::mlir::Operation::result_range getODSResults(unsigned index)
inline ::mlir::Block *getTrueDest()
inline ::mlir::Block *getFalseDest()
void writeProperties(::mlir::DialectBytecodeWriter &writer)
inline ::mlir::IntegerAttr getIndexAttr()
uint32_t getIndex()
inline void setIndexAttr(::mlir::IntegerAttr attr)
void setIndex(uint32_t attrValue)
::llvm::LogicalResult verifyInvariantsImpl()
::llvm::LogicalResult verifyInvariants()
void print(::mlir::OpAsmPrinter &_odsPrinter)

Public Static Functions

static inline ::mlir::StringAttr getIndexAttrName(::mlir::OperationName name)
static inline ::llvm::StringLiteral getOperationName()
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static llvm::hash_code computePropertiesHash(const Properties &prop)
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value, ::mlir::IntegerAttr index, ::mlir::Block *trueDest, ::mlir::Block *falseDest)
static IsArgOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value value, ::mlir::IntegerAttr index, ::mlir::Block *trueDest, ::mlir::Block *falseDest)
static IsArgOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value value, ::mlir::IntegerAttr index, ::mlir::Block *trueDest, ::mlir::Block *falseDest)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value value, ::mlir::IntegerAttr index, ::mlir::Block *trueDest, ::mlir::Block *falseDest)
static IsArgOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value value, ::mlir::IntegerAttr index, ::mlir::Block *trueDest, ::mlir::Block *falseDest)
static IsArgOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value value, ::mlir::IntegerAttr index, ::mlir::Block *trueDest, ::mlir::Block *falseDest)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value, uint32_t index, ::mlir::Block *trueDest, ::mlir::Block *falseDest)
static IsArgOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value value, uint32_t index, ::mlir::Block *trueDest, ::mlir::Block *falseDest)
static IsArgOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value value, uint32_t index, ::mlir::Block *trueDest, ::mlir::Block *falseDest)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value value, uint32_t index, ::mlir::Block *trueDest, ::mlir::Block *falseDest)
static IsArgOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value value, uint32_t index, ::mlir::Block *trueDest, ::mlir::Block *falseDest)
static IsArgOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value value, uint32_t index, ::mlir::Block *trueDest, ::mlir::Block *falseDest)
static void build(::mlir::OpBuilder&, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static IsArgOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static IsArgOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static void build(::mlir::OpBuilder&, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static IsArgOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static IsArgOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)

Public Static Attributes

static int odsIndex_value = 0
template<typename RangeT>
class UnionOpGenericAdaptor : public mlir::ematch::detail::UnionOpGenericAdaptorBase

Public Functions

inline UnionOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {})
inline UnionOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {})
inline UnionOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr)
inline UnionOpGenericAdaptor(RangeT values, const UnionOpGenericAdaptorBase &base)
template<typename LateInst = UnionOp, typename = std::enable_if_t<std::is_same_v<LateInst, UnionOp>>>
inline UnionOpGenericAdaptor(RangeT values, LateInst op)
inline std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index)
inline RangeT getODSOperands(unsigned index)
inline ValueT getLhs()
inline ValueT getRhs()
inline RangeT getOperands()
class UnionOpAdaptor : public mlir::ematch::UnionOpGenericAdaptor<::mlir::ValueRange>

Public Functions

UnionOpAdaptor(UnionOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
inline UnionOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {})
inline UnionOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {})
inline UnionOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr)
inline UnionOpGenericAdaptor(RangeT values, const UnionOpGenericAdaptorBase &base)
template<typename LateInst = UnionOp, typename = std::enable_if_t<std::is_same_v<LateInst, UnionOp>>>
inline UnionOpGenericAdaptor(RangeT values, LateInst op)
class UnionOp : public mlir::Op<UnionOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants>

Public Types

using Adaptor = UnionOpAdaptor
template<typename RangeT>
using GenericAdaptor = UnionOpGenericAdaptor<RangeT>
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>
using Properties = FoldAdaptor::Properties

Public Functions

inline ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames()
inline std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index)
inline ::mlir::Operation::operand_range getODSOperands(unsigned index)
inline ::mlir::TypedValue<::mlir::Type> getLhs()
inline ::mlir::TypedValue<::mlir::Type> getRhs()
inline ::mlir::OpOperand &getLhsMutable()
inline ::mlir::OpOperand &getRhsMutable()
inline std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index)
inline ::mlir::Operation::result_range getODSResults(unsigned index)
::llvm::LogicalResult verifyInvariantsImpl()
::llvm::LogicalResult verifyInvariants()
void print(::mlir::OpAsmPrinter &_odsPrinter)

Public Static Functions

static inline ::llvm::StringLiteral getOperationName()
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static llvm::hash_code computePropertiesHash(const Properties &prop)
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value lhs, ::mlir::Value rhs)
static UnionOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value lhs, ::mlir::Value rhs)
static UnionOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value lhs, ::mlir::Value rhs)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs)
static UnionOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs)
static UnionOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs)
static void build(::mlir::OpBuilder&, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static UnionOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static UnionOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {})
static void build(::mlir::OpBuilder&, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static UnionOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static UnionOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {})
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)

Public Static Attributes

static int odsIndex_lhs = 0
static int odsIndex_rhs = 1
namespace impl

Functions

std::unique_ptr<::mlir::Pass> createApplyPDLInterpPass()
std::unique_ptr<::mlir::Pass> createConvertEmatchToMatchPass()
std::unique_ptr<::mlir::Pass> createConvertEmatchToPDLInterpPass()
std::unique_ptr<::mlir::Pass> createConvertPDLToEmatchPDLInterpPass()
std::unique_ptr<::mlir::Pass> createEmatchSaturateBenchmarkPass()
std::unique_ptr<::mlir::Pass> createEmatchSaturateBenchmarkPass(EmatchSaturateBenchmarkPassOptions options)
std::unique_ptr<::mlir::Pass> createEmatchSaturatePass()
std::unique_ptr<::mlir::Pass> createEmatchSaturatePass(EmatchSaturatePassOptions options)
std::unique_ptr<::mlir::Pass> createEmatchifyPass()
std::unique_ptr<::mlir::Pass> createEquivalenceGraphContainsPass()
std::unique_ptr<::mlir::Pass> createEquivalenceGraphContainsPass(EquivalenceGraphContainsPassOptions options)
template<typename DerivedT>
class ApplyPDLInterpPassBase : public mlir::OperationPass<::mlir::ModuleOp>

Public Types

using Base = ApplyPDLInterpPassBase

Public Functions

inline ApplyPDLInterpPassBase()
inline ApplyPDLInterpPassBase(const ApplyPDLInterpPassBase &other)
ApplyPDLInterpPassBase &operator=(const ApplyPDLInterpPassBase&) = delete
ApplyPDLInterpPassBase(ApplyPDLInterpPassBase&&) = delete
ApplyPDLInterpPassBase &operator=(ApplyPDLInterpPassBase&&) = delete
~ApplyPDLInterpPassBase() = default
inline ::llvm::StringRef getArgument() const override
inline ::llvm::StringRef getDescription() const override
inline ::llvm::StringRef getName() const override
inline std::unique_ptr<::mlir::Pass> clonePass() const override

A clone method to create a copy of this pass.

inline void getDependentDialects(::mlir::DialectRegistry &registry) const override

Return the dialect that must be loaded in the context before this pass.

Public Static Functions

static inline ::llvm::StringLiteral getArgumentName()

Returns the command-line argument attached to this pass.

static inline ::llvm::StringLiteral getPassName()

Returns the derived pass name.

static inline bool classof(const ::mlir::Pass *pass)

Support isa/dyn_cast functionality for the derived pass class.

template<typename DerivedT>
class ConvertEmatchToMatchPassBase : public mlir::OperationPass<::mlir::ModuleOp>

Public Types

using Base = ConvertEmatchToMatchPassBase

Public Functions

inline ConvertEmatchToMatchPassBase()
inline ConvertEmatchToMatchPassBase(const ConvertEmatchToMatchPassBase &other)
ConvertEmatchToMatchPassBase &operator=(const ConvertEmatchToMatchPassBase&) = delete
ConvertEmatchToMatchPassBase(ConvertEmatchToMatchPassBase&&) = delete
ConvertEmatchToMatchPassBase &operator=(ConvertEmatchToMatchPassBase&&) = delete
~ConvertEmatchToMatchPassBase() = default
inline ::llvm::StringRef getArgument() const override
inline ::llvm::StringRef getDescription() const override
inline ::llvm::StringRef getName() const override
inline std::unique_ptr<::mlir::Pass> clonePass() const override

A clone method to create a copy of this pass.

inline void getDependentDialects(::mlir::DialectRegistry &registry) const override

Return the dialect that must be loaded in the context before this pass.

Public Static Functions

static inline ::llvm::StringLiteral getArgumentName()

Returns the command-line argument attached to this pass.

static inline ::llvm::StringLiteral getPassName()

Returns the derived pass name.

static inline bool classof(const ::mlir::Pass *pass)

Support isa/dyn_cast functionality for the derived pass class.

template<typename DerivedT>
class ConvertEmatchToPDLInterpPassBase : public mlir::OperationPass<::mlir::ModuleOp>

Public Types

using Base = ConvertEmatchToPDLInterpPassBase

Public Functions

inline ConvertEmatchToPDLInterpPassBase()
inline ConvertEmatchToPDLInterpPassBase(const ConvertEmatchToPDLInterpPassBase &other)
ConvertEmatchToPDLInterpPassBase &operator=(const ConvertEmatchToPDLInterpPassBase&) = delete
ConvertEmatchToPDLInterpPassBase(ConvertEmatchToPDLInterpPassBase&&) = delete
ConvertEmatchToPDLInterpPassBase &operator=(ConvertEmatchToPDLInterpPassBase&&) = delete
~ConvertEmatchToPDLInterpPassBase() = default
inline ::llvm::StringRef getArgument() const override
inline ::llvm::StringRef getDescription() const override
inline ::llvm::StringRef getName() const override
inline std::unique_ptr<::mlir::Pass> clonePass() const override

A clone method to create a copy of this pass.

inline void getDependentDialects(::mlir::DialectRegistry &registry) const override

Return the dialect that must be loaded in the context before this pass.

Public Static Functions

static inline ::llvm::StringLiteral getArgumentName()

Returns the command-line argument attached to this pass.

static inline ::llvm::StringLiteral getPassName()

Returns the derived pass name.

static inline bool classof(const ::mlir::Pass *pass)

Support isa/dyn_cast functionality for the derived pass class.

template<typename DerivedT>
class ConvertPDLToEmatchPDLInterpPassBase : public mlir::OperationPass<::mlir::ModuleOp>

Public Types

using Base = ConvertPDLToEmatchPDLInterpPassBase

Public Functions

inline ConvertPDLToEmatchPDLInterpPassBase()
inline ConvertPDLToEmatchPDLInterpPassBase(const ConvertPDLToEmatchPDLInterpPassBase &other)
ConvertPDLToEmatchPDLInterpPassBase &operator=(const ConvertPDLToEmatchPDLInterpPassBase&) = delete
ConvertPDLToEmatchPDLInterpPassBase(ConvertPDLToEmatchPDLInterpPassBase&&) = delete
ConvertPDLToEmatchPDLInterpPassBase &operator=(ConvertPDLToEmatchPDLInterpPassBase&&) = delete
~ConvertPDLToEmatchPDLInterpPassBase() = default
inline ::llvm::StringRef getArgument() const override
inline ::llvm::StringRef getDescription() const override
inline ::llvm::StringRef getName() const override
inline std::unique_ptr<::mlir::Pass> clonePass() const override

A clone method to create a copy of this pass.

inline void getDependentDialects(::mlir::DialectRegistry &registry) const override

Return the dialect that must be loaded in the context before this pass.

Public Static Functions

static inline ::llvm::StringLiteral getArgumentName()

Returns the command-line argument attached to this pass.

static inline ::llvm::StringLiteral getPassName()

Returns the derived pass name.

static inline bool classof(const ::mlir::Pass *pass)

Support isa/dyn_cast functionality for the derived pass class.

template<typename DerivedT>
class EmatchSaturateBenchmarkPassBase : public mlir::OperationPass<::mlir::ModuleOp>

Public Types

using Base = EmatchSaturateBenchmarkPassBase

Public Functions

inline EmatchSaturateBenchmarkPassBase()
inline EmatchSaturateBenchmarkPassBase(const EmatchSaturateBenchmarkPassBase &other)
EmatchSaturateBenchmarkPassBase &operator=(const EmatchSaturateBenchmarkPassBase&) = delete
EmatchSaturateBenchmarkPassBase(EmatchSaturateBenchmarkPassBase&&) = delete
EmatchSaturateBenchmarkPassBase &operator=(EmatchSaturateBenchmarkPassBase&&) = delete
~EmatchSaturateBenchmarkPassBase() = default
inline ::llvm::StringRef getArgument() const override
inline ::llvm::StringRef getDescription() const override
inline ::llvm::StringRef getName() const override
inline std::unique_ptr<::mlir::Pass> clonePass() const override

A clone method to create a copy of this pass.

inline void getDependentDialects(::mlir::DialectRegistry &registry) const override

Return the dialect that must be loaded in the context before this pass.

inline EmatchSaturateBenchmarkPassBase(EmatchSaturateBenchmarkPassOptions options)

Explicitly declare the TypeID for this class. We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Public Static Functions

static inline ::llvm::StringLiteral getArgumentName()

Returns the command-line argument attached to this pass.

static inline ::llvm::StringLiteral getPassName()

Returns the derived pass name.

static inline bool classof(const ::mlir::Pass *pass)

Support isa/dyn_cast functionality for the derived pass class.

template<typename DerivedT>
class EmatchSaturatePassBase : public mlir::OperationPass<::mlir::ModuleOp>

Public Types

using Base = EmatchSaturatePassBase

Public Functions

inline EmatchSaturatePassBase()
inline EmatchSaturatePassBase(const EmatchSaturatePassBase &other)
EmatchSaturatePassBase &operator=(const EmatchSaturatePassBase&) = delete
EmatchSaturatePassBase(EmatchSaturatePassBase&&) = delete
EmatchSaturatePassBase &operator=(EmatchSaturatePassBase&&) = delete
~EmatchSaturatePassBase() = default
inline ::llvm::StringRef getArgument() const override
inline ::llvm::StringRef getDescription() const override
inline ::llvm::StringRef getName() const override
inline std::unique_ptr<::mlir::Pass> clonePass() const override

A clone method to create a copy of this pass.

inline void getDependentDialects(::mlir::DialectRegistry &registry) const override

Return the dialect that must be loaded in the context before this pass.

inline EmatchSaturatePassBase(EmatchSaturatePassOptions options)

Explicitly declare the TypeID for this class. We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Public Static Functions

static inline ::llvm::StringLiteral getArgumentName()

Returns the command-line argument attached to this pass.

static inline ::llvm::StringLiteral getPassName()

Returns the derived pass name.

static inline bool classof(const ::mlir::Pass *pass)

Support isa/dyn_cast functionality for the derived pass class.

template<typename DerivedT>
class EmatchifyPassBase : public mlir::OperationPass<::mlir::ModuleOp>

Public Types

using Base = EmatchifyPassBase

Public Functions

inline EmatchifyPassBase()
inline EmatchifyPassBase(const EmatchifyPassBase &other)
EmatchifyPassBase &operator=(const EmatchifyPassBase&) = delete
EmatchifyPassBase(EmatchifyPassBase&&) = delete
EmatchifyPassBase &operator=(EmatchifyPassBase&&) = delete
~EmatchifyPassBase() = default
inline ::llvm::StringRef getArgument() const override
inline ::llvm::StringRef getDescription() const override
inline ::llvm::StringRef getName() const override
inline std::unique_ptr<::mlir::Pass> clonePass() const override

A clone method to create a copy of this pass.

inline void getDependentDialects(::mlir::DialectRegistry &registry) const override

Return the dialect that must be loaded in the context before this pass.

Public Static Functions

static inline ::llvm::StringLiteral getArgumentName()

Returns the command-line argument attached to this pass.

static inline ::llvm::StringLiteral getPassName()

Returns the derived pass name.

static inline bool classof(const ::mlir::Pass *pass)

Support isa/dyn_cast functionality for the derived pass class.

template<typename DerivedT>
class EquivalenceGraphContainsPassBase : public mlir::OperationPass<::mlir::ModuleOp>

Public Types

using Base = EquivalenceGraphContainsPassBase

Public Functions

inline EquivalenceGraphContainsPassBase()
inline EquivalenceGraphContainsPassBase(const EquivalenceGraphContainsPassBase &other)
EquivalenceGraphContainsPassBase &operator=(const EquivalenceGraphContainsPassBase&) = delete
EquivalenceGraphContainsPassBase(EquivalenceGraphContainsPassBase&&) = delete
EquivalenceGraphContainsPassBase &operator=(EquivalenceGraphContainsPassBase&&) = delete
~EquivalenceGraphContainsPassBase() = default
inline ::llvm::StringRef getArgument() const override
inline ::llvm::StringRef getDescription() const override
inline ::llvm::StringRef getName() const override
inline std::unique_ptr<::mlir::Pass> clonePass() const override

A clone method to create a copy of this pass.

inline void getDependentDialects(::mlir::DialectRegistry &registry) const override

Return the dialect that must be loaded in the context before this pass.

inline EquivalenceGraphContainsPassBase(EquivalenceGraphContainsPassOptions options)

Explicitly declare the TypeID for this class. We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Public Static Functions

static inline ::llvm::StringLiteral getArgumentName()

Returns the command-line argument attached to this pass.

static inline ::llvm::StringLiteral getPassName()

Returns the derived pass name.

static inline bool classof(const ::mlir::Pass *pass)

Support isa/dyn_cast functionality for the derived pass class.

namespace detail
class AreEquivalentOpGenericAdaptorBase

Subclassed by mlir::ematch::AreEquivalentOpGenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > >, mlir::ematch::AreEquivalentOpGenericAdaptor<::mlir::ValueRange >, mlir::ematch::AreEquivalentOpGenericAdaptor< RangeT >

Public Types

using Properties = ::mlir::EmptyProperties

Public Functions

inline AreEquivalentOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {})
AreEquivalentOpGenericAdaptorBase(AreEquivalentOp op)
inline std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
inline const Properties &getProperties()
inline ::mlir::DictionaryAttr getAttributes()
class DedupOpGenericAdaptorBase

Subclassed by mlir::ematch::DedupOpGenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > >, mlir::ematch::DedupOpGenericAdaptor<::mlir::ValueRange >, mlir::ematch::DedupOpGenericAdaptor< RangeT >

Public Types

using Properties = ::mlir::EmptyProperties

Public Functions

inline DedupOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {})
DedupOpGenericAdaptorBase(DedupOp op)
inline std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
inline const Properties &getProperties()
inline ::mlir::DictionaryAttr getAttributes()
class EquivalentOpGenericAdaptorBase

Subclassed by mlir::ematch::EquivalentOpGenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > >, mlir::ematch::EquivalentOpGenericAdaptor<::mlir::ValueRange >, mlir::ematch::EquivalentOpGenericAdaptor< RangeT >

Public Types

using Properties = ::mlir::EmptyProperties

Public Functions

inline EquivalentOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {})
EquivalentOpGenericAdaptorBase(EquivalentOp op)
inline std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
inline const Properties &getProperties()
inline ::mlir::DictionaryAttr getAttributes()
class GetClassRepresentativeOpGenericAdaptorBase

Subclassed by mlir::ematch::GetClassRepresentativeOpGenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > >, mlir::ematch::GetClassRepresentativeOpGenericAdaptor<::mlir::ValueRange >, mlir::ematch::GetClassRepresentativeOpGenericAdaptor< RangeT >

Public Types

using Properties = ::mlir::EmptyProperties

Public Functions

inline GetClassRepresentativeOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {})
GetClassRepresentativeOpGenericAdaptorBase(GetClassRepresentativeOp op)
inline std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
inline const Properties &getProperties()
inline ::mlir::DictionaryAttr getAttributes()
class GetClassResultOpGenericAdaptorBase

Subclassed by mlir::ematch::GetClassResultOpGenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > >, mlir::ematch::GetClassResultOpGenericAdaptor<::mlir::ValueRange >, mlir::ematch::GetClassResultOpGenericAdaptor< RangeT >

Public Types

using Properties = ::mlir::EmptyProperties

Public Functions

inline GetClassResultOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {})
GetClassResultOpGenericAdaptorBase(GetClassResultOp op)
inline std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
inline const Properties &getProperties()
inline ::mlir::DictionaryAttr getAttributes()
class GetClassResultsOpGenericAdaptorBase

Subclassed by mlir::ematch::GetClassResultsOpGenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > >, mlir::ematch::GetClassResultsOpGenericAdaptor<::mlir::ValueRange >, mlir::ematch::GetClassResultsOpGenericAdaptor< RangeT >

Public Types

using Properties = ::mlir::EmptyProperties

Public Functions

inline GetClassResultsOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {})
GetClassResultsOpGenericAdaptorBase(GetClassResultsOp op)
inline std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
inline const Properties &getProperties()
inline ::mlir::DictionaryAttr getAttributes()
class GetClassValsOpGenericAdaptorBase

Subclassed by mlir::ematch::GetClassValsOpGenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > >, mlir::ematch::GetClassValsOpGenericAdaptor<::mlir::ValueRange >, mlir::ematch::GetClassValsOpGenericAdaptor< RangeT >

Public Types

using Properties = ::mlir::EmptyProperties

Public Functions

inline GetClassValsOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {})
GetClassValsOpGenericAdaptorBase(GetClassValsOp op)
inline std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
inline const Properties &getProperties()
inline ::mlir::DictionaryAttr getAttributes()
class IsArgOpGenericAdaptorBase

Subclassed by mlir::ematch::IsArgOpGenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > >, mlir::ematch::IsArgOpGenericAdaptor<::mlir::ValueRange >, mlir::ematch::IsArgOpGenericAdaptor< RangeT >

Public Functions

inline IsArgOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {})
IsArgOpGenericAdaptorBase(IsArgOp op)
inline std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
inline const Properties &getProperties()
inline ::mlir::DictionaryAttr getAttributes()
inline ::mlir::IntegerAttr getIndexAttr()
uint32_t getIndex()
struct Properties

Public Types

using indexTy = ::mlir::IntegerAttr

Public Functions

inline auto getIndex() const
inline void setIndex(const ::mlir::IntegerAttr &propValue)
inline bool operator==(const Properties &rhs) const
inline bool operator!=(const Properties &rhs) const

Public Members

indexTy index
class UnionOpGenericAdaptorBase

Subclassed by mlir::ematch::UnionOpGenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > >, mlir::ematch::UnionOpGenericAdaptor<::mlir::ValueRange >, mlir::ematch::UnionOpGenericAdaptor< RangeT >

Public Types

using Properties = ::mlir::EmptyProperties

Public Functions

inline UnionOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {})
UnionOpGenericAdaptorBase(UnionOp op)
inline std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
inline const Properties &getProperties()
inline ::mlir::DictionaryAttr getAttributes()

tamagoyaki

namespace tamagoyaki

Functions

void registerTimingCLOptions()

Register the &#8212;tamagoyaki-timing CLI option.

Call once at program startup before llvm::cl::ParseCommandLineOptions (i.e., before MlirOptMain).

void printTimingReport()

Print and reset the global timing report. Call before program exit.

mlir::TimingScope &getRootTimingScope()

Return the global root TimingScope.

Returns an empty (no-op) scope if timing is disabled. The timing manager is lazily initialized on first use.

mlir::TimingScope getTimingScope(llvm::StringRef name)

Return a nested TimingScope under the current innermost active scope (or the global root if none is active).

The scope automatically starts timing on construction and stops on destruction (RAII).

void pushTimingScope(mlir::TimingScope &scope)

Push a scope onto the thread-local stack so that subsequent getTimingScope calls nest under it.

void popTimingScope()

Pop the innermost scope from the thread-local stack.

struct TimingScopeGuard
#include <TamagoyakiTiming.h>

RAII guard that pushes a scope on construction and pops it on destruction.

Public Functions

inline explicit TimingScopeGuard(mlir::TimingScope &scope)
inline ~TimingScopeGuard()
TimingScopeGuard(const TimingScopeGuard&) = delete
TimingScopeGuard &operator=(const TimingScopeGuard&) = delete
struct SignpostGuard
#include <TamagoyakiTiming.h>

RAII guard that emits os_signpost intervals (visible in Instruments.app).

No-op on non-Apple platforms or when Instruments is not recording.

Public Functions

explicit SignpostGuard(llvm::StringRef name)
~SignpostGuard()
SignpostGuard(const SignpostGuard&) = delete
SignpostGuard &operator=(const SignpostGuard&) = delete

Public Members

std::string name