summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-04-26 21:15:08 +0000
committerBill Wendling <isanbard@gmail.com>2013-04-26 21:15:08 +0000
commit55a9c97c9ced81e6eb5ef326edade2463752c749 (patch)
tree0deb58921671cbfaefa909e5cceb670524b51035 /llvm/lib/CodeGen
parent5259bbde8232bf26a4f2d91d1c26ec5787ece3ab (diff)
downloadbcm5719-llvm-55a9c97c9ced81e6eb5ef326edade2463752c749.tar.gz
bcm5719-llvm-55a9c97c9ced81e6eb5ef326edade2463752c749.zip
Micro-optimization
TLVs probably won't be as common as the other types of variables. Check for them last before defaulting to "DATA". llvm-svn: 180631
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index 678698ae591..7e7359a8fee 100644
--- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
@@ -523,11 +523,6 @@ 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;
@@ -580,6 +575,10 @@ 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;
}
OpenPOWER on IntegriCloud