[wip] pointer decompression no-op
diff --git a/include/cppgc/internal/member-storage.h b/include/cppgc/internal/member-storage.h
index f862740..7fff2ea 100644
--- a/include/cppgc/internal/member-storage.h
+++ b/include/cppgc/internal/member-storage.h
@@ -154,6 +154,14 @@
// the cage alignment.
CPPGC_DCHECK((!compressed || compressed == kCompressedSentinel) ||
(compressed & (1 << 31)));
+
+ // Tell the compiler that decompressing this compressed pointer
+ // is a no-op. Note that Clang is unable to inline Decompress()
+ // into an assume, so we need to write it out fully.
+ [[assume(((static_cast<uint64_t>(static_cast<int32_t>(compressed))
+ << api_constants::kPointerCompressionShift) &
+ base) == uptr)]];
+
return compressed;
}
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
📍 Job mac-m1_mini_2020-perf/speedometer3 complete.
See results at: https://pinpoint-dot-chromeperf.appspot.com/job/13203474b10000
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |