MLIR
20.0.0git
|
This class represents a frozen set of patterns that can be processed by a pattern applicator. More...
#include "mlir/Rewrite/FrozenRewritePatternSet.h"
Public Types | |
using | OpSpecificNativePatternListT = DenseMap< OperationName, std::vector< RewritePattern * > > |
A map of operation specific native patterns. More... | |
Public Member Functions | |
FrozenRewritePatternSet () | |
FrozenRewritePatternSet (FrozenRewritePatternSet &&patterns)=default | |
FrozenRewritePatternSet (const FrozenRewritePatternSet &patterns)=default | |
FrozenRewritePatternSet & | operator= (const FrozenRewritePatternSet &patterns)=default |
FrozenRewritePatternSet & | operator= (FrozenRewritePatternSet &&patterns)=default |
~FrozenRewritePatternSet () | |
FrozenRewritePatternSet (RewritePatternSet &&patterns, ArrayRef< std::string > disabledPatternLabels=std::nullopt, ArrayRef< std::string > enabledPatternLabels=std::nullopt) | |
Freeze the patterns held in patterns , and take ownership. More... | |
const OpSpecificNativePatternListT & | getOpSpecificNativePatterns () const |
Return the op specific native patterns held by this list. More... | |
iterator_range< llvm::pointee_iterator< NativePatternListT::const_iterator > > | getMatchAnyOpNativePatterns () const |
Return the "match any" native patterns held by this list. More... | |
const detail::PDLByteCode * | getPDLByteCode () const |
Return the compiled PDL bytecode held by this list. More... | |
This class represents a frozen set of patterns that can be processed by a pattern applicator.
This class is designed to enable caching pattern lists such that they need not be continuously recomputed. Note that all copies of this class share the same compiled pattern list, allowing for a reduction in the number of duplicated patterns that need to be created.
Definition at line 24 of file FrozenRewritePatternSet.h.
using mlir::FrozenRewritePatternSet::OpSpecificNativePatternListT = DenseMap<OperationName, std::vector<RewritePattern *> > |
A map of operation specific native patterns.
Definition at line 29 of file FrozenRewritePatternSet.h.
FrozenRewritePatternSet::FrozenRewritePatternSet | ( | ) |
Definition at line 60 of file FrozenRewritePatternSet.cpp.
|
default |
|
default |
|
default |
FrozenRewritePatternSet::FrozenRewritePatternSet | ( | RewritePatternSet && | patterns, |
ArrayRef< std::string > | disabledPatternLabels = std::nullopt , |
||
ArrayRef< std::string > | enabledPatternLabels = std::nullopt |
||
) |
Freeze the patterns held in patterns
, and take ownership.
disabledPatternLabels
is a set of labels used to filter out input patterns with a debug label or debug name in this set. enabledPatternLabels
is a set of labels used to filter out input patterns that do not have one of the labels in this set. Debug labels must be set explicitly on patterns or when adding them with RewritePatternSet::addWithLabel
. Debug names may be empty, but patterns created with RewritePattern::create
have their default debug name set to their type name.
Definition at line 63 of file FrozenRewritePatternSet.cpp.
References mlir::OperationName::hasInterface(), and mlir::OperationName::hasTrait().
|
inline |
Return the "match any" native patterns held by this list.
Definition at line 62 of file FrozenRewritePatternSet.h.
Referenced by mlir::PatternApplicator::applyCostModel(), and mlir::PatternApplicator::walkAllPatterns().
|
inline |
Return the op specific native patterns held by this list.
Definition at line 56 of file FrozenRewritePatternSet.h.
Referenced by mlir::PatternApplicator::applyCostModel(), and mlir::PatternApplicator::walkAllPatterns().
|
inline |
Return the compiled PDL bytecode held by this list.
Returns null if there are no PDL patterns within the list.
Definition at line 69 of file FrozenRewritePatternSet.h.
Referenced by mlir::PatternApplicator::applyCostModel(), mlir::PatternApplicator::matchAndRewrite(), mlir::PatternApplicator::PatternApplicator(), and mlir::PatternApplicator::walkAllPatterns().
|
default |
|
default |