diff options
author | patacca <patacca@autistici.org> | 2021-06-11 13:13:07 +0200 |
---|---|---|
committer | patacca <patacca@autistici.org> | 2021-06-11 14:44:24 +0200 |
commit | 7c7978a122fdd6eb1bc6300b3a2582108f13ff89 (patch) | |
tree | 57c68045416e6f143ca892c9ae7eca5a3ce6221b /polly/unittests | |
parent | cd2e500e555e134ffc19d07f26b17d0b0c71efd9 (diff) | |
download | llvm-7c7978a122fdd6eb1bc6300b3a2582108f13ff89.tar.gz |
[Polly][Isl] Removing explicit operator bool() from isl C++ bindings. 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:
- Removing explicit operator bool() from all the classes in the isl C++ bindings.
- Replace each call to operator bool() to method `is_null()`.
- isl-noexceptions.h has been generated by this https://github.com/patacca/isl/commit/27396daac5a5ee8228d25511a12f4a814c92ba8f
Reviewed By: Meinersbur
Differential Revision: https://reviews.llvm.org/D103976
Diffstat (limited to 'polly/unittests')
-rw-r--r-- | polly/unittests/DeLICM/DeLICMTest.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/polly/unittests/DeLICM/DeLICMTest.cpp b/polly/unittests/DeLICM/DeLICMTest.cpp index eaa37ee2376e..64318a4bc0d9 100644 --- a/polly/unittests/DeLICM/DeLICMTest.cpp +++ b/polly/unittests/DeLICM/DeLICMTest.cpp @@ -37,17 +37,17 @@ void completeLifetime(isl::union_set Universe, isl::union_map OccupiedAndKnown, isl::union_set &Undef) { auto ParamSpace = Universe.get_space(); - if (Undef && !Occupied) { - assert(!Occupied); + if (!Undef.is_null() && Occupied.is_null()) { + assert(Occupied.is_null()); Occupied = Universe.subtract(Undef); } - if (OccupiedAndKnown) { - assert(!Known); + if (!OccupiedAndKnown.is_null()) { + assert(Known.is_null()); Known = isl::union_map::empty(ParamSpace); - if (!Occupied) + if (Occupied.is_null()) Occupied = OccupiedAndKnown.domain(); for (isl::map Map : OccupiedAndKnown.get_map_list()) { @@ -57,19 +57,19 @@ void completeLifetime(isl::union_set Universe, isl::union_map OccupiedAndKnown, } } - if (!Undef) { - assert(Occupied); + if (Undef.is_null()) { + assert(!Occupied.is_null()); Undef = Universe.subtract(Occupied); } - if (!Known) { // By default, nothing is known. + if (Known.is_null()) { // By default, nothing is known. Known = isl::union_map::empty(ParamSpace); } // Conditions that must hold when returning. - assert(Occupied); - assert(Undef); - assert(Known); + assert(!Occupied.is_null()); + assert(!Undef.is_null()); + assert(!Known.is_null()); } typedef struct { @@ -97,17 +97,17 @@ bool checkIsConflictingNonsymmetricCommon( isl::union_map ProposedWritten) { // Determine universe (set of all possible domains). auto Universe = isl::union_set::empty(isl::space::params_alloc(Ctx, 0)); - if (ExistingOccupiedAndKnown) + if (!ExistingOccupiedAndKnown.is_null()) Universe = Universe.unite(ExistingOccupiedAndKnown.domain()); - if (ExistingUnused) + if (!ExistingUnused.is_null()) Universe = Universe.unite(ExistingUnused); - if (ExistingWritten) + if (!ExistingWritten.is_null()) Universe = Universe.unite(ExistingWritten.domain()); - if (ProposedOccupiedAndKnown) + if (!ProposedOccupiedAndKnown.is_null()) Universe = Universe.unite(ProposedOccupiedAndKnown.domain()); - if (ProposedUnused) + if (!ProposedUnused.is_null()) Universe = Universe.unite(ProposedUnused); - if (ProposedWritten) + if (!ProposedWritten.is_null()) Universe = Universe.unite(ProposedWritten.domain()); Universe = unionSpace(Universe); |