[PATCH] D36034: AMDGPU: Remove deadcode from AMDGPUInstPrinter

Tom Stellard via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 28 21:00:05 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL309477: AMDGPU: Remove deadcode from AMDGPUInstPrinter (authored by tstellar).

Changed prior to commit:
  https://reviews.llvm.org/D36034?vs=108739&id=108772#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D36034

Files:
  llvm/trunk/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.cpp
  llvm/trunk/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.h
  llvm/trunk/lib/Target/AMDGPU/R600Instructions.td


Index: llvm/trunk/lib/Target/AMDGPU/R600Instructions.td
===================================================================
--- llvm/trunk/lib/Target/AMDGPU/R600Instructions.td
+++ llvm/trunk/lib/Target/AMDGPU/R600Instructions.td
@@ -38,9 +38,7 @@
 }
 
 // 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";
 }
Index: llvm/trunk/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.h
===================================================================
--- llvm/trunk/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.h
+++ llvm/trunk/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.h
@@ -192,7 +192,6 @@
                        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,
Index: llvm/trunk/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.cpp
===================================================================
--- llvm/trunk/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.cpp
+++ llvm/trunk/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.cpp
@@ -1065,30 +1065,6 @@
   }
 }
 
-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) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36034.108772.patch
Type: text/x-patch
Size: 2351 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170729/21b88795/attachment.bin>


More information about the llvm-commits mailing list