[PATCH] D49034: [WebAssembly] Move/clone DBG_VALUE during WebAssemblyRegStackify pass

Yury Delendik via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 26 15:08:34 PDT 2018


yurydelendik added a comment.

In https://reviews.llvm.org/D49034#1246966, @sbc100 wrote:

> We we revert this or get it fixed?  Its currently breaking the wasm waterfall: https://wasm-stat.us/console


The fix just to pass tests is

  diff --git a/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp b/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp
  index 5b6a91dbc9d..6583057e7fb 100644
  --- a/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp
  +++ b/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp
  @@ -428,8 +428,10 @@ static bool OneUseDominatesOtherUses(unsigned Reg, const MachineOperand &OneUse,
           if (!TargetRegisterInfo::isVirtualRegister(DefReg) ||
               !MFI.isVRegStackified(DefReg))
             return false;
  -        assert(MRI.hasOneUse(DefReg));
  -        const MachineOperand &NewUse = *MRI.use_begin(DefReg);
  +        auto It = MRI.use_nodbg_begin(DefReg);
  +        assert(It != MRI.use_nodbg_end());
  +        const MachineOperand &NewUse = *It;
  +        assert(++It == MRI.use_nodbg_end());
           const MachineInstr *NewUseInst = NewUse.getParent();
           if (NewUseInst == OneUseInst) {
             if (&OneUse > &NewUse)

It will take care of WebAssemblyRegStackify, but it will be nice to see it at MRI::hasOneUse.

Let me know if I need to backup entire patch and attempt to fix hasOneUse first.


Repository:
  rL LLVM

https://reviews.llvm.org/D49034





More information about the llvm-commits mailing list