diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-04-25 22:13:27 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-04-25 22:13:27 +0000 |
commit | 6c087e5585b227f3c1d8278304c7cfbc7cd4f6e8 (patch) | |
tree | 9e63ac47ddf6aed310f4dbb7a794f1ca9b221f0c /lib/Target/PowerPC/PPCRegisterInfo.cpp | |
parent | 505e5510a258699d1fb267142c247079a4b3d796 (diff) | |
download | llvm-6c087e5585b227f3c1d8278304c7cfbc7cd4f6e8.tar.gz llvm-6c087e5585b227f3c1d8278304c7cfbc7cd4f6e8.tar.bz2 llvm-6c087e5585b227f3c1d8278304c7cfbc7cd4f6e8.tar.xz |
Match MachineFunction::UsedPhysRegs changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36452 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCRegisterInfo.cpp')
-rw-r--r-- | lib/Target/PowerPC/PPCRegisterInfo.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/Target/PowerPC/PPCRegisterInfo.cpp b/lib/Target/PowerPC/PPCRegisterInfo.cpp index dbf2cf48b1..89fa90b7d7 100644 --- a/lib/Target/PowerPC/PPCRegisterInfo.cpp +++ b/lib/Target/PowerPC/PPCRegisterInfo.cpp @@ -739,16 +739,16 @@ static void RemoveVRSaveCode(MachineInstr *MI) { // HandleVRSaveUpdate - MI is the UPDATE_VRSAVE instruction introduced by the // instruction selector. Based on the vector registers that have been used, // transform this into the appropriate ORI instruction. -static void HandleVRSaveUpdate(MachineInstr *MI, const bool *UsedRegs, - const TargetInstrInfo &TII) { +static void HandleVRSaveUpdate(MachineInstr *MI, const TargetInstrInfo &TII) { + MachineFunction *MF = MI->getParent()->getParent(); + unsigned UsedRegMask = 0; for (unsigned i = 0; i != 32; ++i) - if (UsedRegs[VRRegNo[i]]) + if (MF->isPhysRegUsed(VRRegNo[i])) UsedRegMask |= 1 << (31-i); // Live in and live out values already must be in the mask, so don't bother // marking them. - MachineFunction *MF = MI->getParent()->getParent(); for (MachineFunction::livein_iterator I = MF->livein_begin(), E = MF->livein_end(); I != E; ++I) { unsigned RegNo = PPCRegisterInfo::getRegisterNumbering(I->first); @@ -846,8 +846,7 @@ void PPCRegisterInfo::processFunctionBeforeCalleeSavedScan(MachineFunction &MF, PPCFunctionInfo *FI = MF.getInfo<PPCFunctionInfo>(); unsigned LR = getRARegister(); FI->setUsesLR(MF.isPhysRegUsed(LR)); - MF.changePhyRegUsed(LR, false); - + MF.setPhysRegUnused(LR); // Save R31 if necessary int FPSI = FI->getFramePointerSaveIndex(); @@ -883,7 +882,7 @@ void PPCRegisterInfo::emitPrologue(MachineFunction &MF) const { // process it. for (unsigned i = 0; MBBI != MBB.end(); ++i, ++MBBI) { if (MBBI->getOpcode() == PPC::UPDATE_VRSAVE) { - HandleVRSaveUpdate(MBBI, MF.getUsedPhysregs(), TII); + HandleVRSaveUpdate(MBBI, TII); break; } } |