mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-16 11:30:51 +00:00
0d9056d766
This was previously committed in r209680 and reverted in r209683 after it caused sanitizer builds to crash. The issue seems to be that the DebugLoc associated with dbg.value IR intrinsics isn't necessarily accurate. Instead, we duplicate the DIVariables and add an InlinedAt field to them to record their location. We were using this InlinedAt field to compute the LexicalScope for the variable, but not using it in the abstract DbgVariable construction and mapping. This resulted in a formal parameter to the current concrete function, correctly having no InlinedAt information, but incorrectly having a DebugLoc that described an inlined location within the function... thus an abstract DbgVariable was created for the variable, but its DIE was never constructed (since the LexicalScope had no such variable). This DbgVariable was silently ignored (by testing for a non-null DIE on the abstract DbgVariable). So, fix this by using the right scoping information when constructing abstract DbgVariables. In the long run, I suspect we want to undo the work that added this second kind of location tracking and fix the places where the DebugLoc propagation on the dbg.value intrinsic fails. This will shrink debug info (by not duplicating DIVariables), make it more efficient (by not having to construct new DIVariable metadata nodes to try to map back to a single variable), and benefit all instructions. But perhaps there are insurmountable issues with DebugLoc quality that I'm unaware of... I just don't know how we can't /just keep the DebugLoc from the dbg.declare to the dbg.values and never get this wrong/. Some history context: http://llvm.org/viewvc/llvm-project?view=revision&revision=135629 http://llvm.org/viewvc/llvm-project?view=revision&revision=137253 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209984 91177308-0d34-0410-b5e6-96231b3b80d8 |
||
---|---|---|
.. | ||
AArch64 | ||
ARM | ||
COFF | ||
Inputs | ||
Mips | ||
PowerPC | ||
Sparc | ||
SystemZ | ||
X86 | ||
2009-10-16-Phi.ll | ||
2009-11-03-InsertExtractValue.ll | ||
2009-11-05-DeadGlobalVariable.ll | ||
2009-11-06-NamelessGlobalVariable.ll | ||
2009-11-10-CurrentFn.ll | ||
2010-01-05-DbgScope.ll | ||
2010-01-19-DbgScope.ll | ||
2010-03-12-llc-crash.ll | ||
2010-03-19-DbgDeclare.ll | ||
2010-03-24-MemberFn.ll | ||
2010-03-30-InvalidDbgInfoCrash.ll | ||
2010-04-06-NestedFnDbgInfo.ll | ||
2010-04-19-FramePtr.ll | ||
2010-05-03-DisableFramePtr.ll | ||
2010-05-03-OriginDIE.ll | ||
2010-05-10-MultipleCU.ll | ||
2010-06-29-InlinedFnLocalVar.ll | ||
2010-07-19-Crash.ll | ||
2010-10-01-crash.ll | ||
arm-relocs.test | ||
array.ll | ||
bug_null_debuginfo.ll | ||
constant-pointers.ll | ||
cross-cu-inlining.ll | ||
cross-cu-linkonce.ll | ||
cu-line-tables.ll | ||
cu-range-hole.ll | ||
cu-ranges.ll | ||
debug-info-qualifiers.ll | ||
debuginfofinder-multiple-cu.ll | ||
debuglineinfo.test | ||
dwarf-public-names.ll | ||
dwarfdump-debug-frame-simple.test | ||
dwarfdump-debug-loc-simple.test | ||
dwarfdump-dump-flags.test | ||
dwarfdump-line-dwo.test | ||
dwarfdump-pubnames.test | ||
dwarfdump-ranges.test | ||
dwarfdump-type-units.test | ||
dwarfdump-zlib.test | ||
empty.ll | ||
enum.ll | ||
global.ll | ||
incorrect-variable-debugloc.ll | ||
inheritance.ll | ||
inline-debug-info-multiret.ll | ||
inline-debug-info.ll | ||
inline-scopes.ll | ||
inlined-arguments.ll | ||
inlined-vars.ll | ||
llvm-symbolizer-zlib.test | ||
llvm-symbolizer.test | ||
lto-comp-dir.ll | ||
member-order.ll | ||
member-pointers.ll | ||
namespace_function_definition.ll | ||
namespace_inline_function_definition.ll | ||
namespace.ll | ||
restrict.ll | ||
sugared-constants.ll | ||
template-recursive-void.ll | ||
tu-composite.ll | ||
tu-member-pointer.ll | ||
two-cus-from-same-file.ll | ||
typedef.ll | ||
unconditional-branch.ll | ||
varargs.ll | ||
version.ll |