aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-10-22 18:42:26 +0000
committerChris Lattner <sabre@nondot.org>2006-10-22 18:42:26 +0000
commit32b1e87f111d79f3f5b0e86c8f138c02bef8aa18 (patch)
treee08350e05a0aeade19fac015442b859e3805b1ec /lib
parent2cb46e18cbba575a5ef9ff951c482a69714dcd7c (diff)
downloadexternal_llvm-32b1e87f111d79f3f5b0e86c8f138c02bef8aa18.zip
external_llvm-32b1e87f111d79f3f5b0e86c8f138c02bef8aa18.tar.gz
external_llvm-32b1e87f111d79f3f5b0e86c8f138c02bef8aa18.tar.bz2
Add a workaround for PR962, disabling the more aggressive form of this
transformation. This speeds up a C++ app 2.25x. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31113 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/Scalar/TailRecursionElimination.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/TailRecursionElimination.cpp b/lib/Transforms/Scalar/TailRecursionElimination.cpp
index 5b46007..14c4d8b 100644
--- a/lib/Transforms/Scalar/TailRecursionElimination.cpp
+++ b/lib/Transforms/Scalar/TailRecursionElimination.cpp
@@ -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)