[PATCH] D76784: [WIP] Clear frame base vreg when it's dead

Derek Schuff via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 25 10:48:07 PDT 2020


dschuff created this revision.
Herald added subscribers: llvm-commits, aheejin, hiraditya, jgravelle-google, sbc100.
Herald added a project: LLVM.

Repository:
  rG LLVM Github Monorepo

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.252616.patch
Type: text/x-patch
Size: 708 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200325/31a8a8db/attachment.bin>


More information about the llvm-commits mailing list