llvm-6502/lib/MC
Rafael Espindola 0ba7ba487d Clarify when we can avoid creating names for temp symbols.
Some temporary symbols are created by MC itself. These symbols are never used
for lookup and are never included in the object symbol table, so we can
avoid creating a name for them.

Other temporaries are created by CodeGen or by the user by explicitly asking
for a name starting with .L (or L on MachO).

These temporaries behave like regular symbols, we just try to avoid including
them in the object symbol table, but sometimes they end up there:

const char *foo() {
  return "abc" + 3;
}

will have a relocation pointing to a .L symbol.

It just so happens that almost all MC created temporary has the AlwaysAddSuffix
option and CodeGen/user created ones don't.

One interesting future optimization would be to use unnamed symbols for
all temporaries, but that would require use an st_name of 0 or
having the object writer create the names if a symbol does end up in the
symbol table.

No testcase since this just avoid creating a few extra names for MC created
temporaries.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238887 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 22:52:13 +00:00
..
MCDisassembler MC: Clean up MCExpr naming. NFC. 2015-05-30 01:25:56 +00:00
MCParser Create a MCSymbolELF. 2015-06-02 00:25:12 +00:00
CMakeLists.txt Merge MCELF.h into MCSymbolELF.h. 2015-06-02 20:38:46 +00:00
ConstantPools.cpp MC: Clean up MCExpr naming. NFC. 2015-05-30 01:25:56 +00:00
ELFObjectWriter.cpp Pass a MCSymbolELF to a few ELF only functions. NFC. 2015-06-02 21:30:13 +00:00
LLVMBuild.txt
MachObjectWriter.cpp MC: Tidy up LOH naming a bit. NFC. 2015-06-01 23:55:06 +00:00
Makefile
MCAsmBackend.cpp [MC] Allow backends to decide relaxation for unresolved fixups. 2015-05-30 18:42:22 +00:00
MCAsmInfo.cpp MC: Clean up MCExpr naming. NFC. 2015-05-30 01:25:56 +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 Move alignment from MCSectionData to MCSection. 2015-05-21 19:20:38 +00:00
MCAsmStreamer.cpp Create a MCSymbolELF. 2015-06-02 00:25:12 +00:00
MCAssembler.cpp The fragment implies the section, don't store both. 2015-06-01 14:34:40 +00:00
MCCodeEmitter.cpp
MCCodeGenInfo.cpp MC: MCCodeGenInfo naming update. NFC. 2015-05-15 19:13:31 +00:00
MCContext.cpp Clarify when we can avoid creating names for temp symbols. 2015-06-02 22:52:13 +00:00
MCDwarf.cpp MC: Clean up MCExpr naming. NFC. 2015-05-30 01:25:56 +00:00
MCELFObjectTargetWriter.cpp Pass a MCSymbol to needsRelocateWithSymbol. 2015-05-29 18:26:09 +00:00
MCELFStreamer.cpp Merge MCELF.h into MCSymbolELF.h. 2015-06-02 20:38:46 +00:00
MCExpr.cpp MC: Clean up MCExpr naming. NFC. 2015-05-30 01:25:56 +00:00
MCInst.cpp Fixup. 2015-02-05 01:13:47 +00:00
MCInstPrinter.cpp [llvm] Parameterizing the output stream for dumpbytes and outputting directly to stream. 2015-05-28 18:39:50 +00:00
MCInstrAnalysis.cpp
MCInstrDesc.cpp Use std::bitset for SubtargetFeatures. 2015-05-26 10:47:10 +00:00
MCLabel.cpp
MCLinkerOptimizationHint.cpp MC: Tidy up LOH naming a bit. NFC. 2015-06-01 23:55:06 +00:00
MCMachObjectTargetWriter.cpp
MCMachOStreamer.cpp Create a MCSymbolELF. 2015-06-02 00:25:12 +00:00
MCNullStreamer.cpp Move alignment from MCSectionData to MCSection. 2015-05-21 19:20:38 +00:00
MCObjectFileInfo.cpp [mips] Make TTypeEncoding indirect to allow .eh_frame to be read-only. 2015-06-02 20:32:50 +00:00
MCObjectStreamer.cpp Rename HasData to IsRegistered. 2015-06-01 01:52:18 +00:00
MCObjectWriter.cpp Remove getData. 2015-05-29 21:45:01 +00:00
MCRegisterInfo.cpp
MCSection.cpp Store a bit in MCSection saying if it was registered with MCAssembler. 2015-06-01 01:30:01 +00:00
MCSectionCOFF.cpp MC: Emit COFF section flags in the "proper" order 2015-02-07 08:26:40 +00:00
MCSectionELF.cpp Use a comma after the unique keyword. 2015-04-06 16:34:41 +00:00
MCSectionMachO.cpp Implement unique sections with an unique ID. 2015-04-04 18:02:01 +00:00
MCStreamer.cpp Create a MCSymbolELF. 2015-06-02 00:25:12 +00:00
MCSubtargetInfo.cpp Use std::bitset for SubtargetFeatures. 2015-05-26 10:47:10 +00:00
MCSymbol.cpp The fragment implies the section, don't store both. 2015-06-01 14:34:40 +00:00
MCSymbolELF.cpp Merge MCELF.h into MCSymbolELF.h. 2015-06-02 20:38:46 +00:00
MCSymbolizer.cpp
MCTargetOptions.cpp
MCValue.cpp Use operator<< instead of print in a few more places. 2015-05-27 13:05:42 +00:00
MCWin64EH.cpp MC: Clean up MCExpr naming. NFC. 2015-05-30 01:25:56 +00:00
MCWinEH.cpp Move alignment from MCSectionData to MCSection. 2015-05-21 19:20:38 +00:00
StringTableBuilder.cpp
SubtargetFeature.cpp [MC] Replace custom string join function with the one from StringExtras. 2015-05-28 11:45:32 +00:00
WinCOFFObjectWriter.cpp Rename HasData to IsRegistered. 2015-06-01 01:52:18 +00:00
WinCOFFStreamer.cpp Create a MCSymbolELF. 2015-06-02 00:25:12 +00:00
YAML.cpp