diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2015-11-03 23:40:03 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2015-11-03 23:40:03 +0000 |
commit | 94d778697a0654870aa5808b425ffa8ed88ada93 (patch) | |
tree | 4ee879d556450ca8d5fc31f131b96c1f30921a92 /llvm/lib/Target/TargetLoweringObjectFile.cpp | |
parent | 26014690aab5fcae955bc27cfda990eae7d34385 (diff) | |
download | bcm5719-llvm-94d778697a0654870aa5808b425ffa8ed88ada93.tar.gz bcm5719-llvm-94d778697a0654870aa5808b425ffa8ed88ada93.zip |
CodeGen, Target: Move Mach-O-specific symbol name logic to Mach-O lowering.
A profile of an LTO link of Chrome revealed that we were spending some
~30-50% of execution time in the function Constant::getRelocationInfo(),
which is called from TargetLoweringObjectFile::getKindForGlobal() and in turn
from TargetMachine::getNameWithPrefix().
It turns out that we only need the result of getKindForGlobal() when
targeting Mach-O, so this change moves the relevant part of the logic to
TargetLoweringObjectFileMachO.
NFCI.
Differential Revision: http://reviews.llvm.org/D14168
llvm-svn: 252014
Diffstat (limited to 'llvm/lib/Target/TargetLoweringObjectFile.cpp')
-rw-r--r-- | llvm/lib/Target/TargetLoweringObjectFile.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/TargetLoweringObjectFile.cpp b/llvm/lib/Target/TargetLoweringObjectFile.cpp index 856d92dcede..dd65b881f4d 100644 --- a/llvm/lib/Target/TargetLoweringObjectFile.cpp +++ b/llvm/lib/Target/TargetLoweringObjectFile.cpp @@ -344,7 +344,7 @@ const MCExpr *TargetLoweringObjectFile::getDebugThreadLocalSymbol(const MCSymbol } void TargetLoweringObjectFile::getNameWithPrefix( - SmallVectorImpl<char> &OutName, const GlobalValue *GV, - bool CannotUsePrivateLabel, Mangler &Mang, const TargetMachine &TM) const { - Mang.getNameWithPrefix(OutName, GV, CannotUsePrivateLabel); + SmallVectorImpl<char> &OutName, const GlobalValue *GV, Mangler &Mang, + const TargetMachine &TM) const { + Mang.getNameWithPrefix(OutName, GV, /*CannotUsePrivateLabel=*/false); } |