Lines Matching refs:cst
90 static LogicalResult getDivRepr(const IntegerRelation &cst, unsigned pos, in getDivRepr() argument
95 assert(pos <= cst.getNumVars() && "Invalid variable position"); in getDivRepr()
96 assert(ubIneq <= cst.getNumInequalities() && in getDivRepr()
98 assert(lbIneq <= cst.getNumInequalities() && in getDivRepr()
100 assert(expr.size() == cst.getNumCols() && "Invalid expression size"); in getDivRepr()
103 divisor = cst.atIneq(lbIneq, pos); in getDivRepr()
108 for (i = 0, e = cst.getNumVars(); i < e; ++i) in getDivRepr()
109 if (cst.atIneq(ubIneq, i) != -cst.atIneq(lbIneq, i)) in getDivRepr()
118 int64_t constantSum = cst.atIneq(lbIneq, cst.getNumCols() - 1) + in getDivRepr()
119 cst.atIneq(ubIneq, cst.getNumCols() - 1); in getDivRepr()
130 for (i = 0, e = cst.getNumVars(); i < e; ++i) in getDivRepr()
132 expr[i] = cst.atIneq(ubIneq, i); in getDivRepr()
137 expr.back() = cst.atIneq(ubIneq, cst.getNumCols() - 1) + c; in getDivRepr()
154 static LogicalResult getDivRepr(const IntegerRelation &cst, unsigned pos, in getDivRepr() argument
158 assert(pos <= cst.getNumVars() && "Invalid variable position"); in getDivRepr()
159 assert(eqInd <= cst.getNumEqualities() && "Invalid equality position"); in getDivRepr()
160 assert(expr.size() == cst.getNumCols() && "Invalid expression size"); in getDivRepr()
165 int64_t tempDiv = cst.atEq(eqInd, pos); in getDivRepr()
173 for (unsigned i = 0, e = cst.getNumVars(); i < e; ++i) in getDivRepr()
175 expr[i] = -signDiv * cst.atEq(eqInd, i); in getDivRepr()
177 expr.back() = -signDiv * cst.atEq(eqInd, cst.getNumCols() - 1); in getDivRepr()
185 static bool checkExplicitRepresentation(const IntegerRelation &cst, in checkExplicitRepresentation() argument
190 for (unsigned c = 0, e = cst.getNumVars(); c < e; ++c) { in checkExplicitRepresentation()
217 const IntegerRelation &cst, ArrayRef<bool> foundRepr, unsigned pos, in computeSingleVarRepr() argument
219 assert(pos < cst.getNumVars() && "invalid position"); in computeSingleVarRepr()
220 assert(foundRepr.size() == cst.getNumVars() && in computeSingleVarRepr()
222 assert(dividend.size() == cst.getNumCols() && "Invalid dividend size"); in computeSingleVarRepr()
225 cst.getLowerAndUpperBoundIndices(pos, &lbIndices, &ubIndices, &eqIndices); in computeSingleVarRepr()
231 if (failed(getDivRepr(cst, pos, ubPos, lbPos, dividend, divisor))) in computeSingleVarRepr()
234 if (!checkExplicitRepresentation(cst, foundRepr, dividend, pos)) in computeSingleVarRepr()
244 if (failed(getDivRepr(cst, pos, eqPos, dividend, divisor))) in computeSingleVarRepr()
247 if (!checkExplicitRepresentation(cst, foundRepr, dividend, pos)) in computeSingleVarRepr()