Commit Graph

114 Commits

Author SHA1 Message Date
Chris Lattner f27514df9d Don't increment a dead iterator
llvm-svn: 17904
2004-11-16 19:04:40 +00:00
Chris Lattner 7391dde138 Simplify the remapper by only needing one map, since the body of the functions
being linked do not need to be remapped any longer.

llvm-svn: 17900
2004-11-16 17:12:38 +00:00
Chris Lattner 2f0557d0e4 Take advantage of the fact that we are allowed to clobber the input module
by splicing function bodies from the src module to the destination module.

This speeds up linking quite a bit, e.g. gccld time on 176.gcc from 26s -> 20s
when forming the .rbc file, with a profile build.  One of the really strange
but cool effects of this patch is that it speeds up the optimizers as well,
from 12s -> 10.7s, presumably because of better locality???

In any case, this is just a first step.  We can trivially get rid of the
LocalMap now and do other simplifications.

llvm-svn: 17893
2004-11-16 07:31:51 +00:00
Reid Spencer 5208a11440 Per code review:\
* Adjust indentation\
* Ensure memory do not leak if exceptions happen (std::auto_ptr use)

llvm-svn: 17885
2004-11-16 06:47:41 +00:00
Chris Lattner f2e808449d The second arg may be clobbered by this function
llvm-svn: 17880
2004-11-16 06:41:36 +00:00
Chris Lattner 2981914302 use an autoptr
llvm-svn: 17875
2004-11-16 06:40:54 +00:00
Reid Spencer a67b6e1874 Remove a forgotten debug output line.
llvm-svn: 17810
2004-11-14 23:49:55 +00:00
Reid Spencer 9b0ddbbe2c Linker.h moved to include/llvm from include/llvm/Support.
llvm-svn: 17807
2004-11-14 23:27:04 +00:00
Reid Spencer 16c3bb3198 Linker.h has a new home.
llvm-svn: 17801
2004-11-14 23:00:08 +00:00
Reid Spencer c470261d27 Don't bother with a re-linked library, ensure archive library is built.
llvm-svn: 17773
2004-11-14 22:03:14 +00:00
Reid Spencer 9db61d9e3a *Adjust prototypes for public interface. *Rewrite LinkInArchive to use symbol tables.
llvm-svn: 17772
2004-11-14 22:02:27 +00:00
Reid Spencer a81f8197eb Makefile for lib/Linker
llvm-svn: 17695
2004-11-12 20:38:45 +00:00
Reid Spencer 361e513db0 This file originated in lib/VMCore/Linker.cpp but now lives in
lib/Linker/LinkModules.cpp

llvm-svn: 17694
2004-11-12 20:37:43 +00:00
Reid Spencer 1cfa8d60f8 This file originated in tools/gccld/Linker.cpp but now lives in
lib/Linker/LinkArchives.cpp

llvm-svn: 17693
2004-11-12 20:34:32 +00:00