[LLVMdev] inefficiencies in ConstantUniqueMap ?

Chris Lattner clattner at apple.com
Thu Jun 30 13:23:21 PDT 2011


On Jun 30, 2011, at 8:56 AM, Jay Foad wrote:

>> The name-noname distinction still seems artificial to me.  I assume it is
>> being
>> driven by efficiency considerations: i.e. not allowing named types to be
>> refined
>> simplifies LLVM's internals considerably.
> 
> I see your point. Maybe Chris's implementation *does* allow you to
> refine unnamed types. I hadn't really considered it before.

There is no refinement in the new system: once a type is created, it doesn't change.  The only "refinement" allowed is to specify a body for a named type.

The implication of this is that the only way to get a recursive type is to use a 'named' struct.

If we were to simplify anything away, it would be anonymous structs.  I thought about this quite a bit, but I think that having the ability to allow simple (non-recursive) aggregation is really useful for frontends.

-Chris



More information about the llvm-dev mailing list