Skip to content

Commit fe597ef

Browse files
committed
[RISCV] Remove unused method RISCVInstPrinter::printSImm5Plus1. NFC
simm5_plus1 is only used by InstAliases so should never be printed.
1 parent 4d0aad9 commit fe597ef

File tree

3 files changed

+0
-12
lines changed

3 files changed

+0
-12
lines changed

llvm/lib/Target/RISCV/MCTargetDesc/RISCVInstPrinter.cpp

-9
Original file line numberDiff line numberDiff line change
@@ -187,15 +187,6 @@ void RISCVInstPrinter::printVMaskReg(const MCInst *MI, unsigned OpNo,
187187
O << ".t";
188188
}
189189

190-
void RISCVInstPrinter::printSImm5Plus1(const MCInst *MI, unsigned OpNo,
191-
const MCSubtargetInfo &STI,
192-
raw_ostream &O) {
193-
const MCOperand &MO = MI->getOperand(OpNo);
194-
195-
assert(MO.isImm() && "printSImm5Plus1 can only print constant operands");
196-
O << MO.getImm() + 1;
197-
}
198-
199190
const char *RISCVInstPrinter::getRegisterName(unsigned RegNo) {
200191
return getRegisterName(RegNo, ArchRegNames ? RISCV::NoRegAltName
201192
: RISCV::ABIRegAltName);

llvm/lib/Target/RISCV/MCTargetDesc/RISCVInstPrinter.h

-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ class RISCVInstPrinter : public MCInstPrinter {
4646
raw_ostream &O);
4747
void printVMaskReg(const MCInst *MI, unsigned OpNo,
4848
const MCSubtargetInfo &STI, raw_ostream &O);
49-
void printSImm5Plus1(const MCInst *MI, unsigned OpNo,
50-
const MCSubtargetInfo &STI, raw_ostream &O);
5149

5250
// Autogenerated by tblgen.
5351
std::pair<const char *, uint64_t> getMnemonic(const MCInst *MI) override;

llvm/lib/Target/RISCV/RISCVInstrInfoV.td

-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ def SImm5Plus1AsmOperand : AsmOperandClass {
6969
def simm5_plus1 : Operand<XLenVT>, ImmLeaf<XLenVT,
7070
[{return isInt<5>(Imm - 1);}]> {
7171
let ParserMatchClass = SImm5Plus1AsmOperand;
72-
let PrintMethod = "printSImm5Plus1";
7372
let MCOperandPredicate = [{
7473
int64_t Imm;
7574
if (MCOp.evaluateAsConstantImm(Imm))

0 commit comments

Comments
 (0)