summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/GlobalMerge.cpp
diff options
context:
space:
mode:
authorHuihui Zhang <huihuiz@codeaurora.org>2018-08-30 00:49:50 +0000
committerHuihui Zhang <huihuiz@codeaurora.org>2018-08-30 00:49:50 +0000
commit2f4106592dfb1842f0fc48426bb7395f299a8c5d (patch)
tree161515daf72c3e7beba2b5f7d35fb241867b586a /llvm/lib/CodeGen/GlobalMerge.cpp
parenta4132df0ee23783479c2a5f2f3054d28580ee5b4 (diff)
downloadbcm5719-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.cpp2
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);
OpenPOWER on IntegriCloud