[LLVMdev] module level asm printer

reed kotler rkotler at mips.com
Fri Oct 11 20:28:27 PDT 2013


I want to be able to do some final optimization at the module level on 
the list of mcinsts that make up all the module code.

This is part of constant islands for Mips16.  I want to be able to 
create one constant pool for the whole module, instead of
one per function.

This can be done by essentially just writing a version of 
emitInstruction in asmPrinter and then saving all the McInsts and
doing the finally writing when the destructor for the output streamer 
would be called. I know of one port that already does
just this but it's not in the llvm repository for anyone to see.

Is there any cleaner way to do this?

Thoughts?

Reed





More information about the llvm-dev mailing list