Skip to content

Commit 3262591

Browse files
author
Min Chen
committed
Only enable PresburgerSet for llvm version >= 15
1 parent 9a24a83 commit 3262591

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/arith/presburger_set.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
namespace tvm {
4343
namespace arith {
4444

45-
#ifdef TVM_MLIR_VERSION
45+
#if TVM_MLIR_VERSION >= 150
4646
using namespace tir;
4747

4848
void Update(const PrimExpr& constraint, PresburgerSetNode* intset) {
@@ -229,7 +229,7 @@ TVM_STATIC_IR_FUNCTOR(ReprPrinter, vtable)
229229
p->stream << "}";
230230
});
231231

232-
#endif
232+
#endif // TVM_MLIR_VERSION
233233

234234
PresburgerSet MakePresburgerSet(const PrimExpr& constraint) { return PresburgerSet(constraint); }
235235

src/arith/presburger_set.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#ifndef TVM_ARITH_PRESBURGER_SET_H_
2525
#define TVM_ARITH_PRESBURGER_SET_H_
2626

27-
#ifdef TVM_MLIR_VERSION
27+
#if TVM_MLIR_VERSION >=150
2828
#include <mlir/Analysis/Presburger/IntegerRelation.h>
2929
#include <mlir/Analysis/Presburger/PresburgerRelation.h>
3030
#include <mlir/Analysis/Presburger/Simplex.h>
@@ -41,7 +41,7 @@
4141
namespace tvm {
4242
namespace arith {
4343

44-
#ifdef TVM_MLIR_VERSION
44+
#if TVM_MLIR_VERSION >=150
4545
using namespace mlir;
4646
using namespace presburger;
4747

tests/cpp/arith_integer_set_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* under the License.
1818
*/
1919

20-
#ifdef TVM_MLIR_VERSION
20+
#if TVM_MLIR_VERSION >= 150
2121
#include <dmlc/logging.h>
2222
#include <gtest/gtest.h>
2323
#include <tvm/arith/analyzer.h>
@@ -38,4 +38,4 @@ TEST(PresburgerSet, eval) {
3838
ASSERT_TRUE(tvm::tir::is_zero(result.min()));
3939
ASSERT_TRUE(tvm::tir::is_const_int(result.max(), 38));
4040
}
41-
#endif
41+
#endif // TVM_MLIR_VERSION

0 commit comments

Comments
 (0)