llvm-project/llvm/test/Other
Shiva Chen 2c864551df [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
..
Inputs Rename invariant.group.barrier to launder.invariant.group 2018-05-03 11:03:01 +00:00
X86
2002-01-31-CallGraph.ll Make shell redirection construct portable 2017-07-12 13:24:46 +00:00
2002-02-24-InlineBrokePHINodes.ll
2002-03-11-ConstPropCrash.ll
2003-02-19-LoopInfoNestingBug.ll
2004-08-16-PackedConstantInlineStore.ll
2004-08-16-PackedGlobalConstant.ll
2004-08-16-PackedSelect.ll
2004-08-16-PackedSimple.ll
2004-08-20-PackedControlFlow.ll
2006-02-05-PassManager.ll
2007-04-24-eliminate-mostly-empty-blocks.ll
2007-06-05-PassID.ll
2007-06-28-PassManager.ll
2007-09-10-PassManager.ll
2008-02-14-PassManager.ll
2008-06-04-FieldSizeInPacked.ll
2008-10-06-RemoveDeadPass.ll
2008-10-15-MissingSpace.ll
2009-03-31-CallGraph.ll
2009-06-05-no-implicit-float.ll
2009-09-14-function-elements.ll
2010-05-06-Printer.ll
FileCheck-space.txt
ResponseFile.ll
attribute-comment.ll
bcanalyzer-block-info.txt
can-execute.txt REQUIRES: shell a couple of tests that require the shell 2018-02-10 00:14:54 +00:00
cgscc-devirt-iteration.ll [PM][FunctionAttrs] add NoUnwind attribute inference to PostOrderFunctionAttrs pass 2018-03-23 21:46:16 +00:00
cgscc-disconnected-invalidation.ll [PM/CGSCC] Teach the CGSCC pass manager components to gracefully handle 2017-09-14 08:33:57 +00:00
cgscc-iterate-function-mutation.ll
cgscc-libcall-update.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
cgscc-observe-devirt.ll
cleanup-lcssa.ll
close-stderr.ll
constant-fold-gep-address-spaces.ll
constant-fold-gep.ll
debugcounter-earlycse.ll [EarlyCSE] Add debug counter for debugging mis-optimizations. NFC. 2018-04-06 18:47:33 +00:00
debugcounter-newgvn.ll
debugcounter-predicateinfo.ll
extract-alias.ll
extract-linkonce.ll
extract-weak-odr.ll
extract.ll Make GlobalValues with non-default visibilility dso_local. 2018-01-18 02:08:23 +00:00
invalid-commandline-option.ll
launder.invariant.group.ll Rename invariant.group.barrier to launder.invariant.group 2018-05-03 11:03:01 +00:00
lint.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
lit-globbing.ll Fix more inconsistent line endings. NFC. 2017-12-18 19:46:56 +00:00
lit-quoting.txt
lit-unicode.txt
llvm-nm-without-aliases.ll
loop-pass-ordering.ll
loop-pass-printer.ll IR printing improvement for loop passes - handle -print-module-scope 2017-12-01 18:33:58 +00:00
loop-pm-invalidation.ll [PM] pass -debug-pass-manager flag into FunctionToLoopPassAdaptor's canonicalization PM 2017-12-29 08:16:06 +00:00
new-pass-manager.ll [PM] pass -debug-pass-manager flag into FunctionToLoopPassAdaptor's canonicalization PM 2017-12-29 08:16:06 +00:00
new-pm-defaults.ll [NewPM] Emit inliner NoDefinition missed optimization remark 2018-05-08 01:45:46 +00:00
new-pm-lto-defaults.ll Recommit r325001: [CallSiteSplitting] Support splitting of blocks with instrs before call. 2018-02-14 13:59:12 +00:00
new-pm-pgo.ll [PM] Add pgo-memop-opt pass to the new pass manager 2017-10-23 22:21:29 +00:00
new-pm-thinlto-defaults.ll [NewPM] Emit inliner NoDefinition missed optimization remark 2018-05-08 01:45:46 +00:00
opt-O0-pipeline.ll [test] Allow for optional No-Op Barrier Pass in O0 pipeline 2018-03-23 12:47:54 +00:00
opt-O2-pipeline.ll [test] Try to unbreak hexagon bots after r328160. 2018-03-21 22:57:33 +00:00
opt-O3-pipeline.ll [test] Try to unbreak hexagon bots after r328160. 2018-03-21 22:57:33 +00:00
opt-Os-pipeline.ll [test] Try to unbreak hexagon bots after r328160. 2018-03-21 22:57:33 +00:00
opt-bisect-helper.py
opt-bisect-legacy-pass-manager.ll [lit] Fix several Python 2/3 compatibility issues and tests 2018-04-07 00:21:28 +00:00
opt-override-mcpu-mattr.ll
opt-twice.ll
optimization-remarks-inline.ll
optimization-remarks-invalidation.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
optimization-remarks-lazy-bfi.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
optimize-options.ll
pass-pipeline-parsing.ll
pass-pipelines.ll Re-commit : [PowerPC] Add handling for ColdCC calling convention and a pass to mark 2018-01-30 16:17:22 +00:00
pipefail.txt
pr32085.ll Use no-op opt run to eliminate the difference in bb pred comment, per chandler's suggestion. It is better than using sed on portability. 2018-05-01 17:19:25 +00:00
print-module-scope.ll IR printing improvement for function passes - introducing -print-module-scope 2017-12-01 17:42:46 +00:00
spir_cc.ll
statistic.ll
umask.ll
writing-to-stdout.ll