1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00
llvm-mirror/unittests/IR
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
..
AsmWriterTest.cpp [IR] Don't print "!DIExpression() = !DIExpression()" when dumping 2017-08-30 20:40:36 +00:00
AttributesTest.cpp [Attributes] Fix a bug in AttributeList::get so it can handle a mix of FunctionIndex and ReturnIndex/arg indices at the same time 2018-04-16 17:05:01 +00:00
BasicBlockTest.cpp [ADT] Make filter_iterator support bidirectional iteration 2018-04-25 21:50:09 +00:00
CFGBuilder.cpp [Dominators] Define Arc less-than operator inline. 2017-07-13 23:11:57 +00:00
CFGBuilder.h [Dominators] Define Arc less-than operator inline. 2017-07-13 23:11:57 +00:00
CMakeLists.txt [IR] Avoid the need to prefix MS C++ symbols with '\01' 2018-03-16 20:13:32 +00:00
ConstantRangeTest.cpp [ConstantRange] Support for ashr in ConstantRange computation 2017-12-18 13:01:32 +00:00
ConstantsTest.cpp Fix a bunch of places where operator-> was used directly on the return from dyn_cast. 2018-05-05 01:57:00 +00:00
DebugInfoTest.cpp
DebugTypeODRUniquingTest.cpp Add DWARF for discriminated unions 2018-02-06 23:45:59 +00:00
DeferredDominanceTest.cpp [JumpThreading] Preservation of DT and LVI across the pass 2018-01-12 21:06:48 +00:00
DominatorTreeBatchUpdatesTest.cpp [Dominators] Fix some edge cases for PostDomTree updating 2018-01-20 10:29:37 +00:00
DominatorTreeTest.cpp [Dominators] Remove verifyDomTree and add some verifying for Post Dom Trees 2018-02-28 11:00:08 +00:00
FunctionTest.cpp [GlobalObject] Fix setSection("") 2017-02-15 21:42:42 +00:00
InstructionsTest.cpp [IR] De-virtualize ~Value to save a vptr 2017-05-18 17:24:10 +00:00
IntrinsicsTest.cpp
IRBuilderTest.cpp [IRBuilder] fix CreateMaxNum to actually produce maxnum (PR36454) 2018-02-20 18:21:43 +00:00
LegacyPassManagerTest.cpp allow custom OptBisect classes set to LLVMContext 2018-04-05 10:29:37 +00:00
ManglerTest.cpp [IR] Avoid the need to prefix MS C++ symbols with '\01' 2018-03-16 20:13:32 +00:00
MDBuilderTest.cpp
MetadataTest.cpp [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
ModuleTest.cpp Have Module::createRNG return a unique_ptr 2017-07-12 08:03:44 +00:00
PassBuilderCallbacksTest.cpp Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
PassManagerTest.cpp Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
PatternMatch.cpp [PatternMatch] Stabilize the matching order of commutative matchers 2018-04-27 21:23:20 +00:00
TypeBuilderTest.cpp Suppress all uses of LLVM_END_WITH_NULL. NFC. 2017-05-09 19:31:13 +00:00
TypesTest.cpp
UserTest.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
UseTest.cpp Remove redundant includes from unittests. 2017-12-13 21:31:05 +00:00
ValueHandleTest.cpp Add a new WeakVH value handle; NFC 2017-05-01 17:07:54 +00:00
ValueMapTest.cpp s/LLVM_ON_WIN32/_WIN32/, llvm 2018-04-29 00:45:03 +00:00
ValueTest.cpp [MIR] Making MIR Printing, opt -dot-cfg, and -debug printing faster 2018-03-22 21:29:07 +00:00
VerifierTest.cpp Move the stripping of invalid debug info from the Verifier to AutoUpgrade. 2017-10-02 18:31:29 +00:00
WaymarkTest.cpp