[PATCH] D76784: [WebAssembly] Clear frame base vreg in explicit-locals when stack pointer is dead

Derek Schuff via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 26 13:36:29 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGe110897e28c3: [WEbAssembly] Clear frame base vreg in explicit-locals when stack pointer is… (authored by dschuff).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76784/new/

https://reviews.llvm.org/D76784

Files:
  llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp


Index: llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
===================================================================
--- llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
+++ llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
@@ -313,6 +313,8 @@
                     .addReg(NewReg);
             // After the drop instruction, this reg operand will not be used
             Drop->getOperand(0).setIsKill();
+            if (MFI.isFrameBaseVirtual() && OldReg == MFI.getFrameBaseVreg())
+              MFI.clearFrameBaseVreg();
           } else {
             unsigned LocalId = getLocalId(Reg2Local, MFI, CurLocal, OldReg);
             unsigned Opc = getLocalSetOpcode(RC);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76784.252968.patch
Type: text/x-patch
Size: 708 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200326/9ca388dc/attachment.bin>


More information about the llvm-commits mailing list