Take advantage of the fact that we are allowed to clobber the input module
authorChris Lattner <sabre@nondot.org>
Tue, 16 Nov 2004 07:31:51 +0000 (07:31 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 16 Nov 2004 07:31:51 +0000 (07:31 +0000)
commit4bbfbff119acab90fc67cd3d01b156bf88832286
treeb2a6ed4c49d11f48fd4a3d84eb61583f3931863c
parent30e4056a5d9be0ff60702b609b1fa404899197b7
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17893 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Linker/LinkModules.cpp