diff options
author | Huihui Zhang <huihuiz@codeaurora.org> | 2018-08-30 00:49:50 +0000 |
---|---|---|
committer | Huihui Zhang <huihuiz@codeaurora.org> | 2018-08-30 00:49:50 +0000 |
commit | 2f4106592dfb1842f0fc48426bb7395f299a8c5d (patch) | |
tree | 161515daf72c3e7beba2b5f7d35fb241867b586a /llvm/lib/CodeGen/GlobalMerge.cpp | |
parent | a4132df0ee23783479c2a5f2f3054d28580ee5b4 (diff) | |
download | bcm5719-llvm-2f4106592dfb1842f0fc48426bb7395f299a8c5d.tar.gz bcm5719-llvm-2f4106592dfb1842f0fc48426bb7395f299a8c5d.zip |
[GlobalMerge] Fix GlobalMerge on bss external global variables.
Summary:
Global variables that are external and zero initialized are
supposed to be merged with global variables in the bss section
rather than the data section.
Reviewers: efriedma, rengolin, t.p.northover, javed.absar, asl, john.brawn, pcc
Reviewed By: efriedma
Subscribers: dmgreen, llvm-commits
Differential Revision: https://reviews.llvm.org/D51379
llvm-svn: 341008
Diffstat (limited to 'llvm/lib/CodeGen/GlobalMerge.cpp')
-rw-r--r-- | llvm/lib/CodeGen/GlobalMerge.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/GlobalMerge.cpp b/llvm/lib/CodeGen/GlobalMerge.cpp index 69d1e13cec7..d3364952f24 100644 --- a/llvm/lib/CodeGen/GlobalMerge.cpp +++ b/llvm/lib/CodeGen/GlobalMerge.cpp @@ -639,7 +639,7 @@ bool GlobalMerge::doInitialization(Module &M) { Type *Ty = GV.getValueType(); if (DL.getTypeAllocSize(Ty) < MaxOffset) { if (TM && - TargetLoweringObjectFile::getKindForGlobal(&GV, *TM).isBSSLocal()) + TargetLoweringObjectFile::getKindForGlobal(&GV, *TM).isBSS()) BSSGlobals[{AddressSpace, Section}].push_back(&GV); else if (GV.isConstant()) ConstGlobals[{AddressSpace, Section}].push_back(&GV); |