Lines Matching defs:cst
296 // memo is initilized as follows for a `cst` with 5 dims, when offset=2, num=2:
298 // cst ==> c0 c1 c2 c3 c4 ...
302 static bool detectAsMod(const FlatLinearConstraints &cst, unsigned pos,
306 assert(pos < cst.getNumVars() && "invalid position");
315 for (unsigned curEquality = 0, numEqualities = cst.getNumEqualities();
317 int64_t coefficientAtPos = cst.atEq64(curEquality, pos);
324 if (cst.atEq64(curEquality, cst.getNumCols() - 1) != 0)
342 for (curVar = 0, e = cst.getNumDimAndSymbolVars(); curVar < e; ++curVar) {
346 int64_t coefficientOfCurVar = cst.atEq64(curEquality, curVar);
375 dividendExpr = simplifyAffineExpr(dividendExpr, cst.getNumDimVars(),
376 cst.getNumSymbolVars());
393 auto ub = cst.getConstantBound64(BoundType::UB, dimExprCol);
418 static bool detectAsFloorDiv(const FlatLinearConstraints &cst, unsigned pos,
421 assert(pos < cst.getNumVars() && "invalid position");
424 SmallVector<bool, 8> foundRepr(cst.getNumVars(), false);
425 for (unsigned i = 0, e = cst.getNumVars(); i < e; ++i)
429 SmallVector<int64_t, 8> dividend(cst.getNumCols());
431 auto ulPair = computeSingleVarRepr(cst, foundRepr, pos, dividend, divisor);
439 for (unsigned c = 0, f = cst.getNumVars(); c < f; c++)
989 /// Checks if the SSA values associated with `cst`'s variables in range
992 const FlatLinearValueConstraints &cst, unsigned start, unsigned end) {
994 assert(start <= cst.getNumDimAndSymbolVars() &&
996 assert(end <= cst.getNumDimAndSymbolVars() && "End position out of bounds");
1002 SmallVector<std::optional<Value>, 8> maybeValuesAll = cst.getMaybeValues();
1013 /// Checks if the SSA values associated with `cst`'s variables are unique.
1015 areVarsUnique(const FlatLinearValueConstraints &cst) {
1016 return areVarsUnique(cst, 0, cst.getNumDimAndSymbolVars());
1019 /// Checks if the SSA values associated with `cst`'s variables of kind `kind`
1022 areVarsUnique(const FlatLinearValueConstraints &cst, VarKind kind) {
1025 return areVarsUnique(cst, 0, cst.getNumDimVars());
1027 return areVarsUnique(cst, cst.getNumDimVars(),
1028 cst.getNumDimAndSymbolVars());
1308 FlatLinearConstraints cst;
1310 LogicalResult result = getFlattenedAffineExprs(map, &flattenedExprs, &cst);
1315 DivisionRepr divs = cst.getLocalReprs();