| Index: src/IceTargetLoweringX86Base.h
|
| diff --git a/src/IceTargetLoweringX86Base.h b/src/IceTargetLoweringX86Base.h
|
| index f004d6e89b5dc7e5c198b1b3c60a2408541a9ef8..d23e35b7f3d41bdedd50c4bbbfe7c418569b6a9d 100644
|
| --- a/src/IceTargetLoweringX86Base.h
|
| +++ b/src/IceTargetLoweringX86Base.h
|
| @@ -226,6 +226,13 @@ protected:
|
| void scalarizeArithmetic(InstArithmetic::OpKind K, Variable *Dest,
|
| Operand *Src0, Operand *Src1);
|
|
|
| + /// Emit a fake use of esp to make sure esp stays alive for the entire
|
| + /// function. Otherwise some esp adjustments get dead-code eliminated.
|
| + void keepEspLiveAtExit() {
|
| + Variable *esp = Func->getTarget()->getPhysicalRegister(getStackReg());
|
| + Context.insert(InstFakeUse::create(Func, esp));
|
| + }
|
| +
|
| /// Operand legalization helpers. To deal with address mode constraints, the
|
| /// helpers will create a new Operand and emit instructions that guarantee
|
| /// that the Operand kind is one of those indicated by the LegalMask (a
|
|
|