MLIR
20.0.0git
|
#include "mlir/IR/PatternMatch.h"
Public Member Functions | |
RewritePatternSet (MLIRContext *context) | |
RewritePatternSet (MLIRContext *context, std::unique_ptr< RewritePattern > pattern) | |
Construct a RewritePatternSet populated with the given pattern. More... | |
RewritePatternSet (PDLPatternModule &&pattern) | |
MLIRContext * | getContext () const |
NativePatternListT & | getNativePatterns () |
Return the native patterns held in this list. More... | |
PDLPatternModule & | getPDLPatterns () |
Return the PDL patterns held in this list. More... | |
void | clear () |
Clear out all of the held patterns in this list. More... | |
template<typename... Ts, typename ConstructorArg , typename... ConstructorArgs, typename = std::enable_if_t<sizeof...(Ts) != 0>> | |
RewritePatternSet & | add (ConstructorArg &&arg, ConstructorArgs &&...args) |
Add an instance of each of the pattern types 'Ts' to the pattern list with the given arguments. More... | |
template<typename... Ts, typename ConstructorArg , typename... ConstructorArgs, typename = std::enable_if_t<sizeof...(Ts) != 0>> | |
RewritePatternSet & | addWithLabel (ArrayRef< StringRef > debugLabels, ConstructorArg &&arg, ConstructorArgs &&...args) |
An overload of the above add method that allows for attaching a set of debug labels to the attached patterns. More... | |
template<typename... Ts> | |
RewritePatternSet & | add () |
Add an instance of each of the pattern types 'Ts'. More... | |
RewritePatternSet & | add (std::unique_ptr< RewritePattern > pattern) |
Add the given native pattern to the pattern list. More... | |
RewritePatternSet & | add (PDLPatternModule &&pattern) |
Add the given PDL pattern to the pattern list. More... | |
template<typename OpType > | |
RewritePatternSet & | add (LogicalResult(*implFn)(OpType, PatternRewriter &rewriter), PatternBenefit benefit=1, ArrayRef< StringRef > generatedNames={}) |
template<typename... Ts, typename ConstructorArg , typename... ConstructorArgs, typename = std::enable_if_t<sizeof...(Ts) != 0>> | |
RewritePatternSet & | insert (ConstructorArg &&arg, ConstructorArgs &&...args) |
Add an instance of each of the pattern types 'Ts' to the pattern list with the given arguments. More... | |
template<typename... Ts> | |
RewritePatternSet & | insert () |
Add an instance of each of the pattern types 'Ts'. More... | |
RewritePatternSet & | insert (std::unique_ptr< RewritePattern > pattern) |
Add the given native pattern to the pattern list. More... | |
RewritePatternSet & | insert (PDLPatternModule &&pattern) |
Add the given PDL pattern to the pattern list. More... | |
template<typename OpType > | |
RewritePatternSet & | insert (LogicalResult(*implFn)(OpType, PatternRewriter &rewriter)) |
Definition at line 814 of file PatternMatch.h.
|
inline |
Definition at line 818 of file PatternMatch.h.
|
inline |
Construct a RewritePatternSet populated with the given pattern.
Definition at line 821 of file PatternMatch.h.
|
inline |
Definition at line 826 of file PatternMatch.h.
|
inline |
Add an instance of each of the pattern types 'Ts'.
Return a reference to this
for chaining insertions.
Definition at line 881 of file PatternMatch.h.
Referenced by insert().
|
inline |
Add an instance of each of the pattern types 'Ts' to the pattern list with the given arguments.
Return a reference to this
for chaining insertions. Note: ConstructorArg is necessary here to separate the two variadic lists.
Definition at line 853 of file PatternMatch.h.
Referenced by mlir::spirv::populateSPIRVGLCanonicalizationPatterns().
|
inline |
Definition at line 903 of file PatternMatch.h.
|
inline |
Add the given PDL pattern to the pattern list.
Return a reference to this
for chaining insertions.
Definition at line 895 of file PatternMatch.h.
|
inline |
Add the given native pattern to the pattern list.
Return a reference to this
for chaining insertions.
Definition at line 888 of file PatternMatch.h.
|
inline |
An overload of the above add
method that allows for attaching a set of debug labels to the attached patterns.
This is useful for labeling groups of patterns that may be shared between multiple different passes/users.
Definition at line 869 of file PatternMatch.h.
|
inline |
Clear out all of the held patterns in this list.
Definition at line 838 of file PatternMatch.h.
|
inline |
Definition at line 829 of file PatternMatch.h.
Referenced by insert(), and mlir::spirv::populateSPIRVGLCanonicalizationPatterns().
|
inline |
Return the native patterns held in this list.
Definition at line 832 of file PatternMatch.h.
|
inline |
Return the PDL patterns held in this list.
Definition at line 835 of file PatternMatch.h.
|
inline |
Add an instance of each of the pattern types 'Ts'.
Return a reference to this
for chaining insertions.
Definition at line 947 of file PatternMatch.h.
|
inline |
Add an instance of each of the pattern types 'Ts' to the pattern list with the given arguments.
Return a reference to this
for chaining insertions. Note: ConstructorArg is necessary here to separate the two variadic lists.
Definition at line 937 of file PatternMatch.h.
|
inline |
Definition at line 969 of file PatternMatch.h.
References add(), and getContext().
|
inline |
Add the given PDL pattern to the pattern list.
Return a reference to this
for chaining insertions.
Definition at line 961 of file PatternMatch.h.
|
inline |
Add the given native pattern to the pattern list.
Return a reference to this
for chaining insertions.
Definition at line 954 of file PatternMatch.h.