summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/R600LowerShaderInstructions.cpp
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2012-05-08 10:27:30 -0400
committerTom Stellard <[email protected]>2012-05-08 15:47:46 -0400
commit94e797d0faed18dfa80bcce7a6d03ef369b6a820 (patch)
treed63e5a68256f54fe68ab29042b2b3d4cfe35be7b /src/gallium/drivers/radeon/R600LowerShaderInstructions.cpp
parent4226433625f7f1cbfff0503397adf74c6076b7f4 (diff)
radeon/llvm: Use a custom inserter to lower STORE_OUTPUT
Diffstat (limited to 'src/gallium/drivers/radeon/R600LowerShaderInstructions.cpp')
-rw-r--r--src/gallium/drivers/radeon/R600LowerShaderInstructions.cpp27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/gallium/drivers/radeon/R600LowerShaderInstructions.cpp b/src/gallium/drivers/radeon/R600LowerShaderInstructions.cpp
index 58b1f0824d7..f3dd65b47e7 100644
--- a/src/gallium/drivers/radeon/R600LowerShaderInstructions.cpp
+++ b/src/gallium/drivers/radeon/R600LowerShaderInstructions.cpp
@@ -31,8 +31,6 @@ namespace {
void lowerEXPORT_REG_FAKE(MachineInstr &MI, MachineBasicBlock &MBB,
MachineBasicBlock::iterator I);
- bool lowerSTORE_OUTPUT(MachineInstr & MI, MachineBasicBlock &MBB,
- MachineBasicBlock::iterator I);
public:
R600LowerShaderInstructionsPass(TargetMachine &tm) :
@@ -79,10 +77,6 @@ bool R600LowerShaderInstructionsPass::runOnMachineFunction(MachineFunction &MF)
deleteInstr = true;
break;
- case AMDIL::STORE_OUTPUT:
- deleteInstr = lowerSTORE_OUTPUT(MI, MBB, I);
- break;
-
}
++I;
@@ -95,24 +89,3 @@ bool R600LowerShaderInstructionsPass::runOnMachineFunction(MachineFunction &MF)
return false;
}
-
-bool R600LowerShaderInstructionsPass::lowerSTORE_OUTPUT(MachineInstr &MI,
- MachineBasicBlock &MBB, MachineBasicBlock::iterator I)
-{
- MachineOperand &valueOp = MI.getOperand(1);
- MachineOperand &indexOp = MI.getOperand(2);
- unsigned valueReg = valueOp.getReg();
- int64_t outputIndex = indexOp.getImm();
- const TargetRegisterClass * outputClass = TM.getRegisterInfo()->getRegClass(AMDIL::R600_TReg32RegClassID);
- unsigned newRegister = outputClass->getRegister(outputIndex);
-
- BuildMI(MBB, I, MBB.findDebugLoc(I), TM.getInstrInfo()->get(AMDIL::COPY),
- newRegister)
- .addReg(valueReg);
-
- if (!MRI->isLiveOut(newRegister))
- MRI->addLiveOut(newRegister);
-
- return true;
-
-}