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
MCAsmInfoDarwin.cpp
MCAsmInfoELF.cpp
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
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
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
MCInstPrinter.cpp
MCInstrAnalysis.cpp
MCInstrDesc.cpp
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
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
MCSectionELF.cpp
MCSectionMachO.cpp
MCStreamer.cpp Create a MCSymbolELF. 2015-06-02 00:25:12 +00:00
MCSubtargetInfo.cpp
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
MCWin64EH.cpp MC: Clean up MCExpr naming. NFC. 2015-05-30 01:25:56 +00:00
MCWinEH.cpp
StringTableBuilder.cpp
SubtargetFeature.cpp
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