1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/unittests
Shiva Chen a2029fa58e [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label.
In order to set breakpoints on labels and list source code around
labels, we need collect debug information for labels, i.e., label
name, the function label belong, line number in the file, and the
address label located. In order to keep these information in LLVM
IR and to allow backend to generate debug information correctly.
We create a new kind of metadata for labels, DILabel. The format
of DILabel is

!DILabel(scope: !1, name: "foo", file: !2, line: 3)

We hope to keep debug information as much as possible even the
code is optimized. So, we create a new kind of intrinsic for label
metadata to avoid the metadata is eliminated with basic block.
The intrinsic will keep existing if we keep it from optimized out.
The format of the intrinsic is

llvm.dbg.label(metadata !1)

It has only one argument, that is the DILabel metadata. The
intrinsic will follow the label immediately. Backend could get the
label metadata through the intrinsic's parameter.

We also create DIBuilder API for labels to be used by Frontend.
Frontend could use createLabel() to allocate DILabel objects, and use
insertLabel() to insert llvm.dbg.label intrinsic in LLVM IR.

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

Patch by Hsiangkai Wang.

llvm-svn: 331841
2018-05-09 02:40:45 +00:00
..
ADT Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
Analysis [unittests] Change std::sort to llvm::sort in response to r327219 2018-04-07 01:29:45 +00:00
AsmParser
BinaryFormat [dwarf] Unify unknown dwarf enum formatting code 2018-03-21 11:46:37 +00:00
Bitcode Pass a reference to a module to the bitcode writer. 2018-02-14 19:11:32 +00:00
CodeGen [CodeGen] Print user-friendly debug locations as MI comments 2018-04-24 11:00:46 +00:00
DebugInfo IWYU for llvm-config.h, removals. Also see r331184. 2018-04-30 15:26:01 +00:00
Demangle Fix another bot failure from r329951. 2018-04-13 02:53:26 +00:00
ExecutionEngine IWYU for llvm-config.h in llvm, additions. 2018-04-30 14:59:11 +00:00
FuzzMutate [FuzzMutate] Inst deleter doesn't work with PhiNodes 2018-01-25 09:22:18 +00:00
IR [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
LineEditor
Linker Fix build for LLVM unittests 2017-09-15 21:12:13 +00:00
MC
MI [LiveIntervals] Handle moving up dead partial write 2018-02-26 14:42:13 +00:00
Object
ObjectYAML
Option [Option] For typo '-foo', suggest '--foo' 2018-01-09 19:38:04 +00:00
Passes Move the TestPlugin project into the Tests folder in CMake. 2018-05-02 18:57:14 +00:00
ProfileData [Coverage] Take filenames into account when loading function records. 2018-05-08 19:26:51 +00:00
Support Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
Target
tools Make CMakeLists.txt formatting more consistent with the rest of LLVM. 2018-05-09 01:15:38 +00:00
Transforms [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
XRay
CMakeLists.txt [demangler] Add a partial demangling API for LLDB. 2018-04-12 20:41:38 +00:00