[llvm-commits] [llvm] r47777 - /llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp

Devang Patel dpatel at apple.com
Fri Feb 29 15:41:13 PST 2008

Author: dpatel
Date: Fri Feb 29 17:41:13 2008
New Revision: 47777

URL: http://llvm.org/viewvc/llvm-project?rev=47777&view=rev
Fix cut-n-pasto.


Modified: llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp?rev=47777&r1=47776&r2=47777&view=diff

--- llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp Fri Feb 29 17:41:13 2008
@@ -7,25 +7,7 @@
-// This pass promotes "by reference" arguments to be "by value" arguments.  In
-// practice, this means looking for internal functions that have pointer
-// arguments.  If it can prove, through the use of alias analysis, that an
-// argument is *only* loaded, then it can pass the value into the function
-// instead of the address of the value.  This can cause recursive simplification
-// of code and lead to the elimination of allocas (especially in C++ template
-// code like the STL).
-// This pass also handles aggregate arguments that are passed into a function,
-// scalarizing them if the elements of the aggregate are only loaded.  Note that
-// it refuses to scalarize aggregates which would require passing in more than
-// three operands to the function, because passing thousands of operands for a
-// large array or structure is unprofitable!
-// Note that this transformation could also be done for arguments that are only
-// stored to (returning the value instead), but does not currently.  This case
-// would be best handled when and if LLVM begins supporting multiple return
-// values from functions.
+// TODO : Describe this pass.
 #define DEBUG_TYPE "sretpromotion"

More information about the llvm-commits mailing list