[llvm-commits] [llvm] r45854 - /llvm/trunk/lib/Target/README.txt

Chris Lattner sabre at nondot.org
Thu Jan 10 22:17:48 PST 2008


Author: lattner
Date: Fri Jan 11 00:17:47 2008
New Revision: 45854

URL: http://llvm.org/viewvc/llvm-project?rev=45854&view=rev
Log:
add some notes.

Modified:
    llvm/trunk/lib/Target/README.txt

Modified: llvm/trunk/lib/Target/README.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/README.txt?rev=45854&r1=45853&r2=45854&view=diff

==============================================================================
--- llvm/trunk/lib/Target/README.txt (original)
+++ llvm/trunk/lib/Target/README.txt Fri Jan 11 00:17:47 2008
@@ -595,3 +595,21 @@
 once.
 
 //===---------------------------------------------------------------------===//
+
+We should extend parameter attributes to capture more information about
+pointer parameters for alias analysis.  Some ideas:
+
+1. Add a "nocapture" attribute, which indicates that the callee does not store
+   the address of the parameter into a global or any other memory location
+   visible to the callee.  This can be used to make basicaa and other analyses
+   more powerful.  It is true for things like memcpy, strcat, and many other
+   things, including structs passed by value, most C++ references, etc.
+2. Generalize readonly to be set on parameters.  This is important mod/ref 
+   info for the function, which is important for basicaa and others.  It can
+   also be used by the inliner to avoid inserting a memcpy for byval 
+   arguments when the function is inlined.
+
+These functions can be inferred by various analysis passes such as the 
+globalsmodrefaa pass.
+
+//===---------------------------------------------------------------------===//





More information about the llvm-commits mailing list