On Mon, May 07, 2012 at 09:08:47PM +0400, Vadim Girlin wrote: > Set the input registers as live-in for entry basic block. > > Signed-off-by: Vadim Girlin <vadimgir...@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?
EmitLiveInCopies() isn't meant to be used by the backends, it is only supposed to be called by the LLVM Instruction Selection passes. > + EntryMBB.addLiveIn(physReg); The preloadRegister() function is duplicated in AMDGPUUtil.cpp as utilAddLiveIn(). I think this change should go in that function and then all callers of preloadRegister() should use utilAddLiveIn() instead. > BuildMI(MF->front(), EntryMBB.begin(), DebugLoc(), > TII->get(TargetOpcode::COPY), > virtReg) > .addReg(physReg); -Tom > -- > 1.7.10.1 > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev > _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev