@@ -95,10 +95,9 @@ void NVPTXInstPrinter::printOperand(const MCInst *MI, unsigned OpNo,
95
95
}
96
96
97
97
void NVPTXInstPrinter::printCvtMode (const MCInst *MI, int OpNum, raw_ostream &O,
98
- const char *M ) {
98
+ StringRef Modifier ) {
99
99
const MCOperand &MO = MI->getOperand (OpNum);
100
100
int64_t Imm = MO.getImm ();
101
- llvm::StringRef Modifier (M);
102
101
103
102
if (Modifier == " ftz" ) {
104
103
// FTZ flag
@@ -155,10 +154,9 @@ void NVPTXInstPrinter::printCvtMode(const MCInst *MI, int OpNum, raw_ostream &O,
155
154
}
156
155
157
156
void NVPTXInstPrinter::printCmpMode (const MCInst *MI, int OpNum, raw_ostream &O,
158
- const char *M ) {
157
+ StringRef Modifier ) {
159
158
const MCOperand &MO = MI->getOperand (OpNum);
160
159
int64_t Imm = MO.getImm ();
161
- llvm::StringRef Modifier (M);
162
160
163
161
if (Modifier == " ftz" ) {
164
162
// FTZ flag
@@ -229,8 +227,7 @@ void NVPTXInstPrinter::printCmpMode(const MCInst *MI, int OpNum, raw_ostream &O,
229
227
}
230
228
231
229
void 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) {
234
231
const MCOperand &MO = MI->getOperand (OpNum);
235
232
int Imm = (int )MO.getImm ();
236
233
if (Modifier == " sem" ) {
@@ -329,10 +326,9 @@ void NVPTXInstPrinter::printLdStCode(const MCInst *MI, int OpNum,
329
326
}
330
327
331
328
void NVPTXInstPrinter::printMmaCode (const MCInst *MI, int OpNum, raw_ostream &O,
332
- const char *M ) {
329
+ StringRef Modifier ) {
333
330
const MCOperand &MO = MI->getOperand (OpNum);
334
331
int Imm = (int )MO.getImm ();
335
- llvm::StringRef Modifier (M);
336
332
if (Modifier.empty () || Modifier == " version" ) {
337
333
O << Imm; // Just print out PTX version
338
334
return ;
@@ -346,9 +342,8 @@ void NVPTXInstPrinter::printMmaCode(const MCInst *MI, int OpNum, raw_ostream &O,
346
342
}
347
343
348
344
void NVPTXInstPrinter::printMemOperand (const MCInst *MI, int OpNum,
349
- raw_ostream &O, const char *M ) {
345
+ raw_ostream &O, StringRef Modifier ) {
350
346
printOperand (MI, OpNum, O);
351
- llvm::StringRef Modifier (M);
352
347
353
348
if (Modifier == " add" ) {
354
349
O << " , " ;
@@ -363,7 +358,7 @@ void NVPTXInstPrinter::printMemOperand(const MCInst *MI, int OpNum,
363
358
}
364
359
365
360
void NVPTXInstPrinter::printOffseti32imm (const MCInst *MI, int OpNum,
366
- raw_ostream &O, const char *Modifier ) {
361
+ raw_ostream &O) {
367
362
auto &Op = MI->getOperand (OpNum);
368
363
assert (Op.isImm () && " Invalid operand" );
369
364
if (Op.getImm () != 0 ) {
@@ -373,13 +368,13 @@ void NVPTXInstPrinter::printOffseti32imm(const MCInst *MI, int OpNum,
373
368
}
374
369
375
370
void NVPTXInstPrinter::printHexu32imm (const MCInst *MI, int OpNum,
376
- raw_ostream &O, const char *Modifier ) {
371
+ raw_ostream &O) {
377
372
int64_t Imm = MI->getOperand (OpNum).getImm ();
378
373
O << formatHex (Imm) << " U" ;
379
374
}
380
375
381
376
void NVPTXInstPrinter::printProtoIdent (const MCInst *MI, int OpNum,
382
- raw_ostream &O, const char *Modifier ) {
377
+ raw_ostream &O) {
383
378
const MCOperand &Op = MI->getOperand (OpNum);
384
379
assert (Op.isExpr () && " Call prototype is not an MCExpr?" );
385
380
const MCExpr *Expr = Op.getExpr ();
@@ -388,7 +383,7 @@ void NVPTXInstPrinter::printProtoIdent(const MCInst *MI, int OpNum,
388
383
}
389
384
390
385
void NVPTXInstPrinter::printPrmtMode (const MCInst *MI, int OpNum,
391
- raw_ostream &O, const char *Modifier ) {
386
+ raw_ostream &O) {
392
387
const MCOperand &MO = MI->getOperand (OpNum);
393
388
int64_t Imm = MO.getImm ();
394
389
@@ -419,10 +414,9 @@ void NVPTXInstPrinter::printPrmtMode(const MCInst *MI, int OpNum,
419
414
}
420
415
421
416
void NVPTXInstPrinter::printTmaReductionMode (const MCInst *MI, int OpNum,
422
- raw_ostream &O,
423
- const char *Modifier) {
417
+ raw_ostream &O) {
424
418
const MCOperand &MO = MI->getOperand (OpNum);
425
- using RedTy = llvm:: nvvm::TMAReductionOp;
419
+ using RedTy = nvvm::TMAReductionOp;
426
420
427
421
switch (static_cast <RedTy>(MO.getImm ())) {
428
422
case RedTy::ADD:
0 commit comments