diff options
Diffstat (limited to 'lib/CodeGen/LiveVariables.cpp')
-rw-r--r-- | lib/CodeGen/LiveVariables.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/CodeGen/LiveVariables.cpp b/lib/CodeGen/LiveVariables.cpp index 420cb4443e..0554bae87b 100644 --- a/lib/CodeGen/LiveVariables.cpp +++ b/lib/CodeGen/LiveVariables.cpp @@ -187,10 +187,9 @@ bool LiveVariables::runOnMachineFunction(MachineFunction &MF) { // physical register. This is a purely local property, because all physical // register references as presumed dead across basic blocks. // - MachineInstr *PhysRegInfoA[MRegisterInfo::FirstVirtualRegister]; - bool PhysRegUsedA[MRegisterInfo::FirstVirtualRegister]; - std::fill(PhysRegInfoA, PhysRegInfoA+MRegisterInfo::FirstVirtualRegister, - (MachineInstr*)0); + MachineInstr *PhysRegInfoA[RegInfo->getNumRegs()]; + bool PhysRegUsedA[RegInfo->getNumRegs()]; + std::fill(PhysRegInfoA, PhysRegInfoA+RegInfo->getNumRegs(), (MachineInstr*)0); PhysRegInfo = PhysRegInfoA; PhysRegUsed = PhysRegUsedA; |