mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-01 12:24:24 +00:00
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
This commit is contained in:
@ -140,6 +140,14 @@ bool TailCallElim::runOnFunction(Function &F) {
|
|||||||
FunctionContainsEscapingAllocas |=
|
FunctionContainsEscapingAllocas |=
|
||||||
CheckForEscapingAllocas(BB, CannotTCETailMarkedCall);
|
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.
|
// Second pass, change any tail calls to loops.
|
||||||
for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB)
|
for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB)
|
||||||
|
Reference in New Issue
Block a user