Mesa (master): radeon/llvm: Remove AMDIL MOVE* instructions

Tom Stellard tstellar at kemper.freedesktop.org
Wed Jun 6 13:50:20 UTC 2012


Module: Mesa
Branch: master
Commit: edceed1b9a46c4a92a6113e8b1c5d2433568143d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=edceed1b9a46c4a92a6113e8b1c5d2433568143d

Author: Tom Stellard <thomas.stellard at amd.com>
Date:   Tue Jun  5 20:48:41 2012 -0400

radeon/llvm: Remove AMDIL MOVE* instructions

---

 src/gallium/drivers/radeon/AMDILISelDAGToDAG.cpp |    2 +-
 src/gallium/drivers/radeon/AMDILISelLowering.cpp |    2 --
 src/gallium/drivers/radeon/AMDILInstrInfo.cpp    |   15 ---------------
 src/gallium/drivers/radeon/AMDILInstrInfo.h      |    2 +-
 src/gallium/drivers/radeon/AMDILInstructions.td  |    1 -
 5 files changed, 2 insertions(+), 20 deletions(-)

diff --git a/src/gallium/drivers/radeon/AMDILISelDAGToDAG.cpp b/src/gallium/drivers/radeon/AMDILISelDAGToDAG.cpp
index d7b08b0..4e70a54 100644
--- a/src/gallium/drivers/radeon/AMDILISelDAGToDAG.cpp
+++ b/src/gallium/drivers/radeon/AMDILISelDAGToDAG.cpp
@@ -163,7 +163,7 @@ SDNode *AMDILDAGToDAGISel::Select(SDNode *N) {
       if (FrameIndexSDNode *FIN = dyn_cast<FrameIndexSDNode>(N)) {
         unsigned int FI = FIN->getIndex();
         EVT OpVT = N->getValueType(0);
-        unsigned int NewOpc = AMDIL::MOVE_i32;
+        unsigned int NewOpc = AMDIL::COPY;
         SDValue TFI = CurDAG->getTargetFrameIndex(FI, MVT::i32);
         return CurDAG->SelectNodeTo(N, NewOpc, OpVT, TFI);
       }
diff --git a/src/gallium/drivers/radeon/AMDILISelLowering.cpp b/src/gallium/drivers/radeon/AMDILISelLowering.cpp
index 1c5c9ba..a0be1f4 100644
--- a/src/gallium/drivers/radeon/AMDILISelLowering.cpp
+++ b/src/gallium/drivers/radeon/AMDILISelLowering.cpp
@@ -59,8 +59,6 @@ getConversionNode(SelectionDAG &DAG, SDValue& Src, SDValue& Dst, bool asType)
   } else if (svt.isInteger() && dvt.isInteger()) {
     if (!svt.bitsEq(dvt)) {
       Src = DAG.getSExtOrTrunc(Src, DL, dvt);
-    } else {
-      Src = DAG.getNode(AMDILISD::MOVE, DL, dvt, Src);
     }
   } else if (svt.isInteger()) {
     unsigned opcode = (asType) ? ISDBITCAST : ISD::SINT_TO_FP;
diff --git a/src/gallium/drivers/radeon/AMDILInstrInfo.cpp b/src/gallium/drivers/radeon/AMDILInstrInfo.cpp
index 5143f3f..11a6516 100644
--- a/src/gallium/drivers/radeon/AMDILInstrInfo.cpp
+++ b/src/gallium/drivers/radeon/AMDILInstrInfo.cpp
@@ -244,21 +244,6 @@ MachineBasicBlock::iterator skipFlowControl(MachineBasicBlock *MBB) {
 }
 
 void
-AMDILInstrInfo::copyPhysReg(MachineBasicBlock &MBB,
-                            MachineBasicBlock::iterator MI, DebugLoc DL,
-                            unsigned DestReg, unsigned SrcReg,
-                            bool KillSrc) const
-{
-  BuildMI(MBB, MI, DL, get(AMDIL::MOVE_v4i32), DestReg)
-    .addReg(SrcReg, getKillRegState(KillSrc));
-  return;
-#if 0
-  DEBUG(dbgs() << "Cannot copy " << RI.getName(SrcReg)
-               << " to " << RI.getName(DestReg) << '\n');
-  abort();
-#endif
-}
-void
 AMDILInstrInfo::storeRegToStackSlot(MachineBasicBlock &MBB,
                                     MachineBasicBlock::iterator MI,
                                     unsigned SrcReg, bool isKill,
diff --git a/src/gallium/drivers/radeon/AMDILInstrInfo.h b/src/gallium/drivers/radeon/AMDILInstrInfo.h
index 7ea8834..bff729b 100644
--- a/src/gallium/drivers/radeon/AMDILInstrInfo.h
+++ b/src/gallium/drivers/radeon/AMDILInstrInfo.h
@@ -77,7 +77,7 @@ public:
   virtual void copyPhysReg(MachineBasicBlock &MBB,
                            MachineBasicBlock::iterator MI, DebugLoc DL,
                            unsigned DestReg, unsigned SrcReg,
-                           bool KillSrc) const;
+                           bool KillSrc) const = 0;
 
   void storeRegToStackSlot(MachineBasicBlock &MBB,
                            MachineBasicBlock::iterator MI,
diff --git a/src/gallium/drivers/radeon/AMDILInstructions.td b/src/gallium/drivers/radeon/AMDILInstructions.td
index afddefe..ec3f8cb 100644
--- a/src/gallium/drivers/radeon/AMDILInstructions.td
+++ b/src/gallium/drivers/radeon/AMDILInstructions.td
@@ -10,7 +10,6 @@
 // Operations in this file are generic to all data types
 // This opcode has custom swizzle pattern encoded in Swizzle Encoder
 let isReMaterializable = 1, isAsCheapAsAMove = 1 in {
-  defm MOVE       : UnaryOpMC<IL_OP_MOV, IL_mov>;
   defm PHIMOVE    : UnaryOpMC<IL_OP_MOV, IL_phimov>;
 }
 defm CMOV       : BinaryOpMC<IL_OP_CMOV, IL_cmov>;




More information about the mesa-commit mailing list