MLIR  19.0.0git
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
mlir::SimpleAffineExprFlattener Class Reference

#include "mlir/IR/AffineExprVisitor.h"

+ Inheritance diagram for mlir::SimpleAffineExprFlattener:

Public Member Functions

 SimpleAffineExprFlattener (unsigned numDims, unsigned numSymbols)
virtual ~SimpleAffineExprFlattener ()=default
LogicalResult visitMulExpr (AffineBinaryOpExpr expr)
LogicalResult visitAddExpr (AffineBinaryOpExpr expr)
LogicalResult visitDimExpr (AffineDimExpr expr)
LogicalResult visitSymbolExpr (AffineSymbolExpr expr)
LogicalResult visitConstantExpr (AffineConstantExpr expr)
LogicalResult visitCeilDivExpr (AffineBinaryOpExpr expr)
LogicalResult visitFloorDivExpr (AffineBinaryOpExpr expr)
LogicalResult visitModExpr (AffineBinaryOpExpr expr)
- Public Member Functions inherited from mlir::AffineExprVisitor< SimpleAffineExprFlattener, LogicalResult >
LogicalResult walkPostOrder (AffineExpr expr)
- Public Member Functions inherited from mlir::AffineExprVisitorBase< SubClass, RetTy >
RetTy visit (AffineExpr expr)
RetTy visitAffineBinaryOpExpr (AffineBinaryOpExpr expr)
RetTy visitAddExpr (AffineBinaryOpExpr expr)
RetTy visitMulExpr (AffineBinaryOpExpr expr)
RetTy visitModExpr (AffineBinaryOpExpr expr)
RetTy visitFloorDivExpr (AffineBinaryOpExpr expr)
RetTy visitCeilDivExpr (AffineBinaryOpExpr expr)
RetTy visitConstantExpr (AffineConstantExpr expr)
RetTy visitDimExpr (AffineDimExpr expr)
RetTy visitSymbolExpr (AffineSymbolExpr expr)

Public Attributes

std::vector< SmallVector< int64_t, 8 > > operandExprStack
unsigned numDims
unsigned numSymbols
unsigned numLocals
SmallVector< AffineExpr, 4 > localExprs

Protected Member Functions

virtual void addLocalFloorDivId (ArrayRef< int64_t > dividend, int64_t divisor, AffineExpr localExpr)
virtual void addLocalIdSemiAffine (AffineExpr localExpr)
 Add a local identifier (needed to flatten a mod, floordiv, ceildiv, mul expr) when the rhs is a symbolic expression. More...

Detailed Description

Definition at line 354 of file AffineExprVisitor.h.

Constructor & Destructor Documentation

◆ SimpleAffineExprFlattener()

SimpleAffineExprFlattener::SimpleAffineExprFlattener ( unsigned  numDims,
unsigned  numSymbols 

Definition at line 1223 of file AffineExpr.cpp.

References operandExprStack.

◆ ~SimpleAffineExprFlattener()

virtual mlir::SimpleAffineExprFlattener::~SimpleAffineExprFlattener ( )

Member Function Documentation

◆ addLocalFloorDivId()

void SimpleAffineExprFlattener::addLocalFloorDivId ( ArrayRef< int64_t >  dividend,
int64_t  divisor,
AffineExpr  localExpr 

Definition at line 1494 of file AffineExpr.cpp.

References localExprs, numLocals, and operandExprStack.

Referenced by visitModExpr().

◆ addLocalIdSemiAffine()

void SimpleAffineExprFlattener::addLocalIdSemiAffine ( AffineExpr  localExpr)

Add a local identifier (needed to flatten a mod, floordiv, ceildiv, mul expr) when the rhs is a symbolic expression.

The local identifier added may be a floordiv, ceildiv, mul or mod of a pure affine/semi-affine function of other identifiers, coefficients of which are specified in the lhs of the mod, floordiv, ceildiv or mul expression and with respect to a symbolic rhs expression. localExpr is the simplified tree expression (AffineExpr) corresponding to the quantifier.

Definition at line 1505 of file AffineExpr.cpp.

References localExprs, numLocals, and operandExprStack.

◆ visitAddExpr()

LogicalResult SimpleAffineExprFlattener::visitAddExpr ( AffineBinaryOpExpr  expr)

Definition at line 1261 of file AffineExpr.cpp.

References operandExprStack, and mlir::success().

◆ visitCeilDivExpr()

LogicalResult SimpleAffineExprFlattener::visitCeilDivExpr ( AffineBinaryOpExpr  expr)

Definition at line 1354 of file AffineExpr.cpp.

◆ visitConstantExpr()

LogicalResult SimpleAffineExprFlattener::visitConstantExpr ( AffineConstantExpr  expr)

◆ visitDimExpr()

LogicalResult SimpleAffineExprFlattener::visitDimExpr ( AffineDimExpr  expr)

◆ visitFloorDivExpr()

LogicalResult SimpleAffineExprFlattener::visitFloorDivExpr ( AffineBinaryOpExpr  expr)

Definition at line 1358 of file AffineExpr.cpp.

◆ visitModExpr()

LogicalResult SimpleAffineExprFlattener::visitModExpr ( AffineBinaryOpExpr  expr)

◆ visitMulExpr()

LogicalResult SimpleAffineExprFlattener::visitMulExpr ( AffineBinaryOpExpr  expr)

◆ visitSymbolExpr()

LogicalResult SimpleAffineExprFlattener::visitSymbolExpr ( AffineSymbolExpr  expr)

Member Data Documentation

◆ localExprs

SmallVector<AffineExpr, 4> mlir::SimpleAffineExprFlattener::localExprs

◆ numDims

unsigned mlir::SimpleAffineExprFlattener::numDims

Definition at line 364 of file AffineExprVisitor.h.

Referenced by visitDimExpr(), visitModExpr(), and visitMulExpr().

◆ numLocals

unsigned mlir::SimpleAffineExprFlattener::numLocals

◆ numSymbols

unsigned mlir::SimpleAffineExprFlattener::numSymbols

Definition at line 365 of file AffineExprVisitor.h.

Referenced by visitModExpr(), visitMulExpr(), and visitSymbolExpr().

◆ operandExprStack

std::vector<SmallVector<int64_t, 8> > mlir::SimpleAffineExprFlattener::operandExprStack

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