[LLVMdev] Testcases where GVN uses too much memory?

Duncan P. N. Exon Smith dexonsmith at apple.com
Sat May 3 09:55:22 PDT 2014


On 2014 May 3, at 07:59, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote:

> After this patch:
> 
>  - The memory footprint of the common case is unchanged: if there's
>    only one element, then it's still 24B stored in-line with no
>    additional allocation.  However, runtime speed is probably slower
>    because of the branch to check where the storage is.  (How much
>    slower?)

I'm not even sure that `LeaderTable` is a problem (having no data!), but
if it is, it wouldn't be hard to shave 8B off of the static storage,
helping even the common case.  `Value` is always word-aligned, so we
could steal its LSB to indicate short vs. long mode.  In long mode, the
rest of the `Value` pointer can used for size and capacity, and the
`BasicBlock` pointer can point to external storage.



More information about the llvm-dev mailing list