| Index: src/IceTargetLoweringX8664.cpp
|
| diff --git a/src/IceTargetLoweringX8664.cpp b/src/IceTargetLoweringX8664.cpp
|
| index bdebfbe1d86833736de7a8a4057d57a76eaccf21..4987646c665e6a7c9888c4891acd509108847db0 100644
|
| --- a/src/IceTargetLoweringX8664.cpp
|
| +++ b/src/IceTargetLoweringX8664.cpp
|
| @@ -386,11 +386,7 @@ void TargetX8664::lowerRet(const InstRet *Inst) {
|
| _ret(Reg);
|
| // Add a fake use of esp to make sure esp stays alive for the entire
|
| // function. Otherwise post-call esp adjustments get dead-code eliminated.
|
| - // TODO: Are there more places where the fake use should be inserted? E.g.
|
| - // "void f(int n){while(1) g(n);}" may not have a ret instruction.
|
| - Variable *esp =
|
| - Func->getTarget()->getPhysicalRegister(Traits::RegisterSet::Reg_esp);
|
| - Context.insert(InstFakeUse::create(Func, esp));
|
| + keepEspLiveAtExit();
|
| }
|
|
|
| void TargetX8664::addProlog(CfgNode *Node) {
|
|
|