MLIR  17.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:
+ Collaboration diagram for mlir::SimpleAffineExprFlattener:

Public Member Functions

 SimpleAffineExprFlattener (unsigned numDims, unsigned numSymbols)
 
virtual ~SimpleAffineExprFlattener ()=default
 
void visitMulExpr (AffineBinaryOpExpr expr)
 
void visitAddExpr (AffineBinaryOpExpr expr)
 
void visitDimExpr (AffineDimExpr expr)
 
void visitSymbolExpr (AffineSymbolExpr expr)
 
void visitConstantExpr (AffineConstantExpr expr)
 
void visitCeilDivExpr (AffineBinaryOpExpr expr)
 
void visitFloorDivExpr (AffineBinaryOpExpr expr)
 
void visitModExpr (AffineBinaryOpExpr expr)
 
- Public Member Functions inherited from mlir::AffineExprVisitor< SimpleAffineExprFlattener >
void walkPostOrder (AffineExpr expr)
 
void visit (AffineExpr expr)
 
void visitAffineBinaryOpExpr (AffineBinaryOpExpr expr)
 
void visitAddExpr (AffineBinaryOpExpr expr)
 
void visitMulExpr (AffineBinaryOpExpr expr)
 
void visitModExpr (AffineBinaryOpExpr expr)
 
void visitFloorDivExpr (AffineBinaryOpExpr expr)
 
void visitCeilDivExpr (AffineBinaryOpExpr expr)
 
void visitConstantExpr (AffineConstantExpr expr)
 
void visitDimExpr (AffineDimExpr expr)
 
void 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 248 of file AffineExprVisitor.h.

Constructor & Destructor Documentation

◆ SimpleAffineExprFlattener()

SimpleAffineExprFlattener::SimpleAffineExprFlattener ( unsigned  numDims,
unsigned  numSymbols 
)

Definition at line 1119 of file AffineExpr.cpp.

References operandExprStack.

◆ ~SimpleAffineExprFlattener()

virtual mlir::SimpleAffineExprFlattener::~SimpleAffineExprFlattener ( )
virtualdefault

Member Function Documentation

◆ addLocalFloorDivId()

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

Definition at line 1381 of file AffineExpr.cpp.

References localExprs, numLocals, and operandExprStack.

Referenced by visitModExpr().

◆ addLocalIdSemiAffine()

void SimpleAffineExprFlattener::addLocalIdSemiAffine ( AffineExpr  localExpr)
protectedvirtual

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 1392 of file AffineExpr.cpp.

References localExprs, numLocals, and operandExprStack.

◆ visitAddExpr()

void SimpleAffineExprFlattener::visitAddExpr ( AffineBinaryOpExpr  expr)

Definition at line 1156 of file AffineExpr.cpp.

References operandExprStack.

◆ visitCeilDivExpr()

void SimpleAffineExprFlattener::visitCeilDivExpr ( AffineBinaryOpExpr  expr)

Definition at line 1247 of file AffineExpr.cpp.

◆ visitConstantExpr()

void SimpleAffineExprFlattener::visitConstantExpr ( AffineConstantExpr  expr)

Definition at line 1268 of file AffineExpr.cpp.

References mlir::AffineConstantExpr::getValue(), and operandExprStack.

◆ visitDimExpr()

void SimpleAffineExprFlattener::visitDimExpr ( AffineDimExpr  expr)

Definition at line 1254 of file AffineExpr.cpp.

References mlir::AffineDimExpr::getPosition(), numDims, and operandExprStack.

◆ visitFloorDivExpr()

void SimpleAffineExprFlattener::visitFloorDivExpr ( AffineBinaryOpExpr  expr)

Definition at line 1250 of file AffineExpr.cpp.

◆ visitModExpr()

void SimpleAffineExprFlattener::visitModExpr ( AffineBinaryOpExpr  expr)

◆ visitMulExpr()

void SimpleAffineExprFlattener::visitMulExpr ( AffineBinaryOpExpr  expr)

◆ visitSymbolExpr()

void SimpleAffineExprFlattener::visitSymbolExpr ( AffineSymbolExpr  expr)

Member Data Documentation

◆ localExprs

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

◆ numDims

unsigned mlir::SimpleAffineExprFlattener::numDims

Definition at line 258 of file AffineExprVisitor.h.

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

◆ numLocals

unsigned mlir::SimpleAffineExprFlattener::numLocals

◆ numSymbols

unsigned mlir::SimpleAffineExprFlattener::numSymbols

Definition at line 259 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: