[PATCH] D83495: [DebugInfo] Add DWARF emission for DBG_VALUE_LIST
Stephen Tozer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 7 09:07:04 PST 2021
StephenTozer added inline comments.
================
Comment at: llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:952-973
+ case MachineOperand::MO_Register:
+ case MachineOperand::MO_FrameIndex: {
+ Register Reg;
+ if (Op.isReg())
+ Reg = Op.getReg();
+ else {
+ const TargetFrameLowering *TFI =
----------------
scott.linder wrote:
> If you are changing this anyway, I'd vote to just split up these two cases, they don't actually seem related and the existing code reads worse to me.
The similarity here is that even when `Op` is a register, it can still have an offset - it's just calculated above, outside of this loop, by the debug offset operand of `MI`. I do think this looks quite messy; it'd probably be better to move the offset calculation down into this loop, so that it can be understood for both of them as a local variable.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83495/new/
https://reviews.llvm.org/D83495
More information about the llvm-commits
mailing list