[PATCH] D59469: [WebAssembly] Rename methods according to instruction name changes (NFC)

Heejin Ahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 17 03:57:37 PDT 2019


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

Repository:
  rL LLVM

https://reviews.llvm.org/D59469

Files:
  lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp


Index: lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
===================================================================
--- lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
+++ lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
@@ -96,7 +96,7 @@
 }
 
 /// Get the appropriate local.get opcode for the given register class.
-static unsigned getGetLocalOpcode(const TargetRegisterClass *RC) {
+static unsigned getLocalGetOpcode(const TargetRegisterClass *RC) {
   if (RC == &WebAssembly::I32RegClass)
     return WebAssembly::LOCAL_GET_I32;
   if (RC == &WebAssembly::I64RegClass)
@@ -113,7 +113,7 @@
 }
 
 /// Get the appropriate local.set opcode for the given register class.
-static unsigned getSetLocalOpcode(const TargetRegisterClass *RC) {
+static unsigned getLocalSetOpcode(const TargetRegisterClass *RC) {
   if (RC == &WebAssembly::I32RegClass)
     return WebAssembly::LOCAL_SET_I32;
   if (RC == &WebAssembly::I64RegClass)
@@ -245,7 +245,7 @@
         if (!MFI.isVRegStackified(OldReg)) {
           unsigned LocalId = getLocalId(Reg2Local, CurLocal, OldReg);
           unsigned NewReg = MRI.createVirtualRegister(RC);
-          unsigned Opc = getGetLocalOpcode(RC);
+          unsigned Opc = getLocalGetOpcode(RC);
           BuildMI(MBB, &MI, MI.getDebugLoc(), TII->get(Opc), NewReg)
               .addImm(LocalId);
           MI.getOperand(2).setReg(NewReg);
@@ -289,7 +289,7 @@
             Drop->getOperand(0).setIsKill();
           } else {
             unsigned LocalId = getLocalId(Reg2Local, CurLocal, OldReg);
-            unsigned Opc = getSetLocalOpcode(RC);
+            unsigned Opc = getLocalSetOpcode(RC);
             BuildMI(MBB, InsertPt, MI.getDebugLoc(), TII->get(Opc))
                 .addImm(LocalId)
                 .addReg(NewReg);
@@ -346,7 +346,7 @@
         unsigned LocalId = getLocalId(Reg2Local, CurLocal, OldReg);
         const TargetRegisterClass *RC = MRI.getRegClass(OldReg);
         unsigned NewReg = MRI.createVirtualRegister(RC);
-        unsigned Opc = getGetLocalOpcode(RC);
+        unsigned Opc = getLocalGetOpcode(RC);
         InsertPt =
             BuildMI(MBB, InsertPt, MI.getDebugLoc(), TII->get(Opc), NewReg)
                 .addImm(LocalId);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59469.191013.patch
Type: text/x-patch
Size: 2225 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190317/9cfcd768/attachment.bin>


More information about the llvm-commits mailing list