AMDGPU: Remove deadcode from AMDGPUInstPrinter

Reviewers: arsenm

Reviewed By: arsenm

Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, tpr, llvm-commits, t-tye

Differential Revision: https://reviews.llvm.org/D36034

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309477 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Tom Stellard 2017-07-29 03:56:53 +00:00
parent 0e72c5217b
commit 39aff8ce5a
3 changed files with 1 additions and 28 deletions

View File

@ -1065,30 +1065,6 @@ void AMDGPUInstPrinter::printWrite(const MCInst *MI, unsigned OpNo,
}
}
void AMDGPUInstPrinter::printSel(const MCInst *MI, unsigned OpNo,
raw_ostream &O) {
const char * chans = "XYZW";
int sel = MI->getOperand(OpNo).getImm();
int chan = sel & 3;
sel >>= 2;
if (sel >= 512) {
sel -= 512;
int cb = sel >> 12;
sel &= 4095;
O << cb << '[' << sel << ']';
} else if (sel >= 448) {
sel -= 448;
O << sel;
} else if (sel >= 0){
O << sel;
}
if (sel >= 0)
O << '.' << chans[chan];
}
void AMDGPUInstPrinter::printBankSwizzle(const MCInst *MI, unsigned OpNo,
const MCSubtargetInfo &STI,
raw_ostream &O) {

View File

@ -192,7 +192,6 @@ private:
const MCSubtargetInfo &STI, raw_ostream &O);
void printWrite(const MCInst *MI, unsigned OpNo, const MCSubtargetInfo &STI,
raw_ostream &O);
void printSel(const MCInst *MI, unsigned OpNo, raw_ostream &O);
void printBankSwizzle(const MCInst *MI, unsigned OpNo,
const MCSubtargetInfo &STI, raw_ostream &O);
void printRSel(const MCInst *MI, unsigned OpNo, const MCSubtargetInfo &STI,

View File

@ -38,9 +38,7 @@ class InstFlag<string PM = "printOperand", int Default = 0>
}
// src_sel for ALU src operands, see also ALU_CONST, ALU_PARAM registers
def SEL : OperandWithDefaultOps <i32, (ops (i32 -1))> {
let PrintMethod = "printSel";
}
def SEL : OperandWithDefaultOps <i32, (ops (i32 -1))>;
def BANK_SWIZZLE : OperandWithDefaultOps <i32, (ops (i32 0))> {
let PrintMethod = "printBankSwizzle";
}