[llvm] 310e327 - [NFC] Remove dead code in MipsFastISel

Guillaume Chatelet via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 13 06:36:52 PDT 2022


Author: Guillaume Chatelet
Date: 2022-06-13T13:36:36Z
New Revision: 310e3279d513cb6084973633161dea2a487a8c99

URL: https://github.com/llvm/llvm-project/commit/310e3279d513cb6084973633161dea2a487a8c99
DIFF: https://github.com/llvm/llvm-project/commit/310e3279d513cb6084973633161dea2a487a8c99.diff

LOG: [NFC] Remove dead code in MipsFastISel

Added: 
    

Modified: 
    llvm/lib/Target/Mips/MipsFastISel.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/Mips/MipsFastISel.cpp b/llvm/lib/Target/Mips/MipsFastISel.cpp
index 6ddfec5d0f791..c1b8af70d8b08 100644
--- a/llvm/lib/Target/Mips/MipsFastISel.cpp
+++ b/llvm/lib/Target/Mips/MipsFastISel.cpp
@@ -178,12 +178,8 @@ class MipsFastISel final : public FastISel {
 
   // Emit helper routines.
   bool emitCmp(unsigned DestReg, const CmpInst *CI);
-  bool emitLoad(MVT VT, unsigned &ResultReg, Address &Addr,
-                unsigned Alignment = 0);
-  bool emitStore(MVT VT, unsigned SrcReg, Address Addr,
-                 MachineMemOperand *MMO = nullptr);
-  bool emitStore(MVT VT, unsigned SrcReg, Address &Addr,
-                 unsigned Alignment = 0);
+  bool emitLoad(MVT VT, unsigned &ResultReg, Address &Addr);
+  bool emitStore(MVT VT, unsigned SrcReg, Address &Addr);
   unsigned emitIntExt(MVT SrcVT, unsigned SrcReg, MVT DestVT, bool isZExt);
   bool emitIntExt(MVT SrcVT, unsigned SrcReg, MVT DestVT, unsigned DestReg,
 
@@ -753,8 +749,7 @@ bool MipsFastISel::emitCmp(unsigned ResultReg, const CmpInst *CI) {
   return true;
 }
 
-bool MipsFastISel::emitLoad(MVT VT, unsigned &ResultReg, Address &Addr,
-                            unsigned Alignment) {
+bool MipsFastISel::emitLoad(MVT VT, unsigned &ResultReg, Address &Addr) {
   //
   // more cases will be handled here in following patches.
   //
@@ -808,8 +803,7 @@ bool MipsFastISel::emitLoad(MVT VT, unsigned &ResultReg, Address &Addr,
   return false;
 }
 
-bool MipsFastISel::emitStore(MVT VT, unsigned SrcReg, Address &Addr,
-                             unsigned Alignment) {
+bool MipsFastISel::emitStore(MVT VT, unsigned SrcReg, Address &Addr) {
   //
   // more cases will be handled here in following patches.
   //
@@ -902,7 +896,7 @@ bool MipsFastISel::selectLoad(const Instruction *I) {
     return false;
 
   unsigned ResultReg;
-  if (!emitLoad(VT, ResultReg, Addr, cast<LoadInst>(I)->getAlignment()))
+  if (!emitLoad(VT, ResultReg, Addr))
     return false;
   updateValueMap(I, ResultReg);
   return true;
@@ -931,7 +925,7 @@ bool MipsFastISel::selectStore(const Instruction *I) {
   if (!computeAddress(I->getOperand(1), Addr))
     return false;
 
-  if (!emitStore(VT, SrcReg, Addr, cast<StoreInst>(I)->getAlignment()))
+  if (!emitStore(VT, SrcReg, Addr))
     return false;
   return true;
 }


        


More information about the llvm-commits mailing list