[PATCH] D41903: [ValueLattice] Use union to shave off ptr size bytes from elements.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 10 05:23:03 PST 2018


fhahn created this revision.
fhahn added reviewers: reames, anna, davide.

By using a union for Constant* and ConstantRange we can shave off ptr
size bytes off lattice elements. On 64 bit systems, it brings down the
size to 40 bytes from 48 bytes.

Initialization of Range happens on-demand using placement new, if the
state changes to constantrange from non-constantrange. Similarly, the
Range object is destroyed if the state changes from constantrange to
non-constantrange.


https://reviews.llvm.org/D41903

Files:
  include/llvm/Analysis/ValueLattice.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41903.129256.patch
Type: text/x-patch
Size: 5101 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180110/90c8b630/attachment.bin>


More information about the llvm-commits mailing list