[RISCV] Remove unused method RISCVInstPrinter::printSImm5Plus1. NFC
authorCraig Topper <craig.topper@sifive.com>
Mon, 4 Jan 2021 20:20:18 +0000 (12:20 -0800)
committerCraig Topper <craig.topper@sifive.com>
Mon, 4 Jan 2021 20:21:35 +0000 (12:21 -0800)
simm5_plus1 is only used by InstAliases so should never be printed.

llvm/lib/Target/RISCV/MCTargetDesc/RISCVInstPrinter.cpp
llvm/lib/Target/RISCV/MCTargetDesc/RISCVInstPrinter.h
llvm/lib/Target/RISCV/RISCVInstrInfoV.td

index 7e4590456621c9f0cd1a9358a562b62007936d7d..65edd3b4d4f631689d3f06f9858cfb981a2dbf68 100644 (file)
@@ -187,15 +187,6 @@ void RISCVInstPrinter::printVMaskReg(const MCInst *MI, unsigned OpNo,
   O << ".t";
 }
 
-void RISCVInstPrinter::printSImm5Plus1(const MCInst *MI, unsigned OpNo,
-                                       const MCSubtargetInfo &STI,
-                                       raw_ostream &O) {
-  const MCOperand &MO = MI->getOperand(OpNo);
-
-  assert(MO.isImm() && "printSImm5Plus1 can only print constant operands");
-  O << MO.getImm() + 1;
-}
-
 const char *RISCVInstPrinter::getRegisterName(unsigned RegNo) {
   return getRegisterName(RegNo, ArchRegNames ? RISCV::NoRegAltName
                                              : RISCV::ABIRegAltName);
index ddffcbe343d7e3e89b7edf0e6862ff704fa548fa..d078ead2c8ad3bff058d2af163612e0d704600fe 100644 (file)
@@ -46,8 +46,6 @@ public:
                    raw_ostream &O);
   void printVMaskReg(const MCInst *MI, unsigned OpNo,
                      const MCSubtargetInfo &STI, raw_ostream &O);
-  void printSImm5Plus1(const MCInst *MI, unsigned OpNo,
-                       const MCSubtargetInfo &STI, raw_ostream &O);
 
   // Autogenerated by tblgen.
   std::pair<const char *, uint64_t> getMnemonic(const MCInst *MI) override;
index b015ae0d2dba0d0afd6f5135aaa78f9452b09958..edcde5fbbb39a33925f3fe66b9dca053d7eff2d9 100644 (file)
@@ -69,7 +69,6 @@ def SImm5Plus1AsmOperand : AsmOperandClass {
 def simm5_plus1 : Operand<XLenVT>, ImmLeaf<XLenVT,
                                            [{return isInt<5>(Imm - 1);}]> {
   let ParserMatchClass = SImm5Plus1AsmOperand;
-  let PrintMethod = "printSImm5Plus1";
   let MCOperandPredicate = [{
     int64_t Imm;
     if (MCOp.evaluateAsConstantImm(Imm))