Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/arith/presburger_set.cc
Original file line number Diff line number Diff line change
Expand Up @@ -215,15 +215,19 @@ PresburgerSet Intersect(const Array<PresburgerSet>& sets) {

IntSet EvalSet(const PrimExpr& e, const PresburgerSet& set) {
Array<PrimExpr> tvm_coeffs = DetectLinearEquation(e, set->GetVars());
#if TVM_MLIR_VERSION >= 160
#if TVM_MLIR_VERSION >= 190
SmallVector<llvm::DynamicAPInt> coeffs;
#elif TVM_MLIR_VERSION >= 160
SmallVector<mlir::presburger::MPInt> coeffs;
#else
SmallVector<int64_t> coeffs;
#endif

coeffs.reserve(tvm_coeffs.size());
for (const PrimExpr& it : tvm_coeffs) {
#if TVM_MLIR_VERSION >= 160
#if TVM_MLIR_VERSION >= 190
coeffs.push_back(llvm::DynamicAPInt(*as_const_int(it)));
#elif TVM_MLIR_VERSION >= 160
coeffs.push_back(mlir::presburger::MPInt(*as_const_int(it)));
#else
coeffs.push_back(*as_const_int(it));
Expand Down