File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,8 +52,10 @@ class StableVector {
5252
5353 Iterator &operator ++() noexcept {
5454 if (LLVM_LIKELY (++It != ItEnd)) {
55- // / Let the compiler optimize away the operator== call entirely
55+ // / Let the compiler optimize away the operator== call entirely
56+ #if __has_builtin(__builtin_assume)
5657 __builtin_assume (It != nullptr );
58+ #endif
5759 return *this ;
5860 }
5961
@@ -66,7 +68,9 @@ class StableVector {
6668 // We are at the end of the main loop => enter the tail loop now
6769 It = *Outer;
6870 ItEnd = Pos;
71+ #if __has_builtin(__builtin_assume)
6972 __builtin_assume (It != nullptr );
73+ #endif
7074 return *this ;
7175 }
7276 // We are still in the main loop
@@ -75,7 +79,9 @@ class StableVector {
7579 ItEnd = It + Total;
7680
7781 Total <<= 1 ;
82+ #if __has_builtin(__builtin_assume)
7883 __builtin_assume (It != nullptr );
84+ #endif
7985 return *this ;
8086 }
8187
You can’t perform that action at this time.
0 commit comments