diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-03-23 07:18:22 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-03-23 07:18:22 +0000 |
commit | 12d9a9002f9fba3ea42225b8daf4f9feda52726d (patch) | |
tree | 47405c8b5bb7ca28cfb7dd4a02438b64f987a138 /lib/Linker/LinkModules.cpp | |
parent | a443e5b1f1013612950fc3c9ebfafca60a1c20df (diff) | |
download | external_llvm-12d9a9002f9fba3ea42225b8daf4f9feda52726d.zip external_llvm-12d9a9002f9fba3ea42225b8daf4f9feda52726d.tar.gz external_llvm-12d9a9002f9fba3ea42225b8daf4f9feda52726d.tar.bz2 |
Dematerialize the source functions after we're done with them. This saves a bit
of memory during LTO.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153313 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Linker/LinkModules.cpp')
-rw-r--r-- | lib/Linker/LinkModules.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp index 02905bc..dca523c 100644 --- a/lib/Linker/LinkModules.cpp +++ b/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; |