[PATCH] Introduce bitset global attribute and bitset lowering pass.
peter at pcc.me.uk
Thu Jan 29 18:42:39 PST 2015
This patch introduces a new mechanism that allows IR modules to co-operatively
build pointer sets corresponding to addresses within a given set of
globals. One particular use case for this is to allow a C++ program to
efficiently verify (at each call site) that a vtable pointer is in the set
of valid vtable pointers for the class or its derived classes. One way of
doing this is for a toolchain component to build, for each class, a bit set
that maps to the memory region allocated for the vtables, such that each 1
bit in the bit set maps to a valid vtable for that class, and lay out the
vtables next to each other, to minimize the total size of the bit sets.
The patch introduces a new 'bitset' global attribute, an '@llvm.bitset.test'
intrinsic and an LTO lowering pass that lays out the globals and builds the
bitsets, and documents the new feature.
Design discussion: http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-January/081285.html
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 33840 bytes
Desc: not available
More information about the llvm-commits