[PATCH] D81852: [DebugInfo] Update MachineInstr interface to better support variadic DBG_VALUE instructions
Vedant Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 17 15:40:10 PDT 2020
vsk added a comment.
I think this is a really nice step towards hiding some of the implementation details of debug instructions. I especially appreciate that code that operates on debug instructions becomes clearer.
================
Comment at: llvm/include/llvm/CodeGen/MachineInstr.h:466
const MachineOperand& getOperand(unsigned i) const {
assert(i < getNumOperands() && "getOperand() out of range!");
return Operands[i];
----------------
Is it possible to take this further and assert that getOperand() is not called on a debug instruction?
================
Comment at: llvm/test/CodeGen/MIR/Generic/dbg-value-missing-loc.mir:41
bb.0.entry:
- DBG_VALUE 1, 2, 3, 4
+ DBG_VALUE 0, $noreg, !12, !DIExpression()
+ $eax = XOR32rr undef $eax, undef $eax, implicit-def dead $eflags, debug-location !14
----------------
What necessitates this change?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81852/new/
https://reviews.llvm.org/D81852
More information about the llvm-commits
mailing list