diff --git a/clang/lib/CodeGen/README.txt b/clang/lib/CodeGen/README.txt index cda17ea97fc8..56069dd99d29 100644 --- a/clang/lib/CodeGen/README.txt +++ b/clang/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. + +//===---------------------------------------------------------------------===// +