[LLVMdev] inefficiencies in ConstantUniqueMap ?
Duncan Sands
baldrick at free.fr
Thu Jun 30 06:21:47 PDT 2011
Hi Jay,
>>> As I understand it, PATypeHolder, OpaqueType and the Module's
>>> TypeSymbolTable are gone. Instead, StructTypes can optionally be
>>> named, and if they are then:
>>>
>>> - they use name equivalence instead of structural equivalence.
>>> - you can create them without any fields, and then add the fields
>>> later when the struct is complete.
>>
>> I find this distinction between structs with names and structs without
>> names strange. Why is a name relevant to anything? If you can add fields
>> to a struct with a name why not to a struct without a name?
>
> It's Chris's design and I don't feel qualified to speak on his behalf.
> But... isn't this just the way C works? Structs either have a tag, or
> some fields, or both, but definitely not neither? And structs with the
> same tag are the same type in C, which is why the name is relevant.
thanks for the explanation (which I didn't understand :( ). Hopefully Chris
will chime in.
Ciao, Duncan.
More information about the llvm-dev
mailing list