This is an archive of the discontinued LLVM Phabricator instance.

CodeGen, Target: Move Mach-O-specific symbol name logic to Mach-O lowering.
ClosedPublic

Authored by pcc on Oct 28 2015, 5:58 PM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

pcc updated this revision to Diff 38703.Oct 28 2015, 5:58 PM
pcc retitled this revision from to CodeGen, Target: Move Mach-O-specific symbol name logic to Mach-O lowering..
pcc updated this object.
pcc added a reviewer: rafael.
pcc added subscribers: llvm-commits, krasin.
rafael accepted this revision.Nov 3 2015, 7:59 AM
rafael edited edge metadata.

LGTM!

This revision is now accepted and ready to land.Nov 3 2015, 7:59 AM
This revision was automatically updated to reflect the committed changes.