[llvm] [Analysis] Add Scalable field in MemoryLocation.h (PR #69716)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 24 12:45:46 PDT 2023


================
@@ -64,16 +64,19 @@ class Value;
 //
 // If asked to represent a pathologically large value, this will degrade to
 // std::nullopt.
+// Store Scalable information in bit 62 of Value. Scalable information is
+// required to do Alias Analysis on Scalable quantities
 class LocationSize {
   enum : uint64_t {
     BeforeOrAfterPointer = ~uint64_t(0),
-    AfterPointer = BeforeOrAfterPointer - 1,
+    ScalableBit = uint64_t(1) << 62,
+    AfterPointer = (BeforeOrAfterPointer - 1) & ~ScalableBit,
----------------
topperc wrote:

Why does `AfterPointer` have the ScalableBit cleared but none of the other sentinel values do?

https://github.com/llvm/llvm-project/pull/69716


More information about the llvm-commits mailing list