forked from OSchip/llvm-project
[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 355e84163a
Depends on D107225
Reviewed By: Meinersbur
Differential Revision: https://reviews.llvm.org/D107293
This commit is contained in:
parent
1689dade42
commit
ce8272afb3
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -4801,7 +4801,6 @@ public:
|
|||
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());
|
||||
|
|
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue