diff options
author | Chris Lattner <sabre@nondot.org> | 2008-08-10 00:47:21 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-08-10 00:47:21 +0000 |
commit | c90b866797d95357cb5051574d1402620003cf7d (patch) | |
tree | 8d214bb65d5d013782cf4cf19d871e06021f7a25 /lib/Target | |
parent | afcde473c5baf292038ec494917f18c77a043340 (diff) | |
download | external_llvm-c90b866797d95357cb5051574d1402620003cf7d.zip external_llvm-c90b866797d95357cb5051574d1402620003cf7d.tar.gz external_llvm-c90b866797d95357cb5051574d1402620003cf7d.tar.bz2 |
add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54602 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/README.txt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/Target/README.txt b/lib/Target/README.txt index e913372..fe11900 100644 --- a/lib/Target/README.txt +++ b/lib/Target/README.txt @@ -438,6 +438,19 @@ long long fib(const long long n) { //===---------------------------------------------------------------------===// +Tail recursion elimination should handle: + +int pow2m1(int n) { + if (n == 0) + return 0; + return 2 * pow2m1 (n - 1) + 1; +} + +Also, multiplies can be turned into SHL's, so they should be handled as if +they were associative. "return foo() << 1" can be tail recursion eliminated. + +//===---------------------------------------------------------------------===// + Argument promotion should promote arguments for recursive functions, like this: |