summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/AMDGPUInstrInfo.cpp
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2012-08-23 19:27:48 +0000
committerTom Stellard <[email protected]>2012-08-23 21:54:32 +0000
commit5a1edb8655aeab17bf0d90e202fb31a1adb53498 (patch)
tree36ae701132e8da585b1fc8dc7c1ccfb6bcb47680 /src/gallium/drivers/radeon/AMDGPUInstrInfo.cpp
parentcb5227b403a9c78a734e5e67657da6c485881cbb (diff)
radeon/llvm: Simplify the convert to ISA pass
Diffstat (limited to 'src/gallium/drivers/radeon/AMDGPUInstrInfo.cpp')
-rw-r--r--src/gallium/drivers/radeon/AMDGPUInstrInfo.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/gallium/drivers/radeon/AMDGPUInstrInfo.cpp b/src/gallium/drivers/radeon/AMDGPUInstrInfo.cpp
index 03a647e4387..9aae09a4a15 100644
--- a/src/gallium/drivers/radeon/AMDGPUInstrInfo.cpp
+++ b/src/gallium/drivers/radeon/AMDGPUInstrInfo.cpp
@@ -27,7 +27,7 @@
using namespace llvm;
AMDGPUInstrInfo::AMDGPUInstrInfo(TargetMachine &tm)
- : AMDGPUGenInstrInfo(), RI(tm, *this), TM(tm) { }
+ : AMDGPUGenInstrInfo(0,0), RI(tm, *this), TM(tm) { }
const AMDGPURegisterInfo &AMDGPUInstrInfo::getRegisterInfo() const {
return RI;
@@ -234,17 +234,13 @@ AMDGPUInstrInfo::isSafeToMoveRegClassDefs(const TargetRegisterClass *RC) const {
// TODO: Implement this function
return true;
}
-
-MachineInstr * AMDGPUInstrInfo::convertToISA(MachineInstr & MI, MachineFunction &MF,
+
+void AMDGPUInstrInfo::convertToISA(MachineInstr & MI, MachineFunction &MF,
DebugLoc DL) const
{
- MachineInstrBuilder newInstr;
MachineRegisterInfo &MRI = MF.getRegInfo();
const AMDGPURegisterInfo & RI = getRegisterInfo();
- // Create the new instruction
- newInstr = BuildMI(MF, DL, TM.getInstrInfo()->get(MI.getOpcode()));
-
for (unsigned i = 0; i < MI.getNumOperands(); i++) {
MachineOperand &MO = MI.getOperand(i);
// Convert dst regclass to one that is supported by the ISA
@@ -258,9 +254,5 @@ MachineInstr * AMDGPUInstrInfo::convertToISA(MachineInstr & MI, MachineFunction
MRI.setRegClass(MO.getReg(), newRegClass);
}
}
- // Add the operand to the new instruction
- newInstr.addOperand(MO);
}
-
- return newInstr;
}