1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/lib/CodeGen/MIRParser
Jeremy Morse 023a53e89a [DebugInstrRef] Support recording of instruction reference substitutions
Add a table recording "substitutions" between pairs of <instruction,
operand> numbers, from old pairs to new pairs. Post-isel optimizations are
able to record the outcome of an optimization in this way. For example, if
there were a divide instruction that generated the quotient and remainder,
and it were replaced by one that only generated the quotient:

  $rax, $rcx = DIV-AND-REMAINDER $rdx, $rsi, debug-instr-num 1
  DBG_INSTR_REF 1, 0
  DBG_INSTR_REF 1, 1

Became:

  $rax = DIV $rdx, $rsi, debug-instr-num 2
  DBG_INSTR_REF 1, 0
  DBG_INSTR_REF 1, 1

We could enter a substitution from <1, 0> to <2, 0>, and no substitution
for <1, 1> as it's no longer generated.

This approach means that if an instruction or value is deleted once we've
left SSA form, all variables that used the value implicitly become
"optimized out", something that isn't true of the current DBG_VALUE
approach.

Differential Revision: https://reviews.llvm.org/D85749
2020-10-15 11:30:14 +01:00
..
CMakeLists.txt
LLVMBuild.txt
MILexer.cpp [DebugInstrRef] Parse debug instruction-references from/to MIR 2020-10-14 10:57:09 +01:00
MILexer.h [DebugInstrRef] Parse debug instruction-references from/to MIR 2020-10-14 10:57:09 +01:00
MIParser.cpp [DebugInstrRef] Parse debug instruction-references from/to MIR 2020-10-14 10:57:09 +01:00
MIRParser.cpp [DebugInstrRef] Support recording of instruction reference substitutions 2020-10-15 11:30:14 +01:00