[cfe-commits] r60535 - /cfe/trunk/lib/CodeGen/README.txt

Daniel Dunbar daniel at zuster.org
Thu Dec 4 01:05:46 PST 2008


Author: ddunbar
Date: Thu Dec  4 03:05:45 2008
New Revision: 60535

URL: http://llvm.org/viewvc/llvm-project?rev=60535&view=rev
Log:
Mention an optimization opportunity pointed out by Chris.

Modified:
    cfe/trunk/lib/CodeGen/README.txt

Modified: cfe/trunk/lib/CodeGen/README.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/README.txt?rev=60535&r1=60534&r2=60535&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/README.txt (original)
+++ cfe/trunk/lib/CodeGen/README.txt Thu Dec  4 03:05:45 2008
@@ -18,3 +18,15 @@
 
 //===---------------------------------------------------------------------===//
 
+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.
+
+//===---------------------------------------------------------------------===//
+





More information about the cfe-commits mailing list