[llvm] 293aa56 - [Sparc] Remove dead code (NFC) (#104264)

via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 15 18:28:14 PDT 2024


Author: Sergei Barannikov
Date: 2024-08-16T04:28:11+03:00
New Revision: 293aa56ebce2a5f5eb97308364645f5685944a42

URL: https://github.com/llvm/llvm-project/commit/293aa56ebce2a5f5eb97308364645f5685944a42
DIFF: https://github.com/llvm/llvm-project/commit/293aa56ebce2a5f5eb97308364645f5685944a42.diff

LOG: [Sparc] Remove dead code (NFC) (#104264)

Added: 
    

Modified: 
    llvm/lib/Target/Sparc/SparcAsmPrinter.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp b/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp
index 6855471840e9db..182779fa93e503 100644
--- a/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp
+++ b/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp
@@ -50,8 +50,7 @@ namespace {
     StringRef getPassName() const override { return "Sparc Assembly Printer"; }
 
     void printOperand(const MachineInstr *MI, int opNum, raw_ostream &OS);
-    void printMemOperand(const MachineInstr *MI, int opNum, raw_ostream &OS,
-                         const char *Modifier = nullptr);
+    void printMemOperand(const MachineInstr *MI, int opNum, raw_ostream &OS);
 
     void emitFunctionBodyStart() override;
     void emitInstruction(const MachineInstr *MI) override;
@@ -401,16 +400,9 @@ void SparcAsmPrinter::printOperand(const MachineInstr *MI, int opNum,
 }
 
 void SparcAsmPrinter::printMemOperand(const MachineInstr *MI, int opNum,
-                                      raw_ostream &O, const char *Modifier) {
+                                      raw_ostream &O) {
   printOperand(MI, opNum, O);
 
-  // If this is an ADD operand, emit it like normal operands.
-  if (Modifier && !strcmp(Modifier, "arith")) {
-    O << ", ";
-    printOperand(MI, opNum+1, O);
-    return;
-  }
-
   if (MI->getOperand(opNum+1).isReg() &&
       MI->getOperand(opNum+1).getReg() == SP::G0)
     return;   // don't print "+%g0"


        


More information about the llvm-commits mailing list