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

Chandler Carruth chandlerc at gmail.com
Sun Jan 9 02:10:59 PST 2011


Author: chandlerc
Date: Sun Jan  9 04:10:59 2011
New Revision: 123113

URL: http://llvm.org/viewvc/llvm-project?rev=123113&view=rev
Log:
Fix a cut-paste-o so that the sample code is correct for my last note.

Also, switch to a more clear 'sink' function with its declaration to
avoid any confusion about 'g'. Thanks for the suggestion Frits.

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=123113&r1=123112&r2=123113&view=diff
==============================================================================
--- llvm/trunk/lib/Target/README.txt (original)
+++ llvm/trunk/lib/Target/README.txt Sun Jan  9 04:10:59 2011
@@ -2143,7 +2143,8 @@
 
 void f(int N) {
   std::vector<int> v(N);
-  g(v);
+
+  extern void sink(void*); sink(&v);
 }
 
 into
@@ -2198,7 +2199,10 @@
 
 void f(int N) {
   std::vector<int> v(N);
-  g(v);
+  for (int k = 0; k < N; ++k)
+    v[k] = 0;
+
+  extern void sink(void*); sink(&v);
 }
 
 into almost the same as the previous note, but replace its final BB with:





More information about the llvm-commits mailing list