mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
e640a69d80
CodeGenPrepare::placeDebugValues moves variable location intrinsics to be immediately after the Value they refer to. This makes tracking of locations very easy; but it changes the order in which assignments appear to the debugger, from the source programs order to the order in which the optimised program computes values. This then leads to PR43986 and PR38754, where variable locations that were in a conditional block are made unconditional, which is highly misleading. This patch adjusts placeDbgValues to only re-order variable location intrinsics if they use a Value before it is defined, significantly reducing the damage that it does. This is still not 100% safe, but the rest of CodeGenPrepare needs polishing to correctly update debug info when optimisations are performed to fully fix this. This will probably break downstream debuginfo tests -- if the instruction-stream position of variable location changes isn't the focus of the test, an easy fix should be to manually apply placeDbgValues' behaviour to the failing tests, moving dbg.value intrinsics next to SSA variable definitions thus: %foo = inst1 %bar = ... %baz = ... void call @llvm.dbg.value(metadata i32 %foo, ... to %foo = inst1 void call @llvm.dbg.value(metadata i32 %foo, ... %bar = ... %baz = ... This should return your test to exercising whatever it was testing before. Differential Revision: https://reviews.llvm.org/D58453 |
||
---|---|---|
.. | ||
AArch64 | ||
AMDGPU | ||
ARM | ||
COFF | ||
Generic | ||
Inputs | ||
Lanai | ||
Mips | ||
MIR | ||
MSP430 | ||
NVPTX | ||
PDB | ||
PowerPC | ||
RISCV | ||
Sparc | ||
SystemZ | ||
WebAssembly | ||
X86 | ||
arange-overlap.test | ||
arm-relocs.test | ||
check-debugify-preserves-analyses.ll | ||
cross-cu-inlining.test | ||
cross-cu-scope.ll | ||
debugify-bogus-dbg-value.ll | ||
debugify-each.ll | ||
debugify-export.ll | ||
debugify-report-missing-locs-only.ll | ||
debugify.ll | ||
debuglineinfo-macho.test | ||
debuglineinfo-path.ll | ||
debuglineinfo.test | ||
debugmacinfo-dwo.test | ||
debugmacinfo.test | ||
dwarfdump-64-bit-dwarf.test | ||
dwarfdump-accel.test | ||
dwarfdump-bad-lookup-address.test | ||
dwarfdump-debug-frame-simple.test | ||
dwarfdump-decompression-corrupt.test | ||
dwarfdump-decompression-error.test | ||
dwarfdump-dump-flags.test | ||
dwarfdump-dump-gdbindex.test | ||
dwarfdump-dwp.test | ||
dwarfdump-implicit-const.test | ||
dwarfdump-invalid-line-table.test | ||
dwarfdump-invalid.test | ||
dwarfdump-macho-relocs.test | ||
dwarfdump-macho-universal.test | ||
dwarfdump-objc.test | ||
dwarfdump-pubnames.test | ||
dwarfdump-ranges.test | ||
dwarfdump-type-units.test | ||
dwarfdump-zlib.test | ||
dwo.ll | ||
gcc-local-mem-func.test | ||
high-pc-constant.test | ||
invalid-relocations.test | ||
macro_link.ll | ||
member-pointers.o | ||
missing-abstract-variable.o | ||
omit-empty.ll | ||
pr34186.ll | ||
pr34672.ll | ||
precomp.test | ||
skeletoncu.ll | ||
strip-DIGlobalVariable.ll | ||
strip-loop-metadata.ll | ||
strip-module-flags.ll | ||
symbolize-64bit-address.test | ||
symbolize-absolute-path-in-debug-line.s | ||
symbolize-build-id.test | ||
symbolize-demangling.s | ||
symbolize-directory.s | ||
symbolize-gnu-debuglink-fallback.test | ||
symbolize-gnu-debuglink-no-realpath.test | ||
symbolize-gnu-debuglink.test | ||
symbolize-inlined.test | ||
symbolize-macho-universal-unknown-arch.test | ||
symbolize-macho-universal.test | ||
symbolize-missing-file.test | ||
symbolize-no-debug-str.test | ||
symbolize-shared-abbrev.s | ||
symbolize-split-dwarf-empty.test | ||
symbolize-split-dwarf-no-skel-address.test | ||
symbolize-stripped-sections.test | ||
symbolize-stripped.test | ||
symbolize-tu.test | ||
symbolize-zlib.test | ||
symbolize.test | ||
typeunit-header.test | ||
unrolled-loop-remainder.ll |