[all-commits] [llvm/llvm-project] c521e4: [DebugInstrRef] Support recording of instruction r...
Jeremy Morse via All-commits
all-commits at lists.llvm.org
Thu Oct 15 03:31:33 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: c521e44defb53d38a46f39e29870c628f25d124a
https://github.com/llvm/llvm-project/commit/c521e44defb53d38a46f39e29870c628f25d124a
Author: Jeremy Morse <jeremy.morse at sony.com>
Date: 2020-10-15 (Thu, 15 Oct 2020)
Changed paths:
M llvm/include/llvm/CodeGen/MIRYamlMapping.h
M llvm/include/llvm/CodeGen/MachineFunction.h
M llvm/lib/CodeGen/MIRParser/MIRParser.cpp
M llvm/lib/CodeGen/MIRPrinter.cpp
M llvm/lib/CodeGen/MachineFunction.cpp
A llvm/test/DebugInfo/MIR/InstrRef/substitusions-roundtrip.mir
Log Message:
-----------
[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
More information about the All-commits
mailing list