summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-03-23 07:18:22 +0000
committerBill Wendling <isanbard@gmail.com>2012-03-23 07:18:22 +0000
commit7389acda89a2c4e99e09057f5265dc56d7f2a31a (patch)
treec65b1fbe5c594226d2b9ea13569db73bea71c269 /llvm/lib
parent888ac96f2b87b4c3b3d5e539ba231a4759256490 (diff)
downloadbcm5719-llvm-7389acda89a2c4e99e09057f5265dc56d7f2a31a.tar.gz
bcm5719-llvm-7389acda89a2c4e99e09057f5265dc56d7f2a31a.zip
Dematerialize the source functions after we're done with them. This saves a bit
of memory during LTO. llvm-svn: 153313
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Linker/LinkModules.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp
index 02905bc3397..dca523c7ab1 100644
--- a/llvm/lib/Linker/LinkModules.cpp
+++ b/llvm/lib/Linker/LinkModules.cpp
@@ -1226,6 +1226,7 @@ bool ModuleLinker::run() {
}
linkFunctionBody(cast<Function>(ValueMap[SF]), SF);
+ SF->Dematerialize();
}
// Resolve all uses of aliases with aliasees.
@@ -1265,7 +1266,8 @@ bool ModuleLinker::run() {
// Link in function body.
linkFunctionBody(DF, SF);
-
+ SF->Dematerialize();
+
// "Remove" from vector by setting the element to 0.
*I = 0;
OpenPOWER on IntegriCloud