1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

Add a workaround for PR962, disabling the more aggressive form of this

transformation.  This speeds up a C++ app 2.25x.

llvm-svn: 31113
This commit is contained in:
Chris Lattner 2006-10-22 18:42:26 +00:00
parent 65b4f5b2dd
commit 51e762d4cb

View File

@ -141,6 +141,14 @@ bool TailCallElim::runOnFunction(Function &F) {
CheckForEscapingAllocas(BB, CannotTCETailMarkedCall);
}
/// FIXME: The code generator produces really bad code when an 'escaping
/// alloca' is changed from being a static alloca to being a dynamic alloca.
/// Until this is resolved, disable this transformation if that would ever
/// happen. This bug is PR962.
if (FunctionContainsEscapingAllocas)
return false;
// Second pass, change any tail calls to loops.
for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB)
if (ReturnInst *Ret = dyn_cast<ReturnInst>(BB->getTerminator()))