| Index: src/IceTargetLoweringMIPS32.cpp
|
| diff --git a/src/IceTargetLoweringMIPS32.cpp b/src/IceTargetLoweringMIPS32.cpp
|
| index b634306a989f700c2b71ac9ca7e1dcf041bd1a03..22c37435e0d2a45cce4bc4509df8c6342c0205a0 100644
|
| --- a/src/IceTargetLoweringMIPS32.cpp
|
| +++ b/src/IceTargetLoweringMIPS32.cpp
|
| @@ -243,12 +243,12 @@ Variable *TargetMIPS32::getPhysicalRegister(SizeT RegNum, Type Ty) {
|
| Reg = Func->makeVariable(Ty);
|
| Reg->setRegNum(RegNum);
|
| PhysicalRegisters[Ty][RegNum] = Reg;
|
| - // Specially mark SP as an "argument" so that it is considered live upon
|
| - // function entry.
|
| - if (RegNum == RegMIPS32::Reg_SP || RegNum == RegMIPS32::Reg_RA) {
|
| - Func->addImplicitArg(Reg);
|
| - Reg->setIgnoreLiveness();
|
| - }
|
| + // Specially mark a named physical register as an "argument" so that it is
|
| + // considered live upon function entry. Otherwise it's possible to get
|
| + // liveness validation errors for saving callee-save registers.
|
| + Func->addImplicitArg(Reg);
|
| + // Don't bother tracking the live range of a named physical register.
|
| + Reg->setIgnoreLiveness();
|
| }
|
| return Reg;
|
| }
|
|
|