[PATCH] D79428: [WebAssembly] Added Debug Fixup pass
Derek Schuff via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 5 14:03:51 PDT 2020
dschuff added inline comments.
================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyDebugFixup.cpp:74
+ // We may insert into this list.
+ for (auto MII = MBB.begin(); MII != MBB.end(); ++MII) {
+ MachineInstr &MI = *MII;
----------------
style nit:
LLVM style would be something like
`for (auto MII = MBB.begin, MIE = MBB.end(); MII != MIE; ++MII)`
================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyDebugFixup.cpp:97
+ ++TMII;
+ BuildMI(*MI.getParent(), TMII, MI.getDebugLoc(),
+ TII->get(WebAssembly::DBG_VALUE))
----------------
So I guess this is building DBG_VALUE which sets the value to register 0, which clears it? Why advance the iterator by 2? Wouldn't we need to keep advancing until the use of this def? Or until it comes off the stack?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79428/new/
https://reviews.llvm.org/D79428
More information about the llvm-commits
mailing list