[LLVMdev] asmwriting times (was Re: LLVMContext: Suggestions for API Changes)

Albert Graef Dr.Graef at t-online.de
Mon Aug 24 14:27:18 PDT 2009


Dan Gohman wrote:
> One other question the occurs to me: is Pure dumping the whole Module
> at once, or is it manually writing out the IR in pieces?

Well, you hit the nail on the head with that one. ;-) In fact, I just
had the same idea. So, instead of selecting and emitting individual
globals and functions on the fly, I rewrote the .ll writer in Pure so
that it just erases unwanted stuff from the module and then emits the
entire module at once. Well, you guessed it, it runs a lot faster now. I
also see the minor slowdowns compared to LLVM 2.5 you mentioned, but
those I can easily live with.

Problem solved, thanks! (And sorry for wasting bandwidth with this.)

Thank you also for the hint about bitcode reading/writing. I'm aware of
this, but I actually prefer the .ll output because it's human-readable,
which is great for debugging purposes. I might add a bitcode writer some
time, but it's not a high priority for me right now.

What I'm really looking forward to is the .o writer, though
(http://wiki.llvm.org/Direct_Object_Code_Emission). That will make
things *much* easier for Pure users, as they won't have to install the
entire LLVM suite any more if all they want to do is batch-compile Pure
programs.

Albert

-- 
Dr. Albert Gr"af
Dept. of Music-Informatics, University of Mainz, Germany
Email:  Dr.Graef at t-online.de, ag at muwiinfa.geschichte.uni-mainz.de
WWW:    http://www.musikinformatik.uni-mainz.de/ag



More information about the llvm-dev mailing list