[PATCH] D49034: [WIP] [WebAssembly] Move/clone DBG_VALUE during WebAssemblyRegStackify pass
Matt Davis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 6 10:49:27 PDT 2018
mattd added inline comments.
================
Comment at: lib/Target/WebAssembly/WebAssemblyRegStackify.cpp:472
+ RE = MRI.reg_end(); RI != RE; ++RI) {
+ MachineInstr *MI = RI->getParent();
+ if (MI->isDebugValue() && MI->getParent() == &MBB)
----------------
I'm wondering if we should check that MI is nullptr here, or maybe assert? I know parent MI's can be initialized to nullptr and can be cleared, but I'm not sure if that would ever be the case at this point.
================
Comment at: lib/Target/WebAssembly/WebAssemblyRegStackify.cpp:534
+static void CloneDebugValues(unsigned Reg, MachineInstr *Insert, unsigned TargetReg,
+ MachineBasicBlock &MBB, MachineRegisterInfo &MRI) {
+ SmallPtrSet<MachineInstr *, 4> Instrs;
----------------
Minor nit: I'd suggest running clang-format here, usually formals split between two lines end up following the opening parenthesis, lining up with each other.
================
Comment at: lib/Target/WebAssembly/WebAssemblyRegStackify.cpp:585
// If that was the last use of the original, delete the original.
+ // Corresponding DBG_VALUEs either moved or cloned into Insert location.
if (IsDead) {
----------------
I would reword this to be imperative: "Move or clone corresponding DBG_VALUEs to the 'Insert' location.
Repository:
rL LLVM
https://reviews.llvm.org/D49034
More information about the llvm-commits
mailing list