On 05/12/12 15:17, Brandon Allbery wrote:
Probably none; on most platforms you're actually generating different
code (dynamic libraries require generation of position-independent
Sure there's a lot of differences in the generated code, but inside GHC these differences only appear at the very last stage of the pipeline, native code generation (or LLVM). All the stages up to that can be shared, which accounts for roughly 80% of compilation time (IIRC).
I was assuming it would be difficult to separate those stages of the internal compilation pipeline out, given previous discussions of how said pipeline works. (In particular I was under the impression saving/restoring state in the pipeline to rerun the final phase with multiple code generators was not really possible, and multithreading them concurrently even less so.)