Fix PR14364.
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>
Sun, 24 Feb 2013 17:34:50 +0000 (17:34 +0000)
committerBill Schmidt <wschmidt@linux.vnet.ibm.com>
Sun, 24 Feb 2013 17:34:50 +0000 (17:34 +0000)
commitc68c6df88485b7521133103c848393b8a13842af
tree3f3bf14143bb7969f42a929b0873f5a6fd46c04f
parent596b40871a22973873da21fecb1f45e32ebbfcdc
Fix PR14364.

This removes a const_cast hack from PPCRegisterInfo::hasReservedSpillSlot().
The proper place to save the frame index for the CR spill slot is in the
PPCFunctionInfo object, not the PPCRegisterInfo object.

No new test cases, as this just reimplements existing function.  Existing
tests such as test/CodeGen/PowerPC/crsave.ll are sufficient.

llvm-svn: 175998
llvm/lib/Target/PowerPC/PPCFrameLowering.cpp
llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h
llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp
llvm/lib/Target/PowerPC/PPCRegisterInfo.h