summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Linker
diff options
context:
space:
mode:
authorEugene Leviant <eleviant@accesssoftek.com>2018-11-10 08:31:21 +0000
committerEugene Leviant <eleviant@accesssoftek.com>2018-11-10 08:31:21 +0000
commitbe8d19967aeae0eba3b82c0ec808b441327189c8 (patch)
tree242e575b70608bf6000b8555863c2c7a310d4e17 /llvm/lib/Linker
parent825f9d3e268ce39d057f6d3772a23de6fe407f0d (diff)
downloadbcm5719-llvm-be8d19967aeae0eba3b82c0ec808b441327189c8.tar.gz
bcm5719-llvm-be8d19967aeae0eba3b82c0ec808b441327189c8.zip
[ThinLTO] Internalize readonly globals
This patch allows internalising globals if all accesses to them (from live functions) are from non-volatile load instructions Differential revision: https://reviews.llvm.org/D49362 llvm-svn: 346584
Diffstat (limited to 'llvm/lib/Linker')
-rw-r--r--llvm/lib/Linker/IRMover.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/llvm/lib/Linker/IRMover.cpp b/llvm/lib/Linker/IRMover.cpp
index b304bfc401a..72e20ae0ba1 100644
--- a/llvm/lib/Linker/IRMover.cpp
+++ b/llvm/lib/Linker/IRMover.cpp
@@ -1062,11 +1062,6 @@ void IRLinker::prepareCompileUnitsForImport() {
ValueMap.MD()[CU->getRawEnumTypes()].reset(nullptr);
ValueMap.MD()[CU->getRawMacros()].reset(nullptr);
ValueMap.MD()[CU->getRawRetainedTypes()].reset(nullptr);
- // We import global variables only temporarily in order for instcombine
- // and globalopt to perform constant folding and static constructor
- // evaluation. After that elim-avail-extern will covert imported globals
- // back to declarations, so we don't need debug info for them.
- ValueMap.MD()[CU->getRawGlobalVariables()].reset(nullptr);
// Imported entities only need to be mapped in if they have local
// scope, as those might correspond to an imported entity inside a
OpenPOWER on IntegriCloud