diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-11-17 10:53:13 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-11-17 10:53:13 +0000 |
commit | 25b61dbac0e5f6178d5a24826a55755a3b1d9227 (patch) | |
tree | 011c2f141791d6e678fdb09b5ba321954332ba11 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | bb1dd73d3e4160004d899d08817fdc9001dbcab3 (diff) | |
download | bcm5719-llvm-25b61dbac0e5f6178d5a24826a55755a3b1d9227.tar.gz bcm5719-llvm-25b61dbac0e5f6178d5a24826a55755a3b1d9227.zip |
Revert "Micro-optimization"
This reverts commit f1d9fe9d04ce93f6d5dcebbd2cb6a07414d7a029.
This was causing PR17964. We need to use thread data before regular data.
llvm-svn: 194960
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index 5d16f043e2a..66ba3ec7af8 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -523,6 +523,11 @@ getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind, const MCSection *TargetLoweringObjectFileMachO:: SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, Mangler *Mang, const TargetMachine &TM) const { + + // Handle thread local data. + if (Kind.isThreadBSS()) return TLSBSSSection; + if (Kind.isThreadData()) return TLSDataSection; + if (Kind.isText()) return GV->isWeakForLinker() ? TextCoalSection : TextSection; @@ -575,10 +580,6 @@ SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, if (Kind.isBSSLocal()) return DataBSSSection; - // Handle thread local data. - if (Kind.isThreadBSS()) return TLSBSSSection; - if (Kind.isThreadData()) return TLSDataSection; - // Otherwise, just drop the variable in the normal data section. return DataSection; } |