[PATCH] Allocate MCSymbol Name intrusively only when required

Pete Cooper peter_cooper at apple.com
Mon Jun 8 12:19:45 PDT 2015


Hi all

Recent work by Rafael and Duncan has greatly reduced the number of MCSymbol’s which are actually named.  In particular, temporary symbols typically don’t need names.  On the verify_uselist_order test case for example, only around 50,000 symbols have names out of 700,000 total symbols.

This patch moves the storage for the Name* itself to be allocated prior to the MCSymbol.  This is similar to how User allocates Use’s in a custom new/delete.

Given that a symbol is currently 48 bytes on MachO, this reduces it by 16% on the typical case.  I have other patches coming which will get us to 24-bytes which is on average half the current amount.

Cheers,
Pete

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mcsymbol-name.diff
Type: application/octet-stream
Size: 5690 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150608/abeea69b/attachment.obj>


More information about the llvm-commits mailing list