summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2012-05-10 15:29:00 -0400
committerTom Stellard <[email protected]>2012-05-10 15:41:32 -0400
commitf8e9c29020289387f0f429ac6d3c28e73e5847a3 (patch)
tree69032fedf9ba719679ff0b2a326a6b7fdf0eb4c4 /src/gallium/drivers
parentfa63f976522bd4faf19249e8c9ac4d3edda498d9 (diff)
radeonsi/llvm: Move lowering of RETURN to ConvertToISA pass
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/radeon/SIInstrInfo.cpp2
-rw-r--r--src/gallium/drivers/radeon/SILowerShaderInstructions.cpp11
2 files changed, 2 insertions, 11 deletions
diff --git a/src/gallium/drivers/radeon/SIInstrInfo.cpp b/src/gallium/drivers/radeon/SIInstrInfo.cpp
index e733aa856e4..0cb97643a7f 100644
--- a/src/gallium/drivers/radeon/SIInstrInfo.cpp
+++ b/src/gallium/drivers/radeon/SIInstrInfo.cpp
@@ -107,6 +107,8 @@ unsigned SIInstrInfo::getISAOpcode(unsigned AMDILopcode) const
{
switch (AMDILopcode) {
case AMDIL::MAD_f32: return AMDIL::V_MAD_LEGACY_F32;
+ //XXX We need a better way of detecting end of program
+ case AMDIL::RETURN: return AMDIL::S_ENDPGM;
default: return AMDGPUInstrInfo::getISAOpcode(AMDILopcode);
}
}
diff --git a/src/gallium/drivers/radeon/SILowerShaderInstructions.cpp b/src/gallium/drivers/radeon/SILowerShaderInstructions.cpp
index c66b8f3f9e1..0c5a831440b 100644
--- a/src/gallium/drivers/radeon/SILowerShaderInstructions.cpp
+++ b/src/gallium/drivers/radeon/SILowerShaderInstructions.cpp
@@ -35,7 +35,6 @@ namespace {
const char *getPassName() const { return "SI Lower Shader Instructions"; }
- void lowerRETURN(MachineBasicBlock &MBB, MachineBasicBlock::iterator I);
void lowerSET_M0(MachineInstr &MI, MachineBasicBlock &MBB,
MachineBasicBlock::iterator I);
};
@@ -57,9 +56,6 @@ bool SILowerShaderInstructionsPass::runOnMachineFunction(MachineFunction &MF)
I != MBB.end(); I = Next, Next = llvm::next(I) ) {
MachineInstr &MI = *I;
switch (MI.getOpcode()) {
- case AMDIL::RETURN:
- lowerRETURN(MBB, I);
- break;
case AMDIL::SET_M0:
lowerSET_M0(MI, MBB, I);
break;
@@ -72,13 +68,6 @@ bool SILowerShaderInstructionsPass::runOnMachineFunction(MachineFunction &MF)
return false;
}
-void SILowerShaderInstructionsPass::lowerRETURN(MachineBasicBlock &MBB,
- MachineBasicBlock::iterator I)
-{
- const struct TargetInstrInfo * TII = TM.getInstrInfo();
- BuildMI(MBB, I, MBB.findDebugLoc(I), TII->get(AMDIL::S_ENDPGM));
-}
-
void SILowerShaderInstructionsPass::lowerSET_M0(MachineInstr &MI,
MachineBasicBlock &MBB, MachineBasicBlock::iterator I)
{