[PATCH] D107293: [Polly][Isl] Use isl::val::sub instead of isl::val::sub_ui. NFC
Riccardo Mori via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 2 10:15:15 PDT 2021
patacca created this revision.
Herald added a reviewer: bollu.
patacca retitled this revision from "[Polly][Isl] Use isl::val::sub instead of isl::val::sub_ui" to "[Polly][Isl] Use isl::val::sub instead of isl::val::sub_ui. NFC".
patacca edited the summary of this revision.
patacca added a reviewer: Meinersbur.
patacca added a project: Polly.
patacca published this revision for review.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
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/6b2cc0baebd034919c10a68eb5bb1078f9d31b32
Depends on D107225 <https://reviews.llvm.org/D107225>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D107293
Files:
polly/lib/Analysis/ScopInfo.cpp
polly/lib/External/isl/include/isl/isl-noexceptions.h
polly/unittests/Isl/IslTest.cpp
Index: polly/unittests/Isl/IslTest.cpp
===================================================================
--- polly/unittests/Isl/IslTest.cpp
+++ polly/unittests/Isl/IslTest.cpp
@@ -144,7 +144,7 @@
{
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);
}
@@ -231,7 +231,7 @@
}
{
- 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());
@@ -240,7 +240,7 @@
{
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());
Index: polly/lib/External/isl/include/isl/isl-noexceptions.h
===================================================================
--- polly/lib/External/isl/include/isl/isl-noexceptions.h
+++ polly/lib/External/isl/include/isl/isl-noexceptions.h
@@ -4870,7 +4870,6 @@
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);
@@ -22807,12 +22806,6 @@
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());
Index: polly/lib/Analysis/ScopInfo.cpp
===================================================================
--- polly/lib/Analysis/ScopInfo.cpp
+++ polly/lib/Analysis/ScopInfo.cpp
@@ -195,7 +195,7 @@
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);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107293.363512.patch
Type: text/x-patch
Size: 2323 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210802/a1ef8fdd/attachment.bin>
More information about the llvm-commits
mailing list