radeon/llvm: Remove AMDGPULowerShaderInstructions class
authorTom Stellard <thomas.stellard@amd.com>
Tue, 8 May 2012 14:04:44 +0000 (10:04 -0400)
committerTom Stellard <thomas.stellard@amd.com>
Tue, 8 May 2012 19:47:46 +0000 (15:47 -0400)
It is no longer used.

src/gallium/drivers/radeon/AMDGPU.h
src/gallium/drivers/radeon/AMDGPULowerShaderInstructions.cpp [deleted file]
src/gallium/drivers/radeon/AMDGPULowerShaderInstructions.h [deleted file]
src/gallium/drivers/radeon/Makefile.sources
src/gallium/drivers/radeon/R600LowerShaderInstructions.cpp
src/gallium/drivers/radeon/SILowerShaderInstructions.cpp

index aa590350dea39e51fe11d18fc876e40723075000..babcf6e8a4c0aed4156258a3955992b1d20fc34f 100644 (file)
@@ -33,7 +33,6 @@ namespace llvm {
     FunctionPass *createSICodeEmitterPass(formatted_raw_ostream &OS);
 
     FunctionPass *createAMDGPULowerInstructionsPass(TargetMachine &tm);
-    FunctionPass *createAMDGPULowerShaderInstructionsPass(TargetMachine &tm);
 
     FunctionPass *createAMDGPUDelimitInstGroupsPass(TargetMachine &tm);
 
diff --git a/src/gallium/drivers/radeon/AMDGPULowerShaderInstructions.cpp b/src/gallium/drivers/radeon/AMDGPULowerShaderInstructions.cpp
deleted file mode 100644 (file)
index d33055c..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-//===-- AMDGPULowerShaderInstructions.cpp - TODO: Add brief description -------===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// TODO: Add full description
-//
-//===----------------------------------------------------------------------===//
-
-
-#include "AMDGPULowerShaderInstructions.h"
-#include "llvm/CodeGen/MachineFunction.h"
-#include "llvm/CodeGen/MachineInstrBuilder.h"
-#include "llvm/CodeGen/MachineRegisterInfo.h"
-#include "llvm/Target/TargetInstrInfo.h"
-
-using namespace llvm;
-
-void AMDGPULowerShaderInstructionsPass::preloadRegister(MachineFunction * MF,
-    const TargetInstrInfo * TII, unsigned physReg, unsigned virtReg) const
-{
-  if (!MRI->isLiveIn(physReg)) {
-    MRI->addLiveIn(physReg, virtReg);
-    MachineBasicBlock &EntryMBB = MF->front();
-    BuildMI(MF->front(), EntryMBB.begin(), DebugLoc(), TII->get(TargetOpcode::COPY),
-            virtReg)
-            .addReg(physReg);
-  } else {
-    /* We can't mark the same register as preloaded twice, but we still must
-     * associate virtReg with the correct preloaded register. */
-    unsigned newReg = MRI->getLiveInVirtReg(physReg);
-    MRI->replaceRegWith(virtReg, newReg);
-  }
-}
diff --git a/src/gallium/drivers/radeon/AMDGPULowerShaderInstructions.h b/src/gallium/drivers/radeon/AMDGPULowerShaderInstructions.h
deleted file mode 100644 (file)
index 5ee77fa..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-//===-- AMDGPULowerShaderInstructions.h - TODO: Add brief description -------===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// TODO: Add full description
-//
-//===----------------------------------------------------------------------===//
-
-
-#ifndef AMDGPU_LOWER_SHADER_INSTRUCTIONS
-#define AMDGPU_LOWER_SHADER_INSTRUCTIONS
-
-namespace llvm {
-
-class MachineFunction;
-class MachineRegisterInfo;
-class TargetInstrInfo;
-
-class AMDGPULowerShaderInstructionsPass {
-
-  protected:
-    MachineRegisterInfo * MRI;
-    /**
-     * @param physReg The physical register that will be preloaded.
-     * @param virtReg The virtual register that currently holds the
-     *                preloaded value.
-     */
-    void preloadRegister(MachineFunction * MF, const TargetInstrInfo * TII,
-                         unsigned physReg, unsigned virtReg) const;
-};
-
-} // end namespace llvm
-
-
-#endif // AMDGPU_LOWER_SHADER_INSTRUCTIONS
index 9149cf3caf5997a9eaa82b604a58d70597c373ff..43aa1e119b3d866abf07564705e7dca716c87778 100644 (file)
@@ -42,7 +42,6 @@ CPP_SOURCES := \
        AMDGPUISelLowering.cpp          \
        AMDGPUConvertToISA.cpp          \
        AMDGPULowerInstructions.cpp             \
-       AMDGPULowerShaderInstructions.cpp       \
        AMDGPUInstrInfo.cpp             \
        AMDGPURegisterInfo.cpp          \
        AMDGPUUtil.cpp                  \
index 808f08c67ef0b2ecade9e435182168ac51fafddc..58b1f0824d70ec26a605affa115d8db854b2cf07 100644 (file)
@@ -12,7 +12,6 @@
 //===----------------------------------------------------------------------===//
 
 #include "AMDGPU.h"
-#include "AMDGPULowerShaderInstructions.h"
 #include "AMDGPUUtil.h"
 #include "AMDIL.h"
 #include "AMDILInstrInfo.h"
 using namespace llvm;
 
 namespace {
-  class R600LowerShaderInstructionsPass : public MachineFunctionPass,
-        public AMDGPULowerShaderInstructionsPass {
+  class R600LowerShaderInstructionsPass : public MachineFunctionPass {
 
   private:
     static char ID;
     TargetMachine &TM;
+    MachineRegisterInfo * MRI;
 
     void lowerEXPORT_REG_FAKE(MachineInstr &MI, MachineBasicBlock &MBB,
         MachineBasicBlock::iterator I);
index 5d49d88dc7c59451dcf7c7057eba1d5e64b1a591..d0a2de99b98780a64c04edb50e39254dfdfda6c7 100644 (file)
@@ -13,7 +13,6 @@
 
 
 #include "AMDGPU.h"
-#include "AMDGPULowerShaderInstructions.h"
 #include "llvm/CodeGen/MachineFunctionPass.h"
 #include "llvm/CodeGen/MachineInstrBuilder.h"
 #include "llvm/CodeGen/MachineRegisterInfo.h"
 using namespace llvm;
 
 namespace {
-  class SILowerShaderInstructionsPass : public MachineFunctionPass,
-      public AMDGPULowerShaderInstructionsPass {
+  class SILowerShaderInstructionsPass : public MachineFunctionPass {
 
   private:
     static char ID;
     TargetMachine &TM;
+    MachineRegisterInfo * MRI;
 
   public:
     SILowerShaderInstructionsPass(TargetMachine &tm) :