[Haskell-cafe] Re: Compiler backend question
Peter Verswyvelen
bf3 at telenet.be
Mon Jan 7 15:27:17 EST 2008
John Meacham wrote:
> I would like to move jhc to more of a 'link-time-code-generation' model
> though if I understand what you mean, right now jhc does a full
Yes, LTCG is Microsoft's terminology. See http://msdn.microsoft.com/msdnmag/issues/02/05/Hood
> monolithic compilation which is pretty resource intensive. I would like
Well, M$ LTCG is also resource intensive, but it's still a lot faster than the monolothic approach would be.
> to switch to more of an 'incremental whole program compilation' (no,
> that isn't a contridiction) whereby individual files will compile to .o
> files, but then before the final linking a special pass will be done to
> generate the appropriate specialized "glue" for putting the .o files
> together, this should give a nice middle ground between fully
> monolithic and the limitations of abiding by the standard C linker.
That would be a bit like http://llvm.org does for imperative languages?
If your compiler (pretty amazing job btw) does whole program optimization, can it remove the dictionary (aka v-table in C/C++ parlance?) overhead of type classes? Because if I understand it correctly, unless one uses existential types, a dictionary can be compiled away since the type in question is known at compile time?
Cheers,
Peter
More information about the Haskell-Cafe
mailing list