MLIR
18.0.0git
|
This class contains a set of configurations for a specific pattern. More...
#include "mlir/IR/PatternMatch.h"
Public Member Functions | |
PDLPatternConfigSet ()=default | |
template<typename... ConfigsT> | |
PDLPatternConfigSet (ConfigsT &&...configs) | |
Construct a set with the given configurations. More... | |
template<typename T > | |
const T & | get () const |
Get the configuration defined by the given type. More... | |
template<typename T > | |
const T * | tryGet () const |
Get the configuration defined by the given type, returns nullptr if the configuration does not exist. More... | |
void | notifyRewriteBegin (PatternRewriter &rewriter) |
Notify the configurations within this set at the beginning or end of a rewrite of a matched pattern. More... | |
void | notifyRewriteEnd (PatternRewriter &rewriter) |
Protected Member Functions | |
template<typename T > | |
void | addConfig (T &&config) |
Add a configuration to the set. More... | |
Protected Attributes | |
SmallVector< std::unique_ptr< PDLPatternConfig > > | configs |
The set of configurations for this pattern. More... | |
This class contains a set of configurations for a specific pattern.
Configurations are uniqued by TypeID, meaning that only one configuration of each type is allowed.
Definition at line 979 of file PatternMatch.h.
|
default |
|
inline |
Construct a set with the given configurations.
Definition at line 985 of file PatternMatch.h.
References addConfig(), and configs.
|
inlineprotected |
Add a configuration to the set.
Definition at line 1022 of file PatternMatch.h.
References configs, and tryGet().
Referenced by PDLPatternConfigSet().
|
inline |
Get the configuration defined by the given type.
Asserts that the configuration of the provided type exists.
Definition at line 992 of file PatternMatch.h.
|
inline |
Notify the configurations within this set at the beginning or end of a rewrite of a matched pattern.
Definition at line 1010 of file PatternMatch.h.
References configs.
|
inline |
Definition at line 1014 of file PatternMatch.h.
References configs.
|
inline |
Get the configuration defined by the given type, returns nullptr if the configuration does not exist.
Definition at line 1001 of file PatternMatch.h.
References configs.
Referenced by addConfig().
|
protected |
The set of configurations for this pattern.
This uses a vector instead of a map with the expectation that the number of configurations per set is small (<= 1).
Definition at line 1031 of file PatternMatch.h.
Referenced by addConfig(), notifyRewriteBegin(), notifyRewriteEnd(), PDLPatternConfigSet(), and tryGet().