From d6c2d3722d795381d3cdf11fe00f63780ad0725a Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Thu, 31 May 2012 20:35:18 -0400 Subject: radeon/llvm: Eliminate CFGStructurizer dependency on AMDIL instructions Add some hooks to the R600,SI InstrInfo and RegisterInfo classes, so that the CFGStructurizer pass can run without any relying on AMDIL instructions. --- src/gallium/drivers/radeon/R600InstrInfo.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/gallium/drivers/radeon/R600InstrInfo.cpp') diff --git a/src/gallium/drivers/radeon/R600InstrInfo.cpp b/src/gallium/drivers/radeon/R600InstrInfo.cpp index 99153574675..05c291f1b89 100644 --- a/src/gallium/drivers/radeon/R600InstrInfo.cpp +++ b/src/gallium/drivers/radeon/R600InstrInfo.cpp @@ -100,3 +100,19 @@ unsigned R600InstrInfo::getLSHRop() const return AMDIL::LSHR_eg; } } + +MachineInstr * R600InstrInfo::getMovImmInstr(MachineFunction *MF, + unsigned DstReg, int64_t Imm) const +{ + MachineInstr * MI = MF->CreateMachineInstr(get(AMDIL::MOV), DebugLoc()); + MachineInstrBuilder(MI).addReg(DstReg, RegState::Define); + MachineInstrBuilder(MI).addReg(AMDIL::ALU_LITERAL_X); + MachineInstrBuilder(MI).addImm(Imm); + + return MI; +} + +unsigned R600InstrInfo::getIEQOpcode() const +{ + return AMDIL::SETE_INT; +} -- cgit v1.2.3