From 7a5cc00d560d1d050b5feb34c4f049b90ffe3bf9 Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Sat, 29 Dec 2018 02:42:04 +0000 Subject: [PATCH] [WebAssembly] Fix comments in ExplicitLocals (NFC) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350144 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp b/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp index 384c0d60db5..92cf7f38efa 100644 --- a/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp +++ b/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp @@ -234,7 +234,7 @@ bool WebAssemblyExplicitLocals::runOnMachineFunction(MachineFunction &MF) { continue; // Replace tee instructions with tee_local. The difference is that tee - // instructins have two defs, while tee_local instructions have one def + // instructions have two defs, while tee_local instructions have one def // and an index of a local to write to. if (WebAssembly::isTee(MI)) { assert(MFI.isVRegStackified(MI.getOperand(0).getReg())); @@ -296,8 +296,9 @@ bool WebAssemblyExplicitLocals::runOnMachineFunction(MachineFunction &MF) { .addReg(NewReg); } MI.getOperand(0).setReg(NewReg); - // This register operand is now being used by the inserted drop - // instruction, so make it undead. + // This register operand of the original instruction is now being used + // by the inserted drop or set_local instruction, so make it not dead + // yet. MI.getOperand(0).setIsDead(false); MFI.stackifyVReg(NewReg); Changed = true; -- 2.50.1