mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-03 01:12:59 +00:00
Micro-optimization
TLVs probably won't be as common as the other types of variables. Check for them last before defaulting to "DATA". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180631 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fdfdd4cf82
commit
f1d9fe9d04
@ -523,11 +523,6 @@ getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind,
|
|||||||
const MCSection *TargetLoweringObjectFileMachO::
|
const MCSection *TargetLoweringObjectFileMachO::
|
||||||
SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
|
SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
|
||||||
Mangler *Mang, const TargetMachine &TM) const {
|
Mangler *Mang, const TargetMachine &TM) const {
|
||||||
|
|
||||||
// Handle thread local data.
|
|
||||||
if (Kind.isThreadBSS()) return TLSBSSSection;
|
|
||||||
if (Kind.isThreadData()) return TLSDataSection;
|
|
||||||
|
|
||||||
if (Kind.isText())
|
if (Kind.isText())
|
||||||
return GV->isWeakForLinker() ? TextCoalSection : TextSection;
|
return GV->isWeakForLinker() ? TextCoalSection : TextSection;
|
||||||
|
|
||||||
@ -580,6 +575,10 @@ SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
|
|||||||
if (Kind.isBSSLocal())
|
if (Kind.isBSSLocal())
|
||||||
return DataBSSSection;
|
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.
|
// Otherwise, just drop the variable in the normal data section.
|
||||||
return DataSection;
|
return DataSection;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user