[polly] ce8272a - [Polly][Isl] Use isl::val::sub instead of isl::val::sub_ui. NFC
Riccardo Mori via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 17 00:34:58 PDT 2021
Author: Riccardo Mori
Date: 2021-08-17T09:34:52+02:00
New Revision: ce8272afb3fde5599d6d3827576aa9edda0da322
URL: https://github.com/llvm/llvm-project/commit/ce8272afb3fde5599d6d3827576aa9edda0da322
DIFF: https://github.com/llvm/llvm-project/commit/ce8272afb3fde5599d6d3827576aa9edda0da322.diff
LOG: [Polly][Isl] Use isl::val::sub instead of isl::val::sub_ui. NFC
This is part of an effort to reduce the differences between the custom C++ bindings used right now by polly in `lib/External/isl/include/isl/isl-noxceptions.h` and the official isl C++ interface.
Changes made:
- Use `isl::val::sub` instead of `isl::val::sub_ui`
- `isl-noexceptions.h` has been generated by https://github.com/patacca/isl/commit/355e84163ae78ff637c71fb532f36d15277a2b1b
Depends on D107225
Reviewed By: Meinersbur
Differential Revision: https://reviews.llvm.org/D107293
Added:
Modified:
polly/lib/Analysis/ScopInfo.cpp
polly/lib/External/isl/include/isl/isl-noexceptions.h
polly/unittests/Isl/IslTest.cpp
Removed:
################################################################################
diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp
index 965776b8b3457..659961215b951 100644
--- a/polly/lib/Analysis/ScopInfo.cpp
+++ b/polly/lib/Analysis/ScopInfo.cpp
@@ -195,7 +195,7 @@ static isl::set addRangeBoundsToSet(isl::set S, const ConstantRange &Range,
isl::set SLB = S.lower_bound_val(type, dim, V);
V = valFromAPInt(Ctx.get(), Range.getUpper(), true);
- V = V.sub_ui(1);
+ V = V.sub(1);
isl::set SUB = S.upper_bound_val(type, dim, V);
S = SLB.unite(SUB);
}
diff --git a/polly/lib/External/isl/include/isl/isl-noexceptions.h b/polly/lib/External/isl/include/isl/isl-noexceptions.h
index 5142941900ce8..4e81211c77094 100644
--- a/polly/lib/External/isl/include/isl/isl-noexceptions.h
+++ b/polly/lib/External/isl/include/isl/isl-noexceptions.h
@@ -4801,7 +4801,6 @@ class val {
inline int sgn() const;
inline isl::val sub(isl::val v2) const;
inline isl::val sub(long v2) const;
- inline isl::val sub_ui(unsigned long v2) const;
inline isl::val_list to_list() const;
inline isl::val trunc() const;
static inline isl::val zero(isl::ctx ctx);
@@ -22787,12 +22786,6 @@ isl::val val::sub(long v2) const
return this->sub(isl::val(ctx(), v2));
}
-isl::val val::sub_ui(unsigned long v2) const
-{
- auto res = isl_val_sub_ui(copy(), v2);
- return manage(res);
-}
-
isl::val_list val::to_list() const
{
auto res = isl_val_to_list(copy());
diff --git a/polly/unittests/Isl/IslTest.cpp b/polly/unittests/Isl/IslTest.cpp
index 72c0a85133b90..42730af278dd2 100644
--- a/polly/unittests/Isl/IslTest.cpp
+++ b/polly/unittests/Isl/IslTest.cpp
@@ -136,7 +136,7 @@ TEST(Isl, APIntToIslVal) {
{
APInt APNOne(32, (1ull << 32) - 1, false);
auto IslNOne = valFromAPInt(IslCtx, APNOne, false);
- auto IslRef = isl::val(IslCtx, 32).pow2().sub_ui(1);
+ auto IslRef = isl::val(IslCtx, 32).pow2().sub(1);
EXPECT_EQ(IslNOne, IslRef);
}
@@ -223,7 +223,7 @@ TEST(Isl, IslValToAPInt) {
}
{
- auto IslNOne = isl::val(IslCtx, 32).pow2().sub_ui(1);
+ auto IslNOne = isl::val(IslCtx, 32).pow2().sub(1);
auto APNOne = APIntFromVal(IslNOne);
EXPECT_EQ((1ull << 32) - 1, APNOne);
EXPECT_EQ(33u, APNOne.getBitWidth());
@@ -232,7 +232,7 @@ TEST(Isl, IslValToAPInt) {
{
auto IslLargeNum = isl::val(IslCtx, 60);
IslLargeNum = IslLargeNum.pow2();
- IslLargeNum = IslLargeNum.sub_ui(1);
+ IslLargeNum = IslLargeNum.sub(1);
auto APLargeNum = APIntFromVal(IslLargeNum);
EXPECT_EQ((1ull << 60) - 1, APLargeNum);
EXPECT_EQ(61u, APLargeNum.getBitWidth());
More information about the llvm-commits
mailing list