MLIR  16.0.0git
Public Member Functions | List of all members
mlir::RewritePatternSet Class Reference

#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)
 
MLIRContextgetContext () const
 
NativePatternListT & getNativePatterns ()
 Return the native patterns held in this list. More...
 
PDLPatternModulegetPDLPatterns ()
 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>>
RewritePatternSetadd (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>>
RewritePatternSetaddWithLabel (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>
RewritePatternSetadd ()
 Add an instance of each of the pattern types 'Ts'. More...
 
RewritePatternSetadd (std::unique_ptr< RewritePattern > pattern)
 Add the given native pattern to the pattern list. More...
 
RewritePatternSetadd (PDLPatternModule &&pattern)
 Add the given PDL pattern to the pattern list. More...
 
template<typename OpType >
RewritePatternSetadd (LogicalResult(*implFn)(OpType, PatternRewriter &rewriter))
 
template<typename... Ts, typename ConstructorArg , typename... ConstructorArgs, typename = std::enable_if_t<sizeof...(Ts) != 0>>
RewritePatternSetinsert (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>
RewritePatternSetinsert ()
 Add an instance of each of the pattern types 'Ts'. More...
 
RewritePatternSetinsert (std::unique_ptr< RewritePattern > pattern)
 Add the given native pattern to the pattern list. More...
 
RewritePatternSetinsert (PDLPatternModule &&pattern)
 Add the given PDL pattern to the pattern list. More...
 
template<typename OpType >
RewritePatternSetinsert (LogicalResult(*implFn)(OpType, PatternRewriter &rewriter))
 

Detailed Description

Definition at line 1365 of file PatternMatch.h.

Constructor & Destructor Documentation

◆ RewritePatternSet() [1/3]

mlir::RewritePatternSet::RewritePatternSet ( MLIRContext context)
inline

Definition at line 1369 of file PatternMatch.h.

◆ RewritePatternSet() [2/3]

mlir::RewritePatternSet::RewritePatternSet ( MLIRContext context,
std::unique_ptr< RewritePattern pattern 
)
inline

Construct a RewritePatternSet populated with the given pattern.

Definition at line 1372 of file PatternMatch.h.

◆ RewritePatternSet() [3/3]

mlir::RewritePatternSet::RewritePatternSet ( PDLPatternModule &&  pattern)
inline

Definition at line 1377 of file PatternMatch.h.

Member Function Documentation

◆ add() [1/5]

template<typename... Ts, typename ConstructorArg , typename... ConstructorArgs, typename = std::enable_if_t<sizeof...(Ts) != 0>>
RewritePatternSet& mlir::RewritePatternSet::add ( ConstructorArg &&  arg,
ConstructorArgs &&...  args 
)
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 1405 of file PatternMatch.h.

Referenced by applyExtractSliceOfPadTensorSwapPattern(), areIndexCastCompatible(), mlir::scf::buildLoopNest(), canonicalizeLoopBounds(), mlir::canonicalizeSetAndOperands(), mlir::arith::ConstantIndexOp::classof(), composeSetAndOperands(), computeExpandedLayoutMap(), computeMemRefRankReductionMask(), createElementIPowIFunc(), eachHasOnlyOneOfTypes(), encodeKernelName(), extractCompositeElement(), foldExtractStridedOpFromInsertChain(), foldInsertAfterExtractSlice(), foldMemRefCast(), foldTransferInBoundsAttribute(), funcsToCoroutines(), mlir::linalg::generateLibraryCallName(), getGenericEffectsImpl(), mlir::scf::getParallelForInductionVarOwner(), getSrcVectorElementType(), mlir::vector::getVectorReductionOp(), hasAtMostSingleNonScalar(), mlir::linalg::TilingPatterns< OpTy, OpTypes... >::insert(), insertTilingPatterns(), mlir::scf::insideMutuallyExclusiveBranches(), mlir::vector::isBroadcastableTo(), isComputeOperation(), joinShapes(), linalgOpToLoopsImpl(), lowerEntryPointABIAttr(), makeI64ArrayAttr(), ConcatOptimization::matchAndRewrite(), ReshapeConstOptimization::matchAndRewrite(), NoOpOptimization::matchAndRewrite(), AddZeroOptimization::matchAndRewrite(), MulOneOptimization::matchAndRewrite(), MaterializePadValue::matchAndRewrite(), MaxPool2dIsNoOp::matchAndRewrite(), ClampClampOptimization::matchAndRewrite(), AllocaScopeHoister::matchAndRewrite(), FoldLaunchArguments::matchAndRewrite(), CanonicalizeContractAdd< AddOpType >::matchAndRewrite(), SelectToExtUI::matchAndRewrite(), CollapseShapeOpMemRefCastFolder::matchAndRewrite(), CanonicalizeSingleResultAffineMinMaxOp< T >::matchAndRewrite(), SliceCanonicalizer::operator()(), SubViewCanonicalizer::operator()(), parseGlobalMemrefOpTypeAndInitialValue(), parseInferType(), mlir::populateAffineToStdConversionPatterns(), mlir::populateAffineToVectorConversionPatterns(), mlir::populateAMDGPUToROCDLConversionPatterns(), mlir::populateAMXLegalizeForLLVMExportPatterns(), mlir::arith::populateArithExpandOpsPatterns(), mlir::arith::populateArithToLLVMConversionPatterns(), mlir::arith::populateArithToSPIRVPatterns(), mlir::populateArmSVELegalizeForLLVMExportPatterns(), mlir::async::populateAsyncParallelForPatterns(), mlir::populateAsyncStructuralTypeConversionsAndLegality(), mlir::linalg::populateBubbleUpExtractSliceOpPatterns(), mlir::vector::populateBubbleVectorBitCastOpPatterns(), mlir::populateBufferizationToMemRefConversionPatterns(), mlir::populateBuiltinFuncToSPIRVPatterns(), mlir::populateCallOpTypeConversionPattern(), mlir::vector::populateCastAwayVectorLeadingOneDimPatterns(), mlir::populateCommutativityUtilsPatterns(), mlir::populateComplexToLibmConversionPatterns(), mlir::populateComplexToLLVMConversionPatterns(), mlir::populateComplexToStandardConversionPatterns(), mlir::memref::populateComposeSubViewPatterns(), mlir::cf::populateControlFlowToLLVMConversionPatterns(), mlir::cf::populateControlFlowToSPIRVPatterns(), mlir::populateConvertArmNeon2dToIntrPatterns(), mlir::populateConvertShapeConstraintsConversionPatterns(), mlir::linalg::populateConvolutionVectorizationPatterns(), mlir::populateDecomposeCallGraphTypesPatterns(), mlir::linalg::populateDecomposeConvolutionPatterns(), mlir::bufferization::populateDynamicDimSizes(), mlir::linalg::populateElementwiseOpsFusionPatterns(), mlir::linalg::populateElementwiseToLinalgConversionPatterns(), mlir::bufferization::populateEliminateBufferizeMaterializationsPatterns(), mlir::populateExpandCtlzPattern(), mlir::memref::populateExpandOpsPatterns(), mlir::populateExpandTanhPattern(), mlir::vector::populateFlattenVectorTransferPatterns(), mlir::tensor::populateFoldConstantExtractSlicePatterns(), mlir::memref::populateFoldMemRefAliasOpPatterns(), mlir::linalg::populateFoldReshapeOpsByCollapsingPatterns(), mlir::linalg::populateFoldReshapeOpsByExpansionPatterns(), mlir::linalg::populateFoldUnitExtentDimsPatterns(), mlir::populateFunctionOpInterfaceTypeConversionPattern(), mlir::populateFuncToLLVMConversionPatterns(), mlir::populateFuncToLLVMFuncOpConversionPattern(), mlir::populateFuncToSPIRVPatterns(), mlir::linalg::populateFuseTensorPadWithProducerLinalgOpPatterns(), mlir::populateGpuAllReducePatterns(), mlir::populateGpuToLLVMConversionPatterns(), mlir::populateGpuToNVVMConversionPatterns(), mlir::populateGpuToROCDLConversionPatterns(), mlir::populateGPUToSPIRVPatterns(), mlir::populateGpuWMMAToNVVMConversionPatterns(), mlir::linalg::populateInlineConstantOperandsPatterns(), mlir::linalg::populateLinalgNamedOpConversionPatterns(), mlir::linalg::populateLinalgNamedOpsGeneralizationPatterns(), mlir::populateLinalgToLLVMConversionPatterns(), mlir::populateLinalgToSPIRVPatterns(), mlir::linalg::populateLinalgToStandardConversionPatterns(), mlir::populateMathAlgebraicSimplificationPatterns(), mlir::populateMathPolynomialApproximationPatterns(), mlir::populateMathToLibmConversionPatterns(), mlir::populateMathToLLVMConversionPatterns(), mlir::populateMathToSPIRVPatterns(), mlir::spirv::populateMemorySpaceToStorageClassPatterns(), mlir::populateMemRefToLLVMConversionPatterns(), mlir::populateMemRefToSPIRVPatterns(), mlir::tensor::populateMergeConsecutiveInsertExtractSlicePatterns(), mlir::nvgpu::populateMmaSyncF32ToTF32Patterns(), mlir::populateNVGPUToNVVMConversionPatterns(), mlir::populateOpenACCToLLVMConversionPatterns(), mlir::populateOpenACCToSCFConversionPatterns(), mlir::populateOpenMPToLLVMConversionPatterns(), mlir::linalg::populatePadOpVectorizationPatterns(), mlir::linalg::populatePadTensorTilingPatterns(), mlir::populateParallelLoopToGPUPatterns(), mlir::populatePrepareVectorToMMAPatterns(), mlir::populateReconcileUnrealizedCastsPatterns(), mlir::populateRemoveShapeConstraintsPatterns(), mlir::memref::populateResolveRankedShapeTypeResultDimsPatterns(), mlir::memref::populateResolveShapedTypeResultDimsPatterns(), mlir::populateReturnOpTypeConversionPattern(), mlir::scf::populateSCFForLoopCanonicalizationPatterns(), mlir::scf::populateSCFLoopPipeliningPatterns(), mlir::scf::populateSCFStructuralTypeConversionsAndLegality(), mlir::populateSCFToControlFlowConversionPatterns(), mlir::populateSCFToSPIRVPatterns(), mlir::vector::populateShapeCastFoldingPatterns(), mlir::populateShapeRewritePatterns(), mlir::populateShapeToStandardConversionPatterns(), mlir::memref::populateSimplifyExtractStridedMetadataOpPatterns(), mlir::populateSparseBufferRewriting(), mlir::populateSparseTensorCodegenPatterns(), mlir::populateSparseTensorConversionPatterns(), mlir::populateSparseTensorRewriting(), mlir::populateSparsificationPatterns(), mlir::x86vector::avx2::populateSpecializedTransposeLoweringPatterns(), mlir::spirv::populateSPIRVGLCanonicalizationPatterns(), populateSPIRVLayoutInfoPatterns(), mlir::populateSPIRVToLLVMConversionPatterns(), mlir::populateSPIRVToLLVMFunctionConversionPatterns(), mlir::populateSPIRVToLLVMModuleConversionPatterns(), mlir::tensor::populateSplitPaddingPatterns(), mlir::linalg::populateSplitReductionPattern(), mlir::linalg::populateSwapExtractSliceWithFillPatterns(), mlir::populateTensorToLinalgPatterns(), mlir::populateTensorToSPIRVPatterns(), mlir::tosa::populateTosaDecomposeConv2D(), mlir::tosa::populateTosaDecomposeDepthwise(), mlir::tosa::populateTosaDecomposeTransposeConv(), mlir::tosa::populateTosaFoldConstantTransposePatterns(), mlir::tosa::populateTosaRescaleToArithConversionPatterns(), mlir::tosa::populateTosaToArithConversionPatterns(), mlir::tosa::populateTosaToLinalgConversionPatterns(), mlir::tosa::populateTosaToLinalgNamedConversionPatterns(), mlir::tosa::populateTosaToSCFConversionPatterns(), mlir::tosa::populateTosaToTensorConversionPatterns(), mlir::vector::populateVectorBroadcastLoweringPatterns(), mlir::vector::populateVectorContractLoweringPatterns(), mlir::vector::populateVectorInsertExtractStridedSliceDecompositionPatterns(), mlir::vector::populateVectorInsertExtractStridedSliceTransforms(), mlir::vector::populateVectorMaskMaterializationPatterns(), mlir::vector::populateVectorMaskOpLoweringPatterns(), mlir::vector::populateVectorMultiReductionLoweringPatterns(), mlir::vector::populateVectorReductionToContractPatterns(), mlir::vector::populateVectorScanLoweringPatterns(), mlir::vector::populateVectorShapeCastLoweringPatterns(), mlir::populateVectorToLLVMConversionPatterns(), mlir::populateVectorToLLVMMatrixConversionPatterns(), mlir::populateVectorToSCFConversionPatterns(), mlir::populateVectorToSPIRVPatterns(), mlir::vector::populateVectorTransferCollapseInnerMostContiguousDimsPatterns(), mlir::vector::populateVectorTransferDropUnitDimsPatterns(), mlir::vector::populateVectorTransferLoweringPatterns(), mlir::vector::populateVectorTransferPermutationMapLoweringPatterns(), mlir::vector::populateVectorTransposeLoweringPatterns(), mlir::vector::populateVectorUnrollPatterns(), mlir::vector::populateWarpExecuteOnLane0OpToScfForPattern(), mlir::populateX86VectorLegalizeForLLVMExportPatterns(), signedCeilNonnegInputs(), simplifyPassThroughBr(), simplifySwitchFromDefaultSwitchOnSameCondition(), sourceMaterializationCallback(), mlir::transform::tileToForeachThreadOpImpl(), verifyAllocLikeOp(), verifyAttributions(), verifyGatherOrScatterDims(), verifyMemoryOpIndexing(), verifyTensorReshapeOp(), and verifyVectorMemoryOp().

◆ add() [2/5]

template<typename... Ts>
RewritePatternSet& mlir::RewritePatternSet::add ( )
inline

Add an instance of each of the pattern types 'Ts'.

Return a reference to this for chaining insertions.

Definition at line 1432 of file PatternMatch.h.

◆ add() [3/5]

RewritePatternSet& mlir::RewritePatternSet::add ( std::unique_ptr< RewritePattern pattern)
inline

Add the given native pattern to the pattern list.

Return a reference to this for chaining insertions.

Definition at line 1439 of file PatternMatch.h.

◆ add() [4/5]

RewritePatternSet& mlir::RewritePatternSet::add ( PDLPatternModule &&  pattern)
inline

Add the given PDL pattern to the pattern list.

Return a reference to this for chaining insertions.

Definition at line 1446 of file PatternMatch.h.

◆ add() [5/5]

template<typename OpType >
RewritePatternSet& mlir::RewritePatternSet::add ( LogicalResult(*)(OpType, PatternRewriter &rewriter)  implFn)
inline

Definition at line 1453 of file PatternMatch.h.

◆ addWithLabel()

template<typename... Ts, typename ConstructorArg , typename... ConstructorArgs, typename = std::enable_if_t<sizeof...(Ts) != 0>>
RewritePatternSet& mlir::RewritePatternSet::addWithLabel ( ArrayRef< StringRef >  debugLabels,
ConstructorArg &&  arg,
ConstructorArgs &&...  args 
)
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 1420 of file PatternMatch.h.

◆ clear()

void mlir::RewritePatternSet::clear ( )
inline

Clear out all of the held patterns in this list.

Definition at line 1390 of file PatternMatch.h.

◆ getContext()

MLIRContext* mlir::RewritePatternSet::getContext ( ) const
inline

Definition at line 1381 of file PatternMatch.h.

Referenced by applyExtractSliceOfPadTensorSwapPattern(), createElementIPowIFunc(), mlir::linalg::TilingPatterns< OpTy, OpTypes... >::insert(), insertTilingPatterns(), mlir::populateAffineExpandIndexOpsPatterns(), mlir::populateAffineToStdConversionPatterns(), mlir::populateAffineToVectorConversionPatterns(), mlir::arith::populateArithExpandOpsPatterns(), mlir::arith::populateArithToSPIRVPatterns(), mlir::async::populateAsyncParallelForPatterns(), mlir::populateAsyncStructuralTypeConversionsAndLegality(), mlir::linalg::populateBubbleUpExtractSliceOpPatterns(), mlir::vector::populateBubbleVectorBitCastOpPatterns(), mlir::populateBufferizationToMemRefConversionPatterns(), mlir::populateBuiltinFuncToSPIRVPatterns(), mlir::populateCallOpTypeConversionPattern(), mlir::vector::populateCastAwayVectorLeadingOneDimPatterns(), mlir::populateCommutativityUtilsPatterns(), mlir::populateComplexToLibmConversionPatterns(), mlir::populateComplexToStandardConversionPatterns(), mlir::linalg::populateConstantFoldLinalgOperations(), mlir::cf::populateControlFlowToSPIRVPatterns(), mlir::populateConvertArmNeon2dToIntrPatterns(), mlir::populateConvertShapeConstraintsConversionPatterns(), mlir::linalg::populateConvolutionVectorizationPatterns(), mlir::linalg::populateDecomposeConvolutionPatterns(), mlir::linalg::populateDecomposeLinalgOpsPattern(), mlir::linalg::populateElementwiseOpsFusionPatterns(), mlir::linalg::populateElementwiseToLinalgConversionPatterns(), mlir::bufferization::populateEliminateBufferizeMaterializationsPatterns(), mlir::memref::populateExpandOpsPatterns(), mlir::vector::populateFlattenVectorTransferPatterns(), mlir::tensor::populateFoldConstantExtractSlicePatterns(), mlir::memref::populateFoldMemRefAliasOpPatterns(), mlir::linalg::populateFoldReshapeOpsByCollapsingPatterns(), mlir::linalg::populateFoldReshapeOpsByExpansionPatterns(), mlir::linalg::populateFoldUnitExtentDimsPatterns(), mlir::populateFunctionOpInterfaceTypeConversionPattern(), mlir::populateFuncToSPIRVPatterns(), mlir::linalg::populateFuseTensorPadWithProducerLinalgOpPatterns(), mlir::populateGpuAllReducePatterns(), mlir::populateGPUToSPIRVPatterns(), mlir::linalg::populateInlineConstantOperandsPatterns(), mlir::linalg::populateLinalgNamedOpConversionPatterns(), mlir::linalg::populateLinalgNamedOpsGeneralizationPatterns(), mlir::linalg::populateLinalgTilingCanonicalizationPatterns(), mlir::populateLinalgToSPIRVPatterns(), mlir::linalg::populateLinalgToStandardConversionPatterns(), mlir::populateMathAlgebraicSimplificationPatterns(), mlir::populateMathPolynomialApproximationPatterns(), mlir::populateMathToLibmConversionPatterns(), mlir::populateMathToSPIRVPatterns(), mlir::spirv::populateMemorySpaceToStorageClassPatterns(), mlir::populateMemRefToSPIRVPatterns(), mlir::tensor::populateMergeConsecutiveInsertExtractSlicePatterns(), mlir::nvgpu::populateMmaSyncF32ToTF32Patterns(), mlir::populateOpenACCToSCFConversionPatterns(), mlir::linalg::populatePadOpVectorizationPatterns(), mlir::linalg::populatePadTensorTilingPatterns(), mlir::populateParallelLoopToGPUPatterns(), mlir::populatePrepareVectorToMMAPatterns(), mlir::populateReconcileUnrealizedCastsPatterns(), mlir::populateRemoveShapeConstraintsPatterns(), mlir::memref::populateResolveRankedShapeTypeResultDimsPatterns(), mlir::memref::populateResolveShapedTypeResultDimsPatterns(), mlir::populateReturnOpTypeConversionPattern(), mlir::scf::populateSCFForLoopCanonicalizationPatterns(), mlir::scf::populateSCFLoopPipeliningPatterns(), mlir::scf::populateSCFStructuralTypeConversionsAndLegality(), mlir::populateSCFToControlFlowConversionPatterns(), mlir::populateSCFToSPIRVPatterns(), mlir::vector::populateShapeCastFoldingPatterns(), mlir::populateShapeRewritePatterns(), mlir::populateShapeToStandardConversionPatterns(), mlir::memref::populateSimplifyExtractStridedMetadataOpPatterns(), mlir::populateSparseBufferRewriting(), mlir::populateSparseTensorCodegenPatterns(), mlir::populateSparseTensorConversionPatterns(), mlir::populateSparseTensorRewriting(), mlir::populateSparsificationPatterns(), mlir::x86vector::avx2::populateSpecializedTransposeLoweringPatterns(), mlir::spirv::populateSPIRVGLCanonicalizationPatterns(), populateSPIRVLayoutInfoPatterns(), mlir::populateSPIRVToLLVMConversionPatterns(), mlir::populateSPIRVToLLVMFunctionConversionPatterns(), mlir::populateSPIRVToLLVMModuleConversionPatterns(), mlir::tensor::populateSplitPaddingPatterns(), mlir::linalg::populateSplitReductionPattern(), mlir::linalg::populateSwapExtractSliceWithFillPatterns(), mlir::populateTensorToLinalgPatterns(), mlir::populateTensorToSPIRVPatterns(), mlir::tosa::populateTosaRescaleToArithConversionPatterns(), mlir::tosa::populateTosaToArithConversionPatterns(), mlir::tosa::populateTosaToLinalgConversionPatterns(), mlir::tosa::populateTosaToLinalgNamedConversionPatterns(), mlir::tosa::populateTosaToSCFConversionPatterns(), mlir::tosa::populateTosaToTensorConversionPatterns(), mlir::vector::populateVectorBroadcastLoweringPatterns(), mlir::vector::populateVectorContractLoweringPatterns(), mlir::vector::populateVectorInsertExtractStridedSliceDecompositionPatterns(), mlir::vector::populateVectorInsertExtractStridedSliceTransforms(), mlir::vector::populateVectorMaskMaterializationPatterns(), mlir::vector::populateVectorMaskOpLoweringPatterns(), mlir::vector::populateVectorMultiReductionLoweringPatterns(), mlir::vector::populateVectorReductionToContractPatterns(), mlir::vector::populateVectorScanLoweringPatterns(), mlir::vector::populateVectorShapeCastLoweringPatterns(), mlir::populateVectorToSCFConversionPatterns(), mlir::populateVectorToSPIRVPatterns(), mlir::vector::populateVectorTransferCollapseInnerMostContiguousDimsPatterns(), mlir::vector::populateVectorTransferDropUnitDimsPatterns(), mlir::vector::populateVectorTransferLoweringPatterns(), mlir::vector::populateVectorTransferPermutationMapLoweringPatterns(), mlir::vector::populateVectorTransposeLoweringPatterns(), mlir::vector::populateVectorUnrollPatterns(), mlir::vector::populateWarpExecuteOnLane0OpToScfForPattern(), and tilePadOp().

◆ getNativePatterns()

NativePatternListT& mlir::RewritePatternSet::getNativePatterns ( )
inline

Return the native patterns held in this list.

Definition at line 1384 of file PatternMatch.h.

◆ getPDLPatterns()

PDLPatternModule& mlir::RewritePatternSet::getPDLPatterns ( )
inline

Return the PDL patterns held in this list.

Definition at line 1387 of file PatternMatch.h.

◆ insert() [1/5]

template<typename... Ts, typename ConstructorArg , typename... ConstructorArgs, typename = std::enable_if_t<sizeof...(Ts) != 0>>
RewritePatternSet& mlir::RewritePatternSet::insert ( ConstructorArg &&  arg,
ConstructorArgs &&...  args 
)
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 1484 of file PatternMatch.h.

Referenced by mlir::populateAffineExpandIndexOpsPatterns(), mlir::linalg::populateConstantFoldLinalgOperations(), and mlir::linalg::populateDecomposeLinalgOpsPattern().

◆ insert() [2/5]

template<typename... Ts>
RewritePatternSet& mlir::RewritePatternSet::insert ( )
inline

Add an instance of each of the pattern types 'Ts'.

Return a reference to this for chaining insertions.

Definition at line 1494 of file PatternMatch.h.

◆ insert() [3/5]

RewritePatternSet& mlir::RewritePatternSet::insert ( std::unique_ptr< RewritePattern pattern)
inline

Add the given native pattern to the pattern list.

Return a reference to this for chaining insertions.

Definition at line 1501 of file PatternMatch.h.

◆ insert() [4/5]

RewritePatternSet& mlir::RewritePatternSet::insert ( PDLPatternModule &&  pattern)
inline

Add the given PDL pattern to the pattern list.

Return a reference to this for chaining insertions.

Definition at line 1508 of file PatternMatch.h.

◆ insert() [5/5]

template<typename OpType >
RewritePatternSet& mlir::RewritePatternSet::insert ( LogicalResult(*)(OpType, PatternRewriter &rewriter)  implFn)
inline

Definition at line 1516 of file PatternMatch.h.

References value.


The documentation for this class was generated from the following file: