Skip to content
Snippets Groups Projects
Commit 250eff20 authored by Chris Lattner's avatar Chris Lattner
Browse files

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

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

llvm-svn: 31113
parent aa1c6147
No related branches found
No related tags found
No related merge requests found
......@@ -140,6 +140,14 @@ bool TailCallElim::runOnFunction(Function &F) {
FunctionContainsEscapingAllocas |=
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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment