[llvm-commits] [llvm] r94937 - in /llvm/trunk: lib/Transforms/Scalar/TailRecursionElimination.cpp test/Transforms/TailCallElim/no-return-calls.ll

Evan Cheng evan.cheng at apple.com
Sun Jan 31 16:59:02 PST 2010


That's handled by tail call recursion elimination. It's a different issue.

Evan

On Jan 31, 2010, at 11:46 AM, Sebastian Redl wrote:

> Evan Cheng wrote:
>> No. But it doesn't make sense to tail call no return calls as far as I can tell.
>> 
> I don't know how realistic this is, but I might have a function that
> looks like this:
> 
> void recurse_and_jump(int n) {
>  if (n > 0) {
>    // do something interesting
>    recurse_and_jump(n-1);
>  } else
>    exit(0); // or any other noreturn thing
> }
> 
> This function is technically noreturn and would benefit from a tail call
> opt.
> 
> Sebastian





More information about the llvm-commits mailing list