summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/R600ISelLowering.cpp
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2012-05-08 11:33:05 -0400
committerTom Stellard <[email protected]>2012-05-08 15:47:46 -0400
commit8a4c25dd7e9002ab7a2821753bcae1ff6af2ca1c (patch)
treeae8937d37db47fd29e2ace1d1bc4e45b4585ca65 /src/gallium/drivers/radeon/R600ISelLowering.cpp
parent94e797d0faed18dfa80bcce7a6d03ef369b6a820 (diff)
radeon/llvm: Use a custom inserter to lower RESERVE_REG
Diffstat (limited to 'src/gallium/drivers/radeon/R600ISelLowering.cpp')
-rw-r--r--src/gallium/drivers/radeon/R600ISelLowering.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/R600ISelLowering.cpp b/src/gallium/drivers/radeon/R600ISelLowering.cpp
index 9870b7ba820..7e1c17dfcaf 100644
--- a/src/gallium/drivers/radeon/R600ISelLowering.cpp
+++ b/src/gallium/drivers/radeon/R600ISelLowering.cpp
@@ -13,6 +13,7 @@
#include "R600ISelLowering.h"
#include "R600InstrInfo.h"
+#include "R600MachineFunctionInfo.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
using namespace llvm;
@@ -112,7 +113,19 @@ MachineBasicBlock * R600TargetLowering::EmitInstrWithCustomInserter(
MI->eraseFromParent();
break;
}
+
+ case AMDIL::RESERVE_REG:
+ {
+ R600MachineFunctionInfo * MFI = MF->getInfo<R600MachineFunctionInfo>();
+ int64_t ReservedIndex = MI->getOperand(0).getImm();
+ unsigned ReservedReg =
+ AMDIL::R600_TReg32RegClass.getRegister(ReservedIndex);
+ MFI->ReservedRegs.push_back(ReservedReg);
+ MI->eraseFromParent();
+ break;
+ }
}
+
return BB;
}