[LLVMdev] inefficiencies in ConstantUniqueMap ?

Jay Foad jay.foad at gmail.com
Sat Jun 25 11:59:20 PDT 2011


On 25 June 2011 13:00, Duncan Sands <baldrick at free.fr> wrote:
>> 3. Clang/dragonegg need to adapt to the new API (help appreciated!)
>
> what needs to be done exactly?

Background info: http://www.nondot.org/sabre/LLVMNotes/TypeSystemRewrite.txt

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've played with the Clang bits of this. The biggest problem I've
found is that Clang uses LLVM's type resolution not just for
forward-declared structs/classes/unions, which convert
straightforwardly to the new system, but also for forward-declared
enums, which don't.

Also, varargs forms of StructType::createNamed() and
StructType::setBody() would save a lot of mindless churn in the Clang
source code.

Jay.



More information about the llvm-dev mailing list