summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2008-12-04 09:05:45 +0000
committerDaniel Dunbar <daniel@zuster.org>2008-12-04 09:05:45 +0000
commit2c4efe68ea698878f4041e7d8a335c01d8db2bbd (patch)
tree60da558975f9717baf3bc3278003e2090b85ef2c /clang/lib
parent8f723670ceda464982fcb8f8d3660e9c91ad75ad (diff)
downloadbcm5719-llvm-2c4efe68ea698878f4041e7d8a335c01d8db2bbd.tar.gz
bcm5719-llvm-2c4efe68ea698878f4041e7d8a335c01d8db2bbd.zip
Mention an optimization opportunity pointed out by Chris.
llvm-svn: 60535
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/README.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/README.txt b/clang/lib/CodeGen/README.txt
index cda17ea97fc..56069dd99d2 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.
+
+//===---------------------------------------------------------------------===//
+
OpenPOWER on IntegriCloud