diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-02-20 19:34:45 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-02-20 19:34:45 +0000 |
commit | e6a90167aa29c126ce5d0398faedbbba582df7c3 (patch) | |
tree | c89770236fccf1313e268f64f0cbc2fbcb27f0da | |
parent | dd7b89788c9d8a7484fd9f5c7443d4a2e3f0f826 (diff) |
Add some IRgen improvement notes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65146 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/README.txt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/CodeGen/README.txt b/lib/CodeGen/README.txt index 56069dd99d..ea2cf8cf0e 100644 --- a/lib/CodeGen/README.txt +++ b/lib/CodeGen/README.txt @@ -30,3 +30,20 @@ block. //===---------------------------------------------------------------------===// +We should try and avoid generating basic blocks which only contain +jumps. At -O0, this penalizes us all the way from IRgen (malloc & +instruction overhead), all the way down through code generation and +assembly time. + +On 176.gcc:expr.ll, it looks like over 12% of basic blocks are just +direct branches. + +//===---------------------------------------------------------------------===// + +There are some more places where we could avoid generating unreachable code. For +example: + void f0(int a) { abort(); if (a) printf("hi"); } +still generates a call to printf. This doesn't occur much in real +code, but would still be nice to clean up. + +//===---------------------------------------------------------------------===// |