Match MachineFunction::UsedPhysRegs changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36452 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng
2007-04-25 22:13:27 +00:00
parent 505e5510a2
commit 6c087e5585
8 changed files with 38 additions and 66 deletions

View File

@@ -161,12 +161,11 @@ FunctionPass *llvm::createX86FloatingPointStackifierPass() { return new FPS(); }
bool FPS::runOnMachineFunction(MachineFunction &MF) {
// We only need to run this pass if there are any FP registers used in this
// function. If it is all integer, there is nothing for us to do!
const bool *PhysRegsUsed = MF.getUsedPhysregs();
bool FPIsUsed = false;
assert(X86::FP6 == X86::FP0+6 && "Register enums aren't sorted right!");
for (unsigned i = 0; i <= 6; ++i)
if (PhysRegsUsed[X86::FP0+i]) {
if (MF.isPhysRegUsed(X86::FP0+i)) {
FPIsUsed = true;
break;
}