MLIR  19.0.0git
Namespaces | Typedefs | Functions
Transforms.h File Reference
#include "mlir/Dialect/Tensor/IR/Tensor.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/Interfaces/ViewLikeInterface.h"

Go to the source code of this file.

Namespaces

 mlir
 Include the generated interface declarations.
 
 mlir::tensor
 

Typedefs

using mlir::tensor::ControlFoldFn = std::function< bool(OpOperand *)>
 

Functions

FailureOr< TilingResultmlir::tensor::replaceExtractSliceWithTiledProducer (OpBuilder &builder, tensor::ExtractSliceOp sliceOp, OpResult producerOp)
 Method to swap an tensor.extract_slice with its producer when the producer implements the TilingInterface. More...
 
FailureOr< TilingResultmlir::tensor::replaceInsertSliceWithTiledConsumer (OpBuilder &builder, OffsetSizeAndStrideOpInterface sliceOp, OpOperand &consumerOp)
 Method to swap an tensor.insert_slice with its consumer when the consumer implements the TilingInterface. More...
 
void mlir::tensor::populateFoldTensorSubsetOpPatterns (RewritePatternSet &patterns)
 Appends patterns for folding tensor subset ops into consumer load/store ops into patterns. More...
 
void mlir::tensor::populateFoldTensorSubsetIntoVectorTransferPatterns (RewritePatternSet &patterns)
 Appends patterns for folding tensor subset ops into vector transfer ops. More...
 
void mlir::tensor::populateMergeConsecutiveInsertExtractSlicePatterns (RewritePatternSet &patterns)
 Collects patterns to merge consecutive tensor.insert_slice/extract_slice into one. More...
 
void mlir::tensor::populateDropRedundantInsertSliceRankExpansionPatterns (RewritePatternSet &patterns)
 Populates patterns with patterns that drop redundant tensor.insert_slice rank expansions. More...
 
void mlir::tensor::populateReassociativeReshapeFoldingPatterns (RewritePatternSet &patterns)
 Populates patterns with patterns that fold tensor.expand_shape and tensor.collapse_shape into other ops. More...
 
void mlir::tensor::populateFoldTensorEmptyPatterns (RewritePatternSet &patterns, bool foldSingleUseOnly=false)
 Populates patterns with patterns that fold tensor.empty with its consumers. More...
 
void mlir::tensor::populateDecomposeTensorConcatPatterns (RewritePatternSet &patterns)
 Populates patterns with patterns that decompose tensor.concat into tensor.empty of a tensor of the concatenated size, followed by a chain of tensor.insert_slice operations on the inputs. More...
 
void mlir::tensor::populateSimplifyPackAndUnpackPatterns (RewritePatternSet &patterns)
 Populates patterns with patterns that simplify tensor.pack and tensor.unpack operations. More...
 
void mlir::tensor::populateFoldIntoPackAndUnpackPatterns (RewritePatternSet &patterns)
 Populates patterns with patterns that fold operations like tensor.pad and tensor.extract_slice into tensor.pack and tensor.unpack operations respectively. More...
 
void mlir::tensor::populateRewriteAsConstantPatterns (RewritePatternSet &patterns, const ControlFoldFn &controlFn)
 Populates patterns with patterns that replace tensor ops (such as tensor.generate) with constants when possible. More...
 
FailureOr< Valuemlir::tensor::buildIndependentOp (OpBuilder &b, tensor::PadOp padOp, ValueRange independencies)
 Build a new tensor::PadOp with low/high padding that is independent of all given independencies. More...
 
FailureOr< Valuemlir::tensor::buildIndependentOp (OpBuilder &b, tensor::EmptyOp emptyOp, ValueRange independencies)
 Build a new tensor::EmptyOp who's dynamic sizes are independent of all given independencies. More...