Hello, I have observed that the LLVM build takes pretty long time to link executables (i.e. tools). Is that a normal behavior? Thanks, Rahul
Rahul Joshi wrote:> Hello, > > I have observed that the LLVM build takes pretty long time > to link executables (i.e. tools). Is that a normal behavior?It depends on what hardware you are running, but yes, I would say that the link time for the LLVM tools is on the longer side. You could try to trim it down by building non-debug executables or by manually adding linker options to strip unnecessary symbols (if using GNU ld). If these things speed it up, please let us know. Just out of curiousity, what sort of hardware are you using?> > Thanks, > Rahul > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev-- John T. -- ********************************************************************* * John T. Criswell Email: criswell at uiuc.edu * * Research Programmer * * University of Illinois at Urbana-Champaign * * * * "It's today!" said Piglet. "My favorite day," said Pooh. * *********************************************************************
On Mon, Nov 03, 2003 at 04:42:46PM -0600, Rahul Joshi wrote:> I have observed that the LLVM build takes pretty long time > to link executables (i.e. tools). Is that a normal behavior?Yes, we've noticed that too, on our (slower) Sparc machines. Works much nicer on our shiny faster X86 machines though. :) Please note that you do not need to relink *all* the tools unless you really are using *ALL* of them. Different tools use different subsets of libraries, and if you are linking ALL the tools, that's a lot of linking of similar sets of libraries, over and over (and they can get big). For example, many tools use the VMCore and bytecode reader/writer. So just edit llvm/tools/Makefile and exclude the tools you do not use, your builds will be much faster. -- Misha Brukman :: http://misha.brukman.net
On Mon, 3 Nov 2003, Rahul Joshi wrote:> I have observed that the LLVM build takes pretty long time > to link executables (i.e. tools). Is that a normal behavior?You can thank the binutils people for this. From what I've heard, they've been doing some work to improve link times with "optimizations" like not using a fixed number of buckets in critical hash tables. In terms of practical suggestions, here's some ideas: 1. Try getting a newer binutils (ie, ld) than you already have. It may be improved. 2. If you can, build stuff into shared objects and load it with -load. This is only really feasible if you're working on llvm-to-llvm passes. 3. Debugging information is what really slows stuff down. If it is useful, compile with ENABLE_OPTIMIZED on. Without debug information, link times are _very_ short. 4. Like Misha said, you can get away with not rebuilding some of the tools if you're not using them. Be careful though, because you don't want to accidentally get out of date and not know it. The makefiles already only rebuild the correct set of tools based on which libraries get modified. Hopefully this will help, if not, the binutils sources are available. :) -Chris -- http://llvm.cs.uiuc.edu/ http://www.nondot.org/~sabre/Projects/
Rahul, More than anything else, make sure that you are writing into a local filesystem and not an NFS one. That can reduce link times by an order of magnitude -- writing over NFS is painfully slow. That's why we put our obj tree in /localhome on our machines. --Vikram http://www.cs.uiuc.edu/~vadve> -----Original Message----- > From: llvmdev-admin at cs.uiuc.edu > [mailto:llvmdev-admin at cs.uiuc.edu] On Behalf Of Rahul Joshi > Sent: Monday, November 03, 2003 4:43 PM > To: llvmdev at cs.uiuc.edu > Subject: [LLVMdev] large linking time > > > Hello, > > I have observed that the LLVM build takes pretty long time > to link executables (i.e. tools). Is that a normal behavior? > > Thanks, > Rahul > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev >