DescriptionChange LLVM bitcode linking to use tree reduction
rather than link in one at a time. Linking one at a time
means that the "Dst" module keeps growing yet needs to be
crawled entirely at each step to gather a set of types.
The cost becomes something 1 + 2 + 3 + ... + N (quadratic).
Instead, delay linking until we know of all the modules
so we can do linking as a tree. The actual linking is now
done when the module-getter is called, and error messages
are also delayed till then.
Time before for linking llc.pexe: ~126 secs
Time after for linking llc.pexe: ~20 secs
Memory after for linking llc.pexe: ~1GB for 727 modules.
~1.3GB if we don't delete the sources as they are consumed.
NOTE: a separate "opt" pass can still take 1.5 min for llc,
so LTO optimized builds can still take a while, but at least
non-optimized builds can be faster.
BUG= http://code.google.com/p/nativeclient/issues/detail?id=2883
TEST= rebuild.
Patch Set 1 #Patch Set 2 : Different version (change way gold-plugin uses interface, rather than hack the scoped pointers) #
Total comments: 8
Patch Set 3 : Added comments #
Total comments: 1
Patch Set 4 : stuff #
Messages
Total messages: 8 (0 generated)
|