expand note.
authorChris Lattner <sabre@nondot.org>
Thu, 3 Dec 2009 07:43:46 +0000 (07:43 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 3 Dec 2009 07:43:46 +0000 (07:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90429 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/README.txt

index 2d513c8cc3a329808b95805d409128cd4da2303d..c788360df63f6a2de56c376b400f5ea078072c8f 100644 (file)
@@ -1734,5 +1734,20 @@ if.end:
 And functionattrs doesn't realize that the p.0 load points to function local
 memory.
 
+Also, functionattrs doesn't know about memcpy/memset.  This function should be
+marked readnone, since it only twiddles local memory, but functionattrs doesn't
+handle memset/memcpy/memmove aggressively:
+
+struct X { int *p; int *q; };
+int foo() {
+ int i = 0, j = 1;
+ struct X x, y;
+ int **p;
+ y.p = &i;
+ x.q = &j;
+ p = __builtin_memcpy (&x, &y, sizeof (int *));
+ return **p;
+}
+
 //===---------------------------------------------------------------------===//