1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/test/DebugInfo
Djordje Todorovic c793732c01 [RemoveRedundantDebugValues] Add a Pass that removes redundant DBG_VALUEs
This new MIR pass removes redundant DBG_VALUEs.

After the register allocator is done, more precisely, after
the Virtual Register Rewriter, we end up having duplicated
DBG_VALUEs, since some virtual registers are being rewritten
into the same physical register as some of existing DBG_VALUEs.
Each DBG_VALUE should indicate (at least before the LiveDebugValues)
variables assignment, but it is being clobbered for function
parameters during the SelectionDAG since it generates new DBG_VALUEs
after COPY instructions, even though the parameter has no assignment.
For example, if we had a DBG_VALUE $regX as an entry debug value
representing the parameter, and a COPY and after the COPY,
DBG_VALUE $virt_reg, and after the virtregrewrite the $virt_reg gets
rewritten into $regX, we'd end up having redundant DBG_VALUE.

This breaks the definition of the DBG_VALUE since some analysis passes
might be built on top of that premise..., and this patch tries to fix
the MIR with the respect to that.

This first patch performs bacward scan, by trying to detect a sequence of
consecutive DBG_VALUEs, and to remove all DBG_VALUEs describing one
variable but the last one:

For example:

(1) DBG_VALUE $edi, !"var1", ...
(2) DBG_VALUE $esi, !"var2", ...
(3) DBG_VALUE $edi, !"var1", ...
 ...

in this case, we can remove (1).

By combining the forward scan that will be introduced in the next patch
(from this stack), by inspecting the statistics, the RemoveRedundantDebugValues
removes 15032 instructions by using gdb-7.11 as a testbed.

Differential Revision: https://reviews.llvm.org/D105279
2021-07-14 04:29:42 -07:00
..
AArch64 Revert "GlobalISel/AArch64: don't optimize away redundant branches at -O0" 2021-07-09 08:23:36 +05:00
AMDGPU [MCAsmInfo] Support UsesCFIForDebug for targets with no exception handling 2021-05-06 04:53:45 +05:30
ARM [LiveDebugValues][InstrRef][2/2] Emit entry value variable locations 2021-06-30 23:07:39 +01:00
BPF Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
COFF Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
Generic [llc] Default MCUseDwarfDirectory to true 2021-07-12 17:44:02 -07:00
Inputs Move dwarfdump-invalid.test into the tools/llvm-dwarfdump directory. 2021-06-23 12:00:34 -07:00
Lanai
Mips [LiveDebugValues][InstrRef][2/2] Emit entry value variable locations 2021-06-30 23:07:39 +01:00
MIR [RemoveRedundantDebugValues] Add a Pass that removes redundant DBG_VALUEs 2021-07-14 04:29:42 -07:00
MSP430 Attempt to unbreak the test introduced in 359fae6eb094 on Windows 2020-06-22 14:41:55 +03:00
NVPTX [llc] Default MCUseDwarfDirectory to true 2021-07-12 17:44:02 -07:00
PDB [lld] Fixed CodeView GuidAdapter::format to handle GUID bytes in the right order. 2021-04-09 05:29:14 +04:00
PowerPC [Debug-Info] make DIE attributes generation under strict DWARF control 2021-05-13 20:34:07 -04:00
RISCV Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
Sparc [LiveDebugValues][InstrRef][2/2] Emit entry value variable locations 2021-06-30 23:07:39 +01:00
Symbolize/ELF [llvm-symbolizer][llvm-nm] Fix AArch64 and ARM mapping symbols handling. 2021-03-23 14:17:12 +01:00
SystemZ
WebAssembly [WebAssembly] Add TargetInstrInfo::getCalleeOperand 2021-05-26 11:43:59 -07:00
X86 [llc] Default MCUseDwarfDirectory to true 2021-07-12 17:44:02 -07:00
XCOFF [AIX][XCOFF] Use bit order of has_vec and longtbtable bits as defined in AIX header debug.h 2021-07-09 11:06:46 -04:00
arange-overlap.test
arm-relocs.test
cDefaultLower.ll [DebugInfo] Upgrade DISubrange to support Fortran dynamic arrays 2020-05-28 13:46:41 +05:30
check-debugify-preserves-analyses.ll [FunctionAttrs] Rename functionattrs -> function-attrs 2020-07-28 09:09:13 -07:00
cross-cu-inlining.test
cross-cu-scope.ll Restore lit feature object-emission. Omit DebugInfo/Generic on XCore. 2021-04-16 13:02:14 +01:00
debug-frame-cie-pointer-reloc.test [DebugInfo] Read CIE pointer as a relocatable value. 2020-02-20 09:12:05 +07:00
debugify-bogus-dbg-value.ll
debugify-each.ll [Debugify] Skip debugifying on special/immutable passes 2020-11-16 20:39:46 -08:00
debugify-export.ll [Debugify] Skip debugifying on special/immutable passes 2020-11-16 20:39:46 -08:00
debugify-ignore-phi.ll [Transforms][Debugify] Fix "Missing line" false alarm on PHI nodes 2021-05-14 14:06:13 +02:00
debugify-original-no-dbg-info.ll Reland "[Debugify] Make the debugify aware of the original (-g) Debug Info" 2021-02-18 23:29:22 -08:00
debugify-report-missing-locs-only.ll [debugify] Demote an error about empty locations to a warning 2020-06-26 14:55:02 -07:00
debugify.ll Reland "[MachineDebugify] Insert synthetic DBG_VALUE instructions" 2020-12-14 22:34:23 -05:00
debuglineinfo-macho.test
debuglineinfo-path.ll Restore lit feature object-emission. Omit DebugInfo/Generic on XCore. 2021-04-16 13:02:14 +01:00
debuglineinfo.test
debugmacinfo-dwo.test [DebugInfo] Support for debug_macinfo.dwo section in llvm and llvm-dwarfdump. 2019-12-03 08:54:12 +05:30
debugmacinfo.test
duplicate_dbgvalue.ll [DebugInfo] Avoid generating duplicate llvm.dbg.value 2020-03-03 09:56:45 +05:30
dwarfdump-16bit-addr.test [DebugInfo] Explicitly permit addr_size = 0x02 when parsing DWARF data 2020-06-22 13:11:55 +03:00
dwarfdump-accel.test
dwarfdump-bad-lookup-address.test
dwarfdump-dataLocationExp.ll Fixed arm build bot failure after 4042ada1c1fe 2020-05-15 23:30:05 +05:30
dwarfdump-dataLocationVar.ll Fixed arm build bot failure after 4042ada1c1fe 2020-05-15 23:30:05 +05:30
dwarfdump-debug-frame-simple.test Add regular expressions to and DWARF Call Frame Information tests in case the architecture specific target is not compiled into LLVM. 2020-10-07 14:27:19 -07:00
dwarfdump-decompression-corrupt.test llvm-dwarfdump: Return non-zero on error 2020-04-09 20:53:58 -07:00
dwarfdump-decompression-error.test llvm-dwarfdump: Return non-zero on error 2020-04-09 20:53:58 -07:00
dwarfdump-dump-flags.test
dwarfdump-dump-gdbindex.test
dwarfdump-dwp.test llvm-dwarfdump: Include unit count in DWP index header dumping 2020-06-12 12:40:02 -07:00
dwarfdump-implicit-const.test
dwarfdump-macho-relocs.test
dwarfdump-macho-universal.test
dwarfdump-objc.test
dwarfdump-pubnames.test [DebugInfo] Report the format of tables in .debug_pub* sections [8/10] 2020-06-02 17:55:31 +07:00
dwarfdump-pushobjectaddress.ll Fixed arm build bot failure after ab699d78a26f 2020-05-15 23:14:56 +05:30
dwarfdump-ranges.test
dwarfdump-type-units.test [DebugInfo] Separate fields with commas in headers of type units (3/3). 2020-06-01 17:40:28 +07:00
dwarfdump-zlib.test [DebugInfo] Report the format of compilation units [3/10] 2020-06-02 17:55:30 +07:00
dwo.ll Restore lit feature object-emission. Omit DebugInfo/Generic on XCore. 2021-04-16 13:02:14 +01:00
fortran-string-type.ll [DebugInfo] Add handling of stringLengthExp operand of DIStringType. 2020-12-08 14:49:59 -05:00
fortranDefaultLower.ll [DebugInfo] Upgrade DISubrange to support Fortran dynamic arrays 2020-05-28 13:46:41 +05:30
fortranSubrangeCountExpr.ll [DebugInfo] Upgrade DISubragne::count to accept DIExpression also 2021-03-30 09:16:55 +05:30
fortranSubrangeExpr.ll [DebugInfo] Upgrade DISubrange to support Fortran dynamic arrays 2020-05-28 13:46:41 +05:30
fortranSubrangeInt.ll [DebugInfo] Upgrade DISubrange to support Fortran dynamic arrays 2020-05-28 13:46:41 +05:30
fortranSubrangeVar.ll Fixed bot failure after d20bf5a7258d4b6a7 2020-05-28 18:01:38 +05:30
gcc-local-mem-func.test
high-pc-constant.test
implicit-const-test2.s llvm-dwarfdump: Fix DWARF-5 DW_FORM_implicit_const (used by GCC) 2021-03-09 09:26:58 +01:00
invalid-inlined-subroutine.s Fix a crash in DWARFUnit::getInlinedChainForAddress in case of unexpected DWARF information. 2021-03-09 14:20:27 +04:00
invalid-relocations.test [test] Use yaml2obj -o %t instead of > %t 2020-01-21 17:20:18 -08:00
limit-arglist-size.ll Partial Reapply "[DebugInfo] Use variadic debug values to salvage BinOps and GEP instrs with non-const operands" 2021-06-24 09:46:38 +01:00
llvm-symbolizer-bbsections-test.s Recommit D91678 after fixing the test breakage. 2021-01-09 17:44:12 -08:00
macro_link.ll
member-pointers.o
missing-abstract-variable.o
omit-empty.ll Restore lit feature object-emission. Omit DebugInfo/Generic on XCore. 2021-04-16 13:02:14 +01:00
pr34186.ll
pr34672.ll
pr37964.ll [Debugify] Port -debugify-each to NewPM 2020-11-02 08:16:43 -08:00
precomp.test [test] Use yaml2obj -o %t instead of > %t 2020-01-21 17:20:18 -08:00
salvage-cast-debug-info.ll [EarlyCSE] Verify hash code in regression tests 2020-09-04 10:40:35 -04:00
salvage-duplicate-values.ll [DebugInfo] Correctly update dbg.values with duplicated location ops 2021-07-14 11:17:24 +01:00
salvage-gep.ll Revert "[DebugInfo] Enable variadic debug value salvaging" 2021-06-28 11:25:09 -04:00
salvage-nonconst-binop.ll Revert "[DebugInfo] Enable variadic debug value salvaging" 2021-06-28 11:25:09 -04:00
simplify-cfg-preserve-dbg-values.ll [SimplifyCFG] Remap rewritten debug intrinsic operands. 2020-05-08 11:10:25 -07:00
skeletoncu.ll Restore lit feature object-emission. Omit DebugInfo/Generic on XCore. 2021-04-16 13:02:14 +01:00
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-error.test [yaml2obj] - ProgramHeaders: introduce FirstSec/LastSec instead of Sections list. 2020-11-09 13:00:50 +03:00
symbolize-build-id.test [yaml2obj] - ProgramHeaders: introduce FirstSec/LastSec instead of Sections list. 2020-11-09 13:00:50 +03:00
symbolize-demangling.s
symbolize-directory.s
symbolize-gnu-debuglink-fallback.test
symbolize-gnu-debuglink-no-realpath.test
symbolize-gnu-debuglink.test
symbolize-inlined.test [test][tools] Add missing and improve testing 2019-12-09 12:24:23 +00:00
symbolize-macho-universal-unknown-arch.test Revert several changes related to llvm-symbolizer exiting non-zero on failure. 2020-10-21 15:21:44 -07:00
symbolize-macho-universal.test
symbolize-missing-file.test [test] Use host platform specific error message substitution in lit tests 2021-01-29 07:16:30 -05:00
symbolize-no-debug-str.test
symbolize-paths.s attempt to fix symbolize-paths.s everywhere after cd68f4 2020-01-29 14:26:50 -05:00
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 [DebugInfo] Report the format of type units [10/10] 2020-06-02 17:55:31 +07:00
unrolled-loop-remainder.ll