Skip to content

Commit c4a21d1

Browse files
committed
minor
1 parent 04d1f4a commit c4a21d1

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

include/phasar/Utils/StableVector.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ class StableVector {
5252

5353
Iterator &operator++() noexcept {
5454
if (LLVM_LIKELY(++It != ItEnd)) {
55+
/// Let the compiler optimize away the operator== call entirely
56+
__builtin_assume(It != nullptr);
5557
return *this;
5658
}
5759

@@ -64,6 +66,7 @@ class StableVector {
6466
// We are at the end of the main loop => enter the tail loop now
6567
It = *Outer;
6668
ItEnd = Pos;
69+
__builtin_assume(It != nullptr);
6770
return *this;
6871
}
6972
// We are still in the main loop
@@ -72,6 +75,7 @@ class StableVector {
7275
ItEnd = It + Total;
7376

7477
Total <<= 1;
78+
__builtin_assume(It != nullptr);
7579
return *this;
7680
}
7781

0 commit comments

Comments
 (0)