projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0a3508a
)
ThinLTO: linkonce compile-time optimization, do not bother when there is only one...
author
Mehdi Amini
<mehdi.amini@apple.com>
Thu, 14 Apr 2016 08:46:22 +0000
(08:46 +0000)
committer
Mehdi Amini
<mehdi.amini@apple.com>
Thu, 14 Apr 2016 08:46:22 +0000
(08:46 +0000)
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266281
llvm/lib/LTO/ThinLTOCodeGenerator.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/LTO/ThinLTOCodeGenerator.cpp
b/llvm/lib/LTO/ThinLTOCodeGenerator.cpp
index
fea1c7f
..
c9e91eb
100644
(file)
--- a/
llvm/lib/LTO/ThinLTOCodeGenerator.cpp
+++ b/
llvm/lib/LTO/ThinLTOCodeGenerator.cpp
@@
-173,6
+173,10
@@
static void ResolveODR(GlobalValue &GV, const ModuleSummaryIndex &Index,
/// one copy.
static void ResolveODR(Module &TheModule,
const ModuleSummaryIndex &Index) {
+ if (Index.modulePaths().size() == 1)
+ // Nothing to do if we don't have multiple modules
+ return;
+
// We won't optimize the globals that are referenced by an alias for now
// Ideally we should turn the alias into a global and duplicate the definition
// when needed.