[PATCH] D14168: CodeGen, Target: Move Mach-O-specific symbol name logic to Mach-O lowering.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 28 17:58:50 PDT 2015


pcc created this revision.
pcc added a reviewer: rafael.
pcc added subscribers: llvm-commits, krasin.

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.

http://reviews.llvm.org/D14168

Files:
  include/llvm/CodeGen/TargetLoweringObjectFileImpl.h
  include/llvm/Target/TargetLoweringObjectFile.h
  lib/CodeGen/TargetLoweringObjectFileImpl.cpp
  lib/Target/TargetLoweringObjectFile.cpp
  lib/Target/TargetMachine.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14168.38703.patch
Type: text/x-patch
Size: 6587 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151029/0154eb66/attachment.bin>


More information about the llvm-commits mailing list