Home
last modified time | relevance | path

Searched refs:AffineExpr (Results 1 – 25 of 102) sorted by relevance

12345

/llvm-project-15.0.7/mlir/include/mlir/IR/
H A DAffineExpr.h68 class AffineExpr {
140 AffineExpr replace(AffineExpr expr, AffineExpr replacement) const;
145 AffineExpr replace(const DenseMap<AffineExpr, AffineExpr> &map) const;
158 AffineExpr operator+(AffineExpr other) const;
161 AffineExpr operator-(AffineExpr other) const;
163 AffineExpr operator*(AffineExpr other) const;
165 AffineExpr floorDiv(AffineExpr other) const;
167 AffineExpr ceilDiv(AffineExpr other) const;
169 AffineExpr operator%(AffineExpr other) const;
246 inline AffineExpr operator-(int64_t val, AffineExpr expr) {
[all …]
H A DAffineMap.h60 AffineExpr result);
162 ArrayRef<AffineExpr> getResults() const;
163 AffineExpr getResult(unsigned idx) const;
204 AffineMap replace(AffineExpr expr, AffineExpr replacement,
210 AffineMap replace(const DenseMap<AffineExpr, AffineExpr> &map) const;
215 AffineMap replace(const DenseMap<AffineExpr, AffineExpr> &map,
225 [&](AffineExpr e) {
237 [&](AffineExpr e) {
375 SmallVector<AffineExpr, 8> results;
553 for (AffineExpr expr : map.getResults()) { in applyPermutationMap()
[all …]
H A DIntegerSet.h52 ArrayRef<AffineExpr> constraints,
71 IntegerSet replaceDimsAndSymbols(ArrayRef<AffineExpr> dimReplacements,
72 ArrayRef<AffineExpr> symReplacements,
87 ArrayRef<AffineExpr> getConstraints() const;
89 AffineExpr getConstraint(unsigned idx) const;
103 void walkExprs(function_ref<void(AffineExpr)> callback) const;
H A DAffineExprVisitor.h75 RetTy walkPostOrder(AffineExpr expr) { in walkPostOrder()
117 RetTy visit(AffineExpr expr) { in visit()
271 SmallVector<AffineExpr, 4> localExprs;
301 AffineExpr localExpr);
310 virtual void addLocalIdSemiAffine(AffineExpr localExpr);
319 void addLocalVariableSemiAffine(AffineExpr expr,
333 int findLocalId(AffineExpr localExpr);
H A DBuiltinTypes.h27 class AffineExpr; variable
440 SmallVectorImpl<AffineExpr> &strides,
441 AffineExpr &offset);
487 AffineExpr makeCanonicalStridedLayoutExpr(ArrayRef<int64_t> sizes,
488 ArrayRef<AffineExpr> exprs,
493 AffineExpr makeCanonicalStridedLayoutExpr(ArrayRef<int64_t> sizes,
/llvm-project-15.0.7/mlir/lib/IR/
H A DAffineExpr.cpp132 AffineExpr::replace(const DenseMap<AffineExpr, AffineExpr> &map) const { in replace() argument
156 AffineExpr AffineExpr::replace(AffineExpr expr, AffineExpr replacement) const { in replace()
524 static AffineExpr simplifyAdd(AffineExpr lhs, AffineExpr rhs) { in simplifyAdd()
642 AffineExpr AffineExpr::operator+(AffineExpr other) const { in operator +()
652 static AffineExpr simplifyMul(AffineExpr lhs, AffineExpr rhs) { in simplifyMul()
702 AffineExpr AffineExpr::operator*(AffineExpr other) const { in operator *()
718 AffineExpr AffineExpr::operator-(AffineExpr other) const { in operator -()
768 AffineExpr AffineExpr::floorDiv(AffineExpr other) const { in floorDiv()
811 AffineExpr AffineExpr::ceilDiv(AffineExpr other) const { in ceilDiv()
821 static AffineExpr simplifyMod(AffineExpr lhs, AffineExpr rhs) { in simplifyMod()
[all …]
H A DAffineMap.cpp356 SmallVector<AffineExpr, 4> exprs; in partialConstantFold()
407 AffineMap AffineMap::replace(AffineExpr expr, AffineExpr replacement, in replace()
412 for (AffineExpr e : getResults()) in replace()
420 AffineMap AffineMap::replace(const DenseMap<AffineExpr, AffineExpr> &map, in replace() argument
425 for (AffineExpr e : getResults()) in replace()
431 AffineMap::replace(const DenseMap<AffineExpr, AffineExpr> &map) const { in replace() argument
434 for (AffineExpr e : getResults()) in replace()
456 SmallVector<AffineExpr, 8> exprs; in compose()
465 SmallVector<AffineExpr, 4> exprs; in compose()
515 SmallVector<AffineExpr, 4> exprs; in getSubMap()
[all …]
H A DAffineMapDetail.h27 public llvm::TrailingObjects<AffineMapStorage, AffineExpr> {
29 using KeyTy = std::tuple<unsigned, unsigned, ArrayRef<AffineExpr>>;
38 ArrayRef<AffineExpr> results() const { in results()
39 return {getTrailingObjects<AffineExpr>(), numResults}; in results()
53 AffineMapStorage::totalSizeToAlloc<AffineExpr>(results.size()); in construct()
60 res->getTrailingObjects<AffineExpr>()); in construct()
H A DIntegerSet.cpp41 ArrayRef<AffineExpr> IntegerSet::getConstraints() const { in getConstraints()
45 AffineExpr IntegerSet::getConstraint(unsigned idx) const { in getConstraint()
63 void IntegerSet::walkExprs(function_ref<void(AffineExpr)> callback) const { in walkExprs()
69 ArrayRef<AffineExpr> dimReplacements, ArrayRef<AffineExpr> symReplacements, in replaceDimsAndSymbols()
71 SmallVector<AffineExpr, 8> constraints; in replaceDimsAndSymbols()
H A DBuiltinTypes.cpp808 offset = AffineExpr(); in getStridesAndOffset()
829 offset = AffineExpr(); in getStridesAndOffset()
840 AffineExpr offsetExpr; in getStridesAndOffset()
911 AffineExpr expr; in makeStridedLinearLayoutMap()
931 AffineExpr mult; in makeStridedLinearLayoutMap()
977 AffineExpr expr = in canonicalizeStridedLayout()
999 AffineExpr expr; in makeCanonicalStridedLayoutExpr()
1008 AffineExpr stride = dynamicPoisonBit in makeCanonicalStridedLayoutExpr()
1033 SmallVector<AffineExpr, 4> exprs; in makeCanonicalStridedLayoutExpr()
1061 SmallVector<AffineExpr> strides; in getOffsetExpr()
[all …]
H A DAffineExprDetail.h35 using KeyTy = std::tuple<unsigned, AffineExpr, AffineExpr>;
52 AffineExpr lhs;
53 AffineExpr rhs;
/llvm-project-15.0.7/mlir/lib/AsmParser/
H A DAffineParser.cpp78 AffineExpr parseNegateExpression(AffineExpr lhs);
84 AffineExpr getAffineBinaryOpExpr(AffineHighPrecOp op, AffineExpr lhs,
86 AffineExpr getAffineBinaryOpExpr(AffineLowPrecOp op, AffineExpr lhs,
88 AffineExpr parseAffineOperandExpr(AffineExpr lhs);
107 AffineExpr lhs, AffineExpr rhs, in getAffineBinaryOpExpr()
206 AffineExpr AffineParser::parseAffineHighPrecOpExpr(AffineExpr llhs, in parseAffineHighPrecOpExpr()
253 AffineExpr AffineParser::parseNegateExpression(AffineExpr lhs) { in parseNegateExpression()
351 AffineExpr AffineParser::parseAffineOperandExpr(AffineExpr lhs) { in parseAffineOperandExpr()
409 AffineExpr AffineParser::parseAffineLowPrecOpExpr(AffineExpr llhs, in parseAffineLowPrecOpExpr()
411 AffineExpr lhs; in parseAffineLowPrecOpExpr()
[all …]
/llvm-project-15.0.7/mlir/test/python/ir/
H A Daffine_expr.py34 a1 = AffineExpr.get_constant(42)
35 a2 = AffineExpr.get_constant(42)
36 a3 = AffineExpr.get_constant(43)
53 a1 = AffineExpr.get_constant(42)
55 a2 = AffineExpr.get_constant(42)
67 a1 = AffineExpr.get_constant(42)
86 d1 = AffineExpr.get_dim(1)
108 s1 = AffineExpr.get_symbol(1)
132 d12 = AffineExpr.get_add(d1, d2)
159 expr = AffineExpr.get_mul(d1, c2)
[all …]
/llvm-project-15.0.7/mlir/lib/Dialect/Utils/
H A DStructuredOpsUtils.cpp30 AffineExpr m = map2.getResult(0); in isRowMajorMatmul()
31 AffineExpr n = map2.getResult(1); in isRowMajorMatmul()
32 AffineExpr k = map0.getResult(1); in isRowMajorMatmul()
56 AffineExpr n = map2.getResult(0); in isColumnMajorMatmul()
57 AffineExpr m = map2.getResult(1); in isColumnMajorMatmul()
58 AffineExpr k = map0.getResult(0); in isColumnMajorMatmul()
82 AffineExpr b = map2.getResult(0); in isRowMajorBatchMatmul()
83 AffineExpr m = map2.getResult(1); in isRowMajorBatchMatmul()
84 AffineExpr n = map2.getResult(2); in isRowMajorBatchMatmul()
85 AffineExpr k = map0.getResult(2); in isRowMajorBatchMatmul()
/llvm-project-15.0.7/mlir/unittests/Dialect/Utils/
H A DStructuredOpsUtilsTest.cpp24 AffineExpr m, n, k; in TEST()
37 AffineExpr m, n, k; in TEST()
50 AffineExpr m, n, k; in TEST()
63 AffineExpr m, n, k; in TEST()
76 AffineExpr m, n, k; in TEST()
89 AffineExpr m, n, k; in TEST()
101 AffineExpr m, n, k; in TEST()
116 AffineExpr m, n, k; in TEST()
129 AffineExpr m, n, k; in TEST()
142 AffineExpr m, n, k; in TEST()
[all …]
/llvm-project-15.0.7/mlir/include/mlir/Dialect/Affine/
H A DUtils.h177 AffineExpr substWithMin(AffineExpr e, AffineExpr dim, AffineExpr min,
178 AffineExpr max, bool positivePath = true);
297 Value expandAffineExpr(OpBuilder &builder, Location loc, AffineExpr expr,
/llvm-project-15.0.7/mlir/include/mlir/Dialect/Linalg/IR/
H A DLinalg.h74 SmallVector<AffineExpr, 4> makeAffineDimExprs(unsigned num, unsigned &startIdx,
83 SmallVector<AffineExpr, 4> concat(ArrayRef<AffineExpr> a,
84 ArrayRef<AffineExpr> b);
/llvm-project-15.0.7/mlir/lib/Conversion/VectorToGPU/
H A DNvGpuSupport.cpp164 AffineExpr registerIdx = logicalValueId.floorDiv(elementsPerRegister); in getRegisterIndexToTileOffsetMap()
187 AffineExpr laneId, logicalValueIdDim; in getLaneIdAndValueIdToOperandCoord()
197 auto makeMap = [&](ArrayRef<AffineExpr> dimExprs) -> AffineMap { in getLaneIdAndValueIdToOperandCoord()
246 AffineExpr d0 = getAffineDimExpr(0, builder.getContext()); in getLaneIdToLdMatrixMatrixCoord()
248 auto makeMap = [&](ArrayRef<AffineExpr> dimExprs) -> AffineMap { in getLaneIdToLdMatrixMatrixCoord()
254 AffineExpr row = d0 % (operandShape[0]); in getLaneIdToLdMatrixMatrixCoord()
255 AffineExpr col = d0.floorDiv(operandShape[0]) * (kElementsPer128b); in getLaneIdToLdMatrixMatrixCoord()
285 using MapList = ArrayRef<ArrayRef<AffineExpr>>; in matchAndRewrite()
287 AffineExpr m; in matchAndRewrite()
288 AffineExpr n; in matchAndRewrite()
[all …]
/llvm-project-15.0.7/mlir/lib/Dialect/Affine/Utils/
H A DUtils.cpp459 AffineExpr mlir::substWithMin(AffineExpr e, AffineExpr dim, AffineExpr min, in substWithMin()
464 AffineExpr lhs = bin.getLHS(); in substWithMin()
465 AffineExpr rhs = bin.getRHS(); in substWithMin()
508 SmallVector<AffineExpr, 8> lbExprs; in normalizeAffineParallel()
509 SmallVector<AffineExpr, 8> ubExprs; in normalizeAffineParallel()
601 SmallVector<AffineExpr, 4> newUbExprs; in normalizeAffineFor()
1461 SmallVector<std::tuple<AffineExpr, AffineExpr, unsigned>, 4> floordivExprs; in getTileSizePos()
1480 for (std::tuple<AffineExpr, AffineExpr, unsigned> fexpr : floordivExprs) { in getTileSizePos()
1497 expr.walk([&](AffineExpr e) { in getTileSizePos()
1572 static AffineExpr createDimSizeExprForTiledLayout(AffineExpr oldMapOutput, in createDimSizeExprForTiledLayout()
[all …]
/llvm-project-15.0.7/mlir/python/mlir/dialects/linalg/opdsl/lang/
H A Daffine.py149 def build(self, state: Optional[AffineBuildState] = None) -> _ir.AffineExpr:
156 def _create(self, state: AffineBuildState) -> _ir.AffineExpr:
199 def _create(self, state: AffineBuildState) -> _ir.AffineExpr:
214 def _create(self, state: AffineBuildState) -> _ir.AffineExpr:
245 def _create(self, state: AffineBuildState) -> _ir.AffineExpr:
288 def _create(self, state: AffineBuildState) -> _ir.AffineExpr:
/llvm-project-15.0.7/mlir/unittests/Dialect/MemRef/
H A DInferShapeTest.cpp25 AffineExpr dim0; in TEST()
36 AffineExpr dim0, dim1; in TEST()
50 AffineExpr dim0, dim1; in TEST()
/llvm-project-15.0.7/mlir/python/mlir/_mlir_libs/_mlir/
H A Dir.pyi23 "AffineExpr",
131 class AffineExpr:
133 def _CAPICreate(self) -> AffineExpr: ...
134 def compose(self, arg0) -> AffineExpr: ...
225 class AffineBinaryExpr(AffineExpr):
230 def lhs(self) -> AffineExpr: ...
232 def rhs(self) -> AffineExpr: ...
243 class AffineConstantExpr(AffineExpr):
253 class AffineDimExpr(AffineExpr):
350 class AffineSymbolExpr(AffineExpr):
[all …]
/llvm-project-15.0.7/mlir/lib/Dialect/Affine/Analysis/
H A DAffineStructures.cpp60 AffineExpr localExpr) override { in addLocalFloorDivId()
909 SmallVector<AffineExpr, 4> lbExprs; in getLowerAndUpperBound()
929 SmallVector<AffineExpr, 4> ubExprs; in getLowerAndUpperBound()
989 SmallVector<AffineExpr, 8> memo(getNumVars()); in getSliceBounds()
1087 AffineExpr expr = memo[pos + offset]; in getSliceBounds()
1468 ArrayRef<AffineExpr> localExprs = in computeLocalVars()
1484 SmallVector<AffineExpr, 8> memo(getNumVars(), AffineExpr()); in getIneqAsAffineValueMap()
1528 SmallVector<AffineExpr, 8> memo(getNumVars(), AffineExpr()); in getAsIntegerSet()
1550 ArrayRef<AffineExpr> localExprs = in getAsIntegerSet()
1561 SmallVector<AffineExpr, 8> exprs; in getAsIntegerSet()
[all …]
/llvm-project-15.0.7/mlir/lib/Dialect/MemRef/Transforms/
H A DMultiBuffer.cpp123 AffineExpr induc = getAffineDimExpr(0, allocOp.getContext()); in multiBuffer()
124 AffineExpr init = getAffineDimExpr(1, allocOp.getContext()); in multiBuffer()
125 AffineExpr step = getAffineDimExpr(2, allocOp.getContext()); in multiBuffer()
126 AffineExpr expr = ((induc - init).floorDiv(step)) % multiplier; in multiBuffer()
/llvm-project-15.0.7/mlir/lib/Dialect/SCF/Utils/
H A DAffineCanonicalizationUtils.cpp58 SmallVector<AffineExpr> newResults; in addConstToResults()
59 for (AffineExpr r : map.getResults()) in addConstToResults()
235 AffineExpr ivUb; in addLoopRangeConstraints()
245 AffineExpr exprLb = lbInt ? rewriter.getAffineConstantExpr(*lbInt) in addLoopRangeConstraints()
247 AffineExpr exprUb = ubInt ? rewriter.getAffineConstantExpr(*ubInt) in addLoopRangeConstraints()

12345