[Mesa-dev] [PATCH 05/12] radeon/llvm: fix live-in handling for inputs
Vadim Girlin
vadimgirlin at gmail.com
Mon May 7 10:08:47 PDT 2012
Set the input registers as live-in for entry basic block.
Signed-off-by: Vadim Girlin <vadimgirlin at gmail.com>
---
src/gallium/drivers/radeon/AMDGPULowerShaderInstructions.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/gallium/drivers/radeon/AMDGPULowerShaderInstructions.cpp b/src/gallium/drivers/radeon/AMDGPULowerShaderInstructions.cpp
index d33055c..89e18f0 100644
--- a/src/gallium/drivers/radeon/AMDGPULowerShaderInstructions.cpp
+++ b/src/gallium/drivers/radeon/AMDGPULowerShaderInstructions.cpp
@@ -26,6 +26,9 @@ void AMDGPULowerShaderInstructionsPass::preloadRegister(MachineFunction * MF,
if (!MRI->isLiveIn(physReg)) {
MRI->addLiveIn(physReg, virtReg);
MachineBasicBlock &EntryMBB = MF->front();
+
+ // XXX use EmitLiveInCopies instead?
+ EntryMBB.addLiveIn(physReg);
BuildMI(MF->front(), EntryMBB.begin(), DebugLoc(), TII->get(TargetOpcode::COPY),
virtReg)
.addReg(physReg);
--
1.7.10.1
More information about the mesa-dev
mailing list