]> granicus.if.org Git - llvm/commitdiff
[WebAssembly] Fix comments in ExplicitLocals (NFC)
authorHeejin Ahn <aheejin@gmail.com>
Sat, 29 Dec 2018 02:42:04 +0000 (02:42 +0000)
committerHeejin Ahn <aheejin@gmail.com>
Sat, 29 Dec 2018 02:42:04 +0000 (02:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350144 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp

index 384c0d60db535b4db22d3aaba96c993e77ead238..92cf7f38efa474c9099a0dbc9cbd4f504f515469 100644 (file)
@@ -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;