llvm-project/llvm/lib/CodeGen/AsmPrinter
Hsiangkai Wang 2532ac880a [DebugInfo] Generate DWARF debug information for labels. (Fix leak problems)
There are two forms for label debug information in DWARF format.

1. Labels in a non-inlined function:

DW_TAG_label
  DW_AT_name
  DW_AT_decl_file
  DW_AT_decl_line
  DW_AT_low_pc

2. Labels in an inlined function:

DW_TAG_label
  DW_AT_abstract_origin
  DW_AT_low_pc

We will collect label information from DBG_LABEL. Before every DBG_LABEL,
we will generate a temporary symbol to denote the location of the label.
The symbol could be used to get DW_AT_low_pc afterwards. So, we create a
mapping between 'inlined label' and DBG_LABEL MachineInstr in DebugHandlerBase.
The DBG_LABEL in the mapping is used to query the symbol before it.

The AbstractLabels in DwarfCompileUnit is used to process labels in inlined
functions.

We also keep a mapping between scope and labels in DwarfFile to help to
generate correct tree structure of DIEs.

It also generates label debug information under global isel.

Differential Revision: https://reviews.llvm.org/D45556

llvm-svn: 340039
2018-08-17 15:22:04 +00:00
..
ARMException.cpp Use assembler expressions to lay out the EH LSDA. 2018-02-09 17:00:25 +00:00
AccelTable.cpp DebugInfo: Add metadata support for disabling DWARF pub sections 2018-08-16 21:29:55 +00:00
AddressPool.cpp [DWARF] Basic support for producing DWARFv5 .debug_addr section 2018-08-01 05:48:06 +00:00
AddressPool.h [DWARF] Basic support for producing DWARFv5 .debug_addr section 2018-08-01 05:48:06 +00:00
AsmPrinter.cpp [x86/MIR] Implement support for pre- and post-instruction symbols, as 2018-08-16 23:11:05 +00:00
AsmPrinterDwarf.cpp Style update. NFC. 2018-03-29 23:32:54 +00:00
AsmPrinterHandler.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
AsmPrinterInlineAsm.cpp revert '[CodeGen] emit inline asm clobber list warnings for reserved' 2018-08-08 17:11:54 +00:00
ByteStreamer.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
CMakeLists.txt [DebugInfo] Generate DWARF debug information for labels. (Fix leak problems) 2018-08-17 15:22:04 +00:00
CodeViewDebug.cpp [CodeView] Omit forward references for unnamed structs and unions 2018-06-11 01:39:34 +00:00
CodeViewDebug.h [DebugInfo] Generate DWARF debug information for labels. (Fix leak problems) 2018-08-17 15:22:04 +00:00
DIE.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
DIEHash.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
DIEHash.h Fix -Wdocumentation warning. NFCI. 2018-07-18 09:07:54 +00:00
DIEHashAttributes.def Fix DIEHash refactoring that dropped the DW_AT_name from the hash 2017-05-23 18:36:07 +00:00
DbgEntityHistoryCalculator.cpp [DebugInfo] Generate DWARF debug information for labels. (Fix leak problems) 2018-08-17 15:22:04 +00:00
DbgEntityHistoryCalculator.h [DebugInfo] Generate DWARF debug information for labels. (Fix leak problems) 2018-08-17 15:22:04 +00:00
DebugHandlerBase.cpp [DebugInfo] Generate DWARF debug information for labels. (Fix leak problems) 2018-08-17 15:22:04 +00:00
DebugHandlerBase.h [DebugInfo] Generate DWARF debug information for labels. (Fix leak problems) 2018-08-17 15:22:04 +00:00
DebugLocEntry.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
DebugLocStream.cpp
DebugLocStream.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
DwarfCFIException.cpp Move TargetLoweringObjectFile from CodeGen to Target to fix layering 2018-03-23 23:58:19 +00:00
DwarfCompileUnit.cpp [DebugInfo] Generate DWARF debug information for labels. (Fix leak problems) 2018-08-17 15:22:04 +00:00
DwarfCompileUnit.h [DebugInfo] Generate DWARF debug information for labels. (Fix leak problems) 2018-08-17 15:22:04 +00:00
DwarfDebug.cpp [DebugInfo] Generate DWARF debug information for labels. (Fix leak problems) 2018-08-17 15:22:04 +00:00
DwarfDebug.h [DebugInfo] Generate DWARF debug information for labels. (Fix leak problems) 2018-08-17 15:22:04 +00:00
DwarfException.h Use assembler expressions to lay out the EH LSDA. 2018-02-09 17:00:25 +00:00
DwarfExpression.cpp [Local] replaceAllDbgUsesWith: Update debug values before RAUW 2018-07-06 17:32:39 +00:00
DwarfExpression.h Remove trailing space 2018-07-30 19:41:25 +00:00
DwarfFile.cpp [DebugInfo] Generate DWARF debug information for labels. (Fix leak problems) 2018-08-17 15:22:04 +00:00
DwarfFile.h [DebugInfo] Generate DWARF debug information for labels. (Fix leak problems) 2018-08-17 15:22:04 +00:00
DwarfStringPool.cpp [DebugInfo] Reduce debug_str_offsets section size 2018-08-07 09:54:52 +00:00
DwarfStringPool.h [DebugInfo] Reduce debug_str_offsets section size 2018-08-07 09:54:52 +00:00
DwarfUnit.cpp [DebugInfo] Generate DWARF debug information for labels. (Fix leak problems) 2018-08-17 15:22:04 +00:00
DwarfUnit.h [DebugInfo] Generate DWARF debug information for labels. (Fix leak problems) 2018-08-17 15:22:04 +00:00
EHStreamer.cpp [CodeGen] Change std::sort to llvm::sort in response to r327219 2018-04-06 18:08:42 +00:00
EHStreamer.h [CodeGen] Fix inconsistent declaration parameter name 2018-07-16 18:51:40 +00:00
ErlangGCPrinter.cpp Style update. NFC. 2018-03-29 23:32:54 +00:00
LLVMBuild.txt Update libdeps to add BinaryFormat, introduced in r304864. 2017-06-07 04:48:49 +00:00
OcamlGCPrinter.cpp Style update. NFC. 2018-03-29 23:32:54 +00:00
WinCFGuard.cpp Reland "Emit Function IDs table for Control Flow Guard" 2018-01-09 23:49:30 +00:00
WinCFGuard.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
WinException.cpp Move TargetLoweringObjectFile from CodeGen to Target to fix layering 2018-03-23 23:58:19 +00:00
WinException.h Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00