Mention an optimization opportunity pointed out by Chris.

llvm-svn: 60535
This commit is contained in:
Daniel Dunbar 2008-12-04 09:05:45 +00:00
parent 8f723670ce
commit 2c4efe68ea
1 changed files with 12 additions and 0 deletions

View File

@ -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.
//===---------------------------------------------------------------------===//