commit | fd99cabdc6de1eadda0e9a45d0acc8aa7c2f8f67 | [log] [tgz] |
---|---|---|
author | Nuno Lopes <nunoplopes@sapo.pt> | Mon Jun 25 23:26:10 2012 +0000 |
committer | Nuno Lopes <nunoplopes@sapo.pt> | Mon Jun 25 23:26:10 2012 +0000 |
tree | 221405a8540bdab11f48fb7e10c50a7ecfa46dc5 | |
parent | a88d0edb495212d08357550a5bcbde9e924a9969 [diff] |
revert my previous commit (r159173), since as Eli pointed out, it's perfectly ok to mark realloc as noalias git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159175 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/Scalar/SimplifyLibCalls.cpp b/lib/Transforms/Scalar/SimplifyLibCalls.cpp index 1100d6d..99b0538 100644 --- a/lib/Transforms/Scalar/SimplifyLibCalls.cpp +++ b/lib/Transforms/Scalar/SimplifyLibCalls.cpp
@@ -1942,6 +1942,7 @@ !FTy->getReturnType()->isPointerTy()) return; setDoesNotThrow(F); + setDoesNotAlias(F, 0); setDoesNotCapture(F, 1); } else if (Name == "read") { if (FTy->getNumParams() != 3 ||
diff --git a/test/Transforms/SimplifyLibCalls/2009-01-04-Annotate.ll b/test/Transforms/SimplifyLibCalls/2009-01-04-Annotate.ll index d557484..73eb05b 100644 --- a/test/Transforms/SimplifyLibCalls/2009-01-04-Annotate.ll +++ b/test/Transforms/SimplifyLibCalls/2009-01-04-Annotate.ll
@@ -1,5 +1,5 @@ ; RUN: opt < %s -simplify-libcalls -S > %t -; RUN: grep noalias %t | count 1 +; RUN: grep noalias %t | count 2 ; RUN: grep nocapture %t | count 3 ; RUN: grep nounwind %t | count 3 ; RUN: grep readonly %t | count 1