forked from OSchip/llvm-project
2c864551df
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 |
||
---|---|---|
.. | ||
2008-11-17-Shl64.ll | ||
2009-01-08-Crash.ll | ||
2009-01-14-Remat-Crash.ll | ||
2009-03-27-v2f64-param.ll | ||
2009-07-15-store192.ll | ||
2010-02-25-LSR-Crash.ll | ||
2011-01-31-DAGCombineBug.ll | ||
2011-08-01-DynamicAllocBug.ll | ||
DbgValueOtherTargets.test | ||
addsub64.ll | ||
aliases.ll | ||
align.ll | ||
alignment.ll | ||
ashr.ll | ||
atomic.ll | ||
basictest.ll | ||
bigstructret.ll | ||
byVal.ll | ||
call.ll | ||
codemodel.ll | ||
constants.ll | ||
dwarf_debug.ll | ||
epilogue_prologue.ll | ||
events.ll | ||
exception.ll | ||
float-intrinsics.ll | ||
fneg.ll | ||
getid.ll | ||
globals.ll | ||
indirectbr.ll | ||
inline-asm.ll | ||
ladd_lsub_combine.ll | ||
licm-ldwcp.ll | ||
linkage.ll | ||
lit.local.cfg | ||
llvm-intrinsics.ll | ||
load.ll | ||
memcpy.ll | ||
misc-intrinsics.ll | ||
mkmsk.ll | ||
mul64.ll | ||
offset_folding.ll | ||
private.ll | ||
ps-intrinsics.ll | ||
resources.ll | ||
resources_combine.ll | ||
scavenging.ll | ||
section-name.ll | ||
sext.ll | ||
shedulingPreference.ll | ||
sr-intrinsics.ll | ||
store.ll | ||
switch.ll | ||
switch_long.ll | ||
threads.ll | ||
tls.ll | ||
trampoline.ll | ||
trap.ll | ||
unaligned_load.ll | ||
unaligned_store.ll | ||
unaligned_store_combine.ll | ||
varargs.ll | ||
zext.ll | ||
zextfree.ll |