Sunghyun Park via llvm-dev
2016-Oct-18 16:56 UTC
[llvm-dev] [help] How to speed up compilation?
I'll try those guys! Thanks for advices, all! Btw, I have a question. Personally, it feels like compilation become much slower than previous versions after adopting 'cmake'. Is this natural when we adopt cmake or are there other big changes on build structure? I'm not that familiar with huge system like llvm yet, so I want to catch up how professionals design their system. On Tue, Oct 18, 2016 at 12:22 PM, Matthias Braun <mbraun at apple.com> wrote:> These are two comprehensive blog posts about how to compile llvm/clang > faster: > > https://blogs.s-osg.org/an-introduction-to-accelerating- > your-build-with-clang/ > https://blogs.s-osg.org/a-conclusion-to-accelerating- > your-build-with-clang/ > > - Matthias > > On Oct 18, 2016, at 7:56 AM, Tim Northover via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > > On 18 October 2016 at 07:51, Renato Golin via llvm-dev > <llvm-dev at lists.llvm.org> wrote: > > A few hints: > > > Another one for debug builds on Linux is using split debug info: > -DLLVM_USE_SPLIT_DWARF=ON. This speeds up links dramatically (and > reduces memory consumption) as long as you've got a new enough gdb (I > think lldb is still not quite up to it). It has no effect on macOS > though, because a similar configuration is just how things work there. > > Tim. > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > > >-- Best, Sung -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161018/7888c0ea/attachment.html>
Renato Golin via llvm-dev
2016-Oct-18 17:08 UTC
[llvm-dev] [help] How to speed up compilation?
On 18 October 2016 at 17:56, Sunghyun Park <sunggg at umich.edu> wrote:> Personally, it feels like compilation become much slower than previous > versions after adopting 'cmake'. > Is this natural when we adopt cmake or are there other big changes on build > structure?So, I decided not to respond to that specific part of your original post because I don't have enough information on what you changed, but we have deprecated autoconf for a while now, so everyone uses CMake. If you're comparing LLVM a long time ago with autoconf versus LLVM today with CMake, then the changes are most likely because LLVM has grown a lot. If you're building LLVM trunk today with autoconf, then it's possible that you're missing a lot of source files from your build (and I'm surprised it worked). But overall, CMake should make absolutely no difference in building speeds, since the number of compilation jobs should (hopefully) be the same and in the same way. But I may be missing something... :) cheers, --renato
Sunghyun Park via llvm-dev
2016-Oct-18 17:25 UTC
[llvm-dev] [help] How to speed up compilation?
I'm adding feature to detect customized pragma and mark those region in LLVM IR using Metadata. I want to let programmer give additional directives to compiler. So I put some functions, variables, and 'cout' on clang. So, based on my understanding on your comment, it may be natural to have long compilation time. My machine has Intel Xeon(R) CPU E31230 @ 3.20GHz * 8 with 8GM RAM, which is far behind the recommended build environment ( Intel Core i7-4770K CPU @ 3.50Hz, 16 GM RAM, and a 1TB 7200RPM HDD or SSD, ref : https://blogs.s-osg.org/an-introduction-to-accelerating-your-build-with-clang/ ) Do you think it would be great help if I upgrade my machine? I've wanted to upgrade it at some point, but I haven't find right excuse to tell my boss. haha Thank you so much! On Tue, Oct 18, 2016 at 1:08 PM, Renato Golin <renato.golin at linaro.org> wrote:> On 18 October 2016 at 17:56, Sunghyun Park <sunggg at umich.edu> wrote: > > Personally, it feels like compilation become much slower than previous > > versions after adopting 'cmake'. > > Is this natural when we adopt cmake or are there other big changes on > build > > structure? > > So, I decided not to respond to that specific part of your original > post because I don't have enough information on what you changed, but > we have deprecated autoconf for a while now, so everyone uses CMake. > > If you're comparing LLVM a long time ago with autoconf versus LLVM > today with CMake, then the changes are most likely because LLVM has > grown a lot. > > If you're building LLVM trunk today with autoconf, then it's possible > that you're missing a lot of source files from your build (and I'm > surprised it worked). > > But overall, CMake should make absolutely no difference in building > speeds, since the number of compilation jobs should (hopefully) be the > same and in the same way. But I may be missing something... :) > > cheers, > --renato >-- Best, Sung -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161018/1f2829ec/attachment.html>
Joerg Sonnenberger via llvm-dev
2016-Oct-18 17:31 UTC
[llvm-dev] [help] How to speed up compilation?
On Tue, Oct 18, 2016 at 06:08:15PM +0100, Renato Golin via llvm-dev wrote:> But overall, CMake should make absolutely no difference in building > speeds, since the number of compilation jobs should (hopefully) be the > same and in the same way. But I may be missing something... :)If you are doing a debug build and hit swap, the cmake-based Makefiles are a lot more aggressive about concurrent jobs. In that case, the swapping can make the system a lot slower overall. Joerg