Introducing GHC whole program compiler (GHC-WPC)

Alexis King lexi.lambda at
Sat Jun 13 20:26:29 UTC 2020

Hi Csaba,

I originally posted this comment on /r/haskell <> before I saw you also sent this to ghc-devs. I’ve decided to reproduce my comment here as well, since this list probably has a more relevant audience:

> I want to start by saying that I think this sounds totally awesome, and I think it’s a fantastic idea. I’m really interested in seeing how this progresses!
> I do wonder if people might find the name a little misleading. “Whole program compilation” usually implies “whole program optimization,” but most of GHC’s key optimizations happen at the Core level, before STG is even generated. (Of course, I’m sure you’re well aware of that, I’m just stating it for the sake of others who might be reading who aren’t aware.)
> This seems much closer in spirit to “link-time optimization” (LTO) as performed by Clang and GCC than whole program compilation. For example, Clang’s LTO works by “linking” LLVM bitcode files instead of fully-compiled native objects. STG is not quite analogous to LLVM IR—GHC’s analog would be Cmm, not STG—but I think that difference is not that significant here: the STG-to-Cmm pass is quite mechanical, and STG is mostly just easier to manipulate.
> tl;dr: Have you considered naming this project GHC-LTO instead of GHC-WPC?


> On Jun 12, 2020, at 16:16, Csaba Hruska <csaba.hruska at> wrote:
> Hello,
> I've created a whole program compilation pipeline for GHC via STG.
> Please read my blog post for the details:
> Introducing GHC whole program compiler (GHC-WPC) <>
> Regards,
> Csaba Hruska
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ghc-devs mailing list