llvm-6502/lib/MC
Duncan P. N. Exon Smith 583dac827c AsmPrinter: Compute absolute label difference directly
Create a low-overhead path for `EmitLabelDifference()` that emits a
emits an absolute number when (1) the output is an object stream and (2)
the two symbols are in the same data fragment.

This drops memory usage on Mach-O from 975 MB down to 919 MB (5.8%).
The only call is when `!doesDwarfUseRelocationsAcrossSections()` --
i.e., on Mach-O -- since otherwise an absolute offset from the start of
the section needs a relocation.  (`EmitLabelDifference()` is cheaper on
ELF anyway, since it creates 1 fewer temp symbol, and it gets called far
less often.  It's not clear to me if this is even a bottleneck there.)

(I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`;
see r236629 for details.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237876 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-21 02:41:23 +00:00
..
MCDisassembler MC: Clean up method names in MCContext. 2015-05-18 18:43:14 +00:00
MCParser MC: Clean up method names in MCContext. 2015-05-18 18:43:14 +00:00
CMakeLists.txt Move some methods to a new MCInstrDesc.cpp file to allow includes to be trimmed. NFC. 2015-05-15 21:29:43 +00:00
ConstantPools.cpp MC: Clean up method names in MCContext. 2015-05-18 18:43:14 +00:00
ELFObjectWriter.cpp MC: Use MCSymbol in MCObjectWriter::isWeak(), NFC 2015-05-20 15:10:03 +00:00
LLVMBuild.txt
MachObjectWriter.cpp MC: Remove last use of MCSymbolData::getSymbol(), NFC 2015-05-21 00:39:24 +00:00
Makefile
MCAsmBackend.cpp
MCAsmInfo.cpp MC: Clean up method names in MCContext. 2015-05-18 18:43:14 +00:00
MCAsmInfoCOFF.cpp [MC] Use LShr for constant evaluation of ">>" on ELF/arm64--darwin. 2015-04-28 01:37:11 +00:00
MCAsmInfoDarwin.cpp [MC] Use LShr for constant evaluation of ">>" on ELF/arm64--darwin. 2015-04-28 01:37:11 +00:00
MCAsmInfoELF.cpp
MCAsmStreamer.cpp MC: Update MCCodeEmitter naming. NFC. 2015-05-15 19:13:16 +00:00
MCAssembler.cpp MC: Simplify MCSymbolData initialization and remove MCSymbol pointer 2015-05-21 01:33:03 +00:00
MCCodeEmitter.cpp
MCCodeGenInfo.cpp MC: MCCodeGenInfo naming update. NFC. 2015-05-15 19:13:31 +00:00
MCContext.cpp [WinEH] Store pointers to the LSDA in the exception registration object 2015-05-20 23:08:04 +00:00
MCDwarf.cpp Use a SmallString buffer instead of a std::string for debug info path lookup. NFC. 2015-05-20 19:12:14 +00:00
MCELF.cpp
MCELFObjectTargetWriter.cpp
MCELFStreamer.cpp MC: Use MCSymbol in LocalCommon, NFC 2015-05-20 18:25:40 +00:00
MCExpr.cpp MC: Use MCSymbol in MCObjectWriter::isWeak(), NFC 2015-05-20 15:10:03 +00:00
MCInst.cpp
MCInstPrinter.cpp
MCInstrAnalysis.cpp
MCInstrDesc.cpp Remove 3 includes from MCInstrDesc.h and explicitly include them where needed 2015-05-15 21:58:42 +00:00
MCLabel.cpp
MCLinkerOptimizationHint.cpp MC: Take MCSymbol in MachObjectWriter::getSymbolAddress(), NFC 2015-05-20 00:02:39 +00:00
MCMachObjectTargetWriter.cpp
MCMachOStreamer.cpp MC: Remove most remaining uses of MCSymbolData::getSymbol(), NFC 2015-05-20 20:18:16 +00:00
MCNullStreamer.cpp
MCObjectFileInfo.cpp Respect object format choice on Darwin 2015-05-04 20:03:01 +00:00
MCObjectStreamer.cpp AsmPrinter: Compute absolute label difference directly 2015-05-21 02:41:23 +00:00
MCObjectWriter.cpp MC: Use MCSymbol in MCObjectWriter::isWeak(), NFC 2015-05-20 15:10:03 +00:00
MCRegisterInfo.cpp
MCSection.cpp
MCSectionCOFF.cpp
MCSectionELF.cpp
MCSectionMachO.cpp
MCStreamer.cpp MC: Clean up method names in MCContext. 2015-05-18 18:43:14 +00:00
MCSubtargetInfo.cpp Reverting r237234, "Use std::bitset for SubtargetFeatures" 2015-05-13 10:28:46 +00:00
MCSymbol.cpp Revert accidentally committed "MC: Allow targets to stop symbol name quoting" 2015-04-23 23:34:51 +00:00
MCSymbolizer.cpp
MCTargetOptions.cpp
MCValue.cpp
MCWin64EH.cpp MC: Clean up method names in MCContext. 2015-05-18 18:43:14 +00:00
MCWinEH.cpp
StringTableBuilder.cpp
SubtargetFeature.cpp Reverting r237234, "Use std::bitset for SubtargetFeatures" 2015-05-13 10:28:46 +00:00
WinCOFFObjectWriter.cpp MC: Stop using MCSymbolData::getSymbol() in WinCOFF, NFC 2015-05-20 19:34:08 +00:00
WinCOFFStreamer.cpp MC: Clean up method names in MCContext. 2015-05-18 18:43:14 +00:00
YAML.cpp