[LLVMdev] LTO question

David Chisnall David.Chisnall at cl.cam.ac.uk
Fri Dec 26 08:52:43 PST 2014

On 26 Dec 2014, at 17:36, Rafael EspĂ­ndola <rafael.espindola at gmail.com> wrote:

> It has been some time since I last tried, but I used to build it with
> LTO both on linux and OS X.

With how much RAM?  Last time we tried building the FreeBSD kernel with LTO, I believe it took around 20GB of RAM to complete (and then the result didn't boot, but that's a separate issue).  Whether that counts as 'being able to handle it' depends a lot on whether you think that 20GB of RAM is a reasonable amount for a build machine.  Given the amount of complaining that happened when Microsoft's LTO implementation wasn't able to handle Firefox on 32-bit machines, I suspect that the answer for a lot of people would be 'no'.

I'd love to see a more map-reduce like LTO, where the first step of compilation would identify the callees for each function and the bitcode files that they were in, then the next phase would stitch together compilation units that would have bigger optimisation wins (possibly taking profile traces into account) and the final pass would optimise.  Each of these would be parallelisable, so we wouldn't be in the situation where that nice big multisocket multicore build machine has a single threaded process doing all of the optimisations, nor in the situation where the smaller dev boxes don't have enough RAM for holding the IR for the entire program in memory.


More information about the llvm-dev mailing list