My Project
Public Member Functions | List of all members
SliceOpConversion Class Reference
Inheritance diagram for SliceOpConversion:
Inheritance graph
[legend]
Collaboration diagram for SliceOpConversion:
Collaboration graph
[legend]

Public Member Functions

 SliceOpConversion (MLIRContext *context, LLVMTypeConverter &lowering_)
 
PatternMatchResult matchAndRewrite (Operation *op, ArrayRef< Value > operands, ConversionPatternRewriter &rewriter) const override
 
- Public Member Functions inherited from mlir::LLVMOpLowering
 LLVMOpLowering (StringRef rootOpName, MLIRContext *context, LLVMTypeConverter &lowering, PatternBenefit benefit=1)
 
- Public Member Functions inherited from mlir::ConversionPattern
 ConversionPattern (StringRef rootName, PatternBenefit benefit, MLIRContext *ctx)
 
virtual void rewrite (Operation *op, ArrayRef< Value > operands, ConversionPatternRewriter &rewriter) const
 
virtual void rewrite (Operation *op, ArrayRef< Value > properOperands, ArrayRef< Block *> destinations, ArrayRef< ArrayRef< Value >> operands, ConversionPatternRewriter &rewriter) const
 
virtual PatternMatchResult matchAndRewrite (Operation *op, ArrayRef< Value > properOperands, ArrayRef< Block *> destinations, ArrayRef< ArrayRef< Value >> operands, ConversionPatternRewriter &rewriter) const
 Hook for derived classes to implement combined matching and rewriting. More...
 
virtual PatternMatchResult matchAndRewrite (Operation *op, ArrayRef< Value > operands, ConversionPatternRewriter &rewriter) const
 Hook for derived classes to implement combined matching and rewriting. More...
 
PatternMatchResult matchAndRewrite (Operation *op, PatternRewriter &rewriter) const final
 Attempt to match and rewrite the IR root at the specified operation. More...
 
- Public Member Functions inherited from mlir::RewritePattern
virtual void rewrite (Operation *op, std::unique_ptr< PatternState > state, PatternRewriter &rewriter) const
 
virtual void rewrite (Operation *op, PatternRewriter &rewriter) const
 
PatternMatchResult match (Operation *op) const override
 
ArrayRef< OperationNamegetGeneratedOps () const
 
- Public Member Functions inherited from mlir::Pattern
PatternBenefit getBenefit () const
 
OperationName getRootKind () const
 
virtual ~Pattern ()
 
PatternMatchResult matchSuccess (std::unique_ptr< PatternState > state={}) const
 This method indicates that a match was found and has the specified cost. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from mlir::Pattern
static PatternMatchResult matchFailure ()
 This method indicates that no match was found. More...
 
- Protected Member Functions inherited from mlir::RewritePattern
 RewritePattern (StringRef rootName, PatternBenefit benefit, MLIRContext *context)
 
 RewritePattern (StringRef rootName, ArrayRef< StringRef > generatedNames, PatternBenefit benefit, MLIRContext *context)
 
- Protected Member Functions inherited from mlir::Pattern
 Pattern (StringRef rootName, PatternBenefit benefit, MLIRContext *context)
 
- Protected Attributes inherited from mlir::LLVMOpLowering
LLVMTypeConverterlowering
 
- Protected Attributes inherited from mlir::RewritePattern
SmallVector< OperationName, 2 > generatedOps
 

Detailed Description

Conversion pattern that transforms a linalg.slice op into:

  1. A function entry alloca operation to allocate a ViewDescriptor.
  2. A load of the ViewDescriptor from the pointer allocated in 1.
  3. Updates to the ViewDescriptor to introduce the data ptr, offset, size and stride corresponding to the region of memory within the bounds of the parent view.
  4. A store of the resulting ViewDescriptor to the alloca'ed pointer. The linalg.slice op is replaced by the alloca'ed pointer.

Constructor & Destructor Documentation

◆ SliceOpConversion()

SliceOpConversion::SliceOpConversion ( MLIRContext context,
LLVMTypeConverter lowering_ 
)
inlineexplicit

Member Function Documentation

◆ matchAndRewrite()

PatternMatchResult SliceOpConversion::matchAndRewrite ( Operation op,
ArrayRef< Value operands,
ConversionPatternRewriter rewriter 
) const
inlineoverride

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