<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">Hi Csaba,</div><div class=""><br class=""></div>I originally posted this comment <a href="https://www.reddit.com/r/haskell/comments/h7t8wr/introducing_ghc_whole_program_compiler_ghcwpc/fuqdnye/" class="">on /r/haskell</a> 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:<div class=""><br class=""></div><div class=""></div><blockquote type="cite" class=""><div class="">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!</div><div class=""><br class="">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.)</div><div class=""><br class="">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.</div><div class=""><br class="">tl;dr: Have you considered naming this project GHC-LTO instead of GHC-WPC?</div></blockquote><div class=""><br class=""></div>Alexis<br class=""><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jun 12, 2020, at 16:16, Csaba Hruska <<a href="mailto:csaba.hruska@gmail.com" class="">csaba.hruska@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Hello,</div><div class=""><br class=""></div><div class="">I've created a whole program compilation pipeline for GHC via STG.</div><div class="">Please read my blog post for the details:<br class=""></div><div class=""><a href="https://www.patreon.com/posts/introducing-ghc-38173710" class="">Introducing GHC whole program compiler (GHC-WPC)</a></div><div class=""><br class=""></div><div class="">Regards,</div><div class="">Csaba Hruska</div></div></div></blockquote></div></div></body></html>