@@ -95,10 +95,9 @@ void NVPTXInstPrinter::printOperand(const MCInst *MI, unsigned OpNo,
9595}
9696
9797void NVPTXInstPrinter::printCvtMode (const MCInst *MI, int OpNum, raw_ostream &O,
98- const char *M ) {
98+ StringRef Modifier ) {
9999 const MCOperand &MO = MI->getOperand (OpNum);
100100 int64_t Imm = MO.getImm ();
101- llvm::StringRef Modifier (M);
102101
103102 if (Modifier == " ftz" ) {
104103 // FTZ flag
@@ -155,10 +154,9 @@ void NVPTXInstPrinter::printCvtMode(const MCInst *MI, int OpNum, raw_ostream &O,
155154}
156155
157156void NVPTXInstPrinter::printCmpMode (const MCInst *MI, int OpNum, raw_ostream &O,
158- const char *M ) {
157+ StringRef Modifier ) {
159158 const MCOperand &MO = MI->getOperand (OpNum);
160159 int64_t Imm = MO.getImm ();
161- llvm::StringRef Modifier (M);
162160
163161 if (Modifier == " ftz" ) {
164162 // FTZ flag
@@ -229,8 +227,7 @@ void NVPTXInstPrinter::printCmpMode(const MCInst *MI, int OpNum, raw_ostream &O,
229227}
230228
231229void NVPTXInstPrinter::printLdStCode (const MCInst *MI, int OpNum,
232- raw_ostream &O, const char *M) {
233- llvm::StringRef Modifier (M);
230+ raw_ostream &O, StringRef Modifier) {
234231 const MCOperand &MO = MI->getOperand (OpNum);
235232 int Imm = (int )MO.getImm ();
236233 if (Modifier == " sem" ) {
@@ -329,10 +326,9 @@ void NVPTXInstPrinter::printLdStCode(const MCInst *MI, int OpNum,
329326}
330327
331328void NVPTXInstPrinter::printMmaCode (const MCInst *MI, int OpNum, raw_ostream &O,
332- const char *M ) {
329+ StringRef Modifier ) {
333330 const MCOperand &MO = MI->getOperand (OpNum);
334331 int Imm = (int )MO.getImm ();
335- llvm::StringRef Modifier (M);
336332 if (Modifier.empty () || Modifier == " version" ) {
337333 O << Imm; // Just print out PTX version
338334 return ;
@@ -346,9 +342,8 @@ void NVPTXInstPrinter::printMmaCode(const MCInst *MI, int OpNum, raw_ostream &O,
346342}
347343
348344void NVPTXInstPrinter::printMemOperand (const MCInst *MI, int OpNum,
349- raw_ostream &O, const char *M ) {
345+ raw_ostream &O, StringRef Modifier ) {
350346 printOperand (MI, OpNum, O);
351- llvm::StringRef Modifier (M);
352347
353348 if (Modifier == " add" ) {
354349 O << " , " ;
@@ -363,7 +358,7 @@ void NVPTXInstPrinter::printMemOperand(const MCInst *MI, int OpNum,
363358}
364359
365360void NVPTXInstPrinter::printOffseti32imm (const MCInst *MI, int OpNum,
366- raw_ostream &O, const char *Modifier ) {
361+ raw_ostream &O) {
367362 auto &Op = MI->getOperand (OpNum);
368363 assert (Op.isImm () && " Invalid operand" );
369364 if (Op.getImm () != 0 ) {
@@ -373,13 +368,13 @@ void NVPTXInstPrinter::printOffseti32imm(const MCInst *MI, int OpNum,
373368}
374369
375370void NVPTXInstPrinter::printHexu32imm (const MCInst *MI, int OpNum,
376- raw_ostream &O, const char *Modifier ) {
371+ raw_ostream &O) {
377372 int64_t Imm = MI->getOperand (OpNum).getImm ();
378373 O << formatHex (Imm) << " U" ;
379374}
380375
381376void NVPTXInstPrinter::printProtoIdent (const MCInst *MI, int OpNum,
382- raw_ostream &O, const char *Modifier ) {
377+ raw_ostream &O) {
383378 const MCOperand &Op = MI->getOperand (OpNum);
384379 assert (Op.isExpr () && " Call prototype is not an MCExpr?" );
385380 const MCExpr *Expr = Op.getExpr ();
@@ -388,7 +383,7 @@ void NVPTXInstPrinter::printProtoIdent(const MCInst *MI, int OpNum,
388383}
389384
390385void NVPTXInstPrinter::printPrmtMode (const MCInst *MI, int OpNum,
391- raw_ostream &O, const char *Modifier ) {
386+ raw_ostream &O) {
392387 const MCOperand &MO = MI->getOperand (OpNum);
393388 int64_t Imm = MO.getImm ();
394389
@@ -419,10 +414,9 @@ void NVPTXInstPrinter::printPrmtMode(const MCInst *MI, int OpNum,
419414}
420415
421416void NVPTXInstPrinter::printTmaReductionMode (const MCInst *MI, int OpNum,
422- raw_ostream &O,
423- const char *Modifier) {
417+ raw_ostream &O) {
424418 const MCOperand &MO = MI->getOperand (OpNum);
425- using RedTy = llvm:: nvvm::TMAReductionOp;
419+ using RedTy = nvvm::TMAReductionOp;
426420
427421 switch (static_cast <RedTy>(MO.getImm ())) {
428422 case RedTy::ADD:
0 commit comments