On 26 December 2014 at 02:55, Adve, Vikram Sadanand <vadve at illinois.edu> wrote:> Diego, Teresa, David, > > Sorry for my delayed reply; I left for vacation right after sending my message about this. > > Diego, it wasn't explicit from your message whether LLVM LTO can handle Firefox-scale programs, which you said GCC can handle. I assumed that's what you meant, but could you confirm that? I understand that neither can handle the very large Google applications, but that's probably not a near-term concern for a project like the one Charles is embarking on.It has been some time since I last tried, but I used to build it with LTO both on linux and OS X. Cheers, Rafael
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. David
On 26 December 2014 at 11:52, David Chisnall <David.Chisnall at cl.cam.ac.uk> wrote:> 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'.It was on a MacBook pro a couple of years old by now, so I would guess 8GB. Cheers, Rafael