[llvm] [Statepoint] Optimize Location structure size (PR #78600)

Danila Malyutin via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 18 07:37:23 PST 2024


================
@@ -268,12 +268,13 @@ class StackMaps {
       ConstantIndex
     };
     LocationType Type = Unprocessed;
-    unsigned Size = 0;
-    unsigned Reg = 0;
-    int64_t Offset = 0;
+    unsigned short Size = 0;
----------------
danilaml wrote:

This struct can be made even smaller (8 bytes) if we borrow some bits from size (or Reg), but that'd probably require changing StackMap format, since it allows for full 16 bits for size, even though it's not really useful in practice for most cases.

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


More information about the llvm-commits mailing list