diff options
| author | Nick Lewycky <nicholas@mxc.ca> | 2009-11-07 21:10:15 +0000 |
|---|---|---|
| committer | Nick Lewycky <nicholas@mxc.ca> | 2009-11-07 21:10:15 +0000 |
| commit | f80fcd00b3590626a6110fe5fbe9b5fd2a8be1ae (patch) | |
| tree | 9090f3aa1b8170993671f2479436182b6ee9fc09 /lib/Target | |
| parent | bf992817f28bdab09fe1d1349561efb0c89fb0dd (diff) | |
| download | external_llvm-f80fcd00b3590626a6110fe5fbe9b5fd2a8be1ae.zip external_llvm-f80fcd00b3590626a6110fe5fbe9b5fd2a8be1ae.tar.gz external_llvm-f80fcd00b3590626a6110fe5fbe9b5fd2a8be1ae.tar.bz2 | |
Improve tail call elimination to handle the switch statement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86403 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
| -rw-r--r-- | lib/Target/README.txt | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/lib/Target/README.txt b/lib/Target/README.txt index 7018b61..dce29b8 100644 --- a/lib/Target/README.txt +++ b/lib/Target/README.txt @@ -406,22 +406,6 @@ return: ; preds = %then.1, %else.0, %then.0 //===---------------------------------------------------------------------===// -Tail recursion elimination is not transforming this function, because it is -returning n, which fails the isDynamicConstant check in the accumulator -recursion checks. - -long long fib(const long long n) { - switch(n) { - case 0: - case 1: - return n; - default: - return fib(n-1) + fib(n-2); - } -} - -//===---------------------------------------------------------------------===// - Tail recursion elimination should handle: int pow2m1(int n) { |
