diff options
author | Daniel Dunbar <daniel@zuster.org> | 2008-12-04 09:05:45 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2008-12-04 09:05:45 +0000 |
commit | 86ccea05f6bab8956f5418cdc4df8e130d4422aa (patch) | |
tree | 501678346917d84779475b4328c0dbccfee1994d /lib/CodeGen/README.txt | |
parent | c48ea6e51dd0da0a3def87f148240718ffaaeb0d (diff) |
Mention an optimization opportunity pointed out by Chris.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60535 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/README.txt')
-rw-r--r-- | lib/CodeGen/README.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/CodeGen/README.txt b/lib/CodeGen/README.txt index cda17ea97f..56069dd99d 100644 --- a/lib/CodeGen/README.txt +++ b/lib/CodeGen/README.txt @@ -18,3 +18,15 @@ directly. //===---------------------------------------------------------------------===// +It may be worth avoiding creation of alloca's for formal arguments +for the common situation where the argument is never written to or has +its address taken. The idea would be to begin generating code by using +the argument directly and if its address is taken or it is stored to +then generate the alloca and patch up the existing code. + +In theory, the same optimization could be a win for block local +variables as long as the declaration dominates all statements in the +block. + +//===---------------------------------------------------------------------===// + |