[LLVMdev] Proposed: first class packed structures

Andrew Lenharth andrewl at lenharth.org
Fri Dec 8 06:12:54 PST 2006

On 12/8/06, Reid Spencer <rspencer at reidspencer.com> wrote:
> If you *really* want to be efficient, the *right* way to do this is to
> create a new TypeID and the corresponding  class (class
> PackedStructureType : public StructureType). That way it costs nothing
> (the value of the TypeID indicates that its PackedStructure) and there's
> no need to mess with an additional byte in the StructureType class.
> But, that might be a little heavy weight :)

I thought of that, but packed really seemed like an attribute on an
existing class and not worth making a subclass for.  Thus adding a
TypeID for it would mean we had a typeID that didn't corrospond to a
real class.


More information about the llvm-dev mailing list