commit | 31b54a53793bb61dc584da3a256deadfbc2e6098 | [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 | f90b583ec7a844c0bfde9cb7842e7824ac9a827d | |
parent | 07c43bea93d03d11780f498709e22d60e267d512 [diff] |
revert my previous commit (r159173), since as Eli pointed out, it's perfectly ok to mark realloc as noalias llvm-svn: 159175
diff --git a/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp b/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp index 1100d6d..99b0538 100644 --- a/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp +++ b/llvm/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/llvm/test/Transforms/SimplifyLibCalls/2009-01-04-Annotate.ll b/llvm/test/Transforms/SimplifyLibCalls/2009-01-04-Annotate.ll index d557484..73eb05b 100644 --- a/llvm/test/Transforms/SimplifyLibCalls/2009-01-04-Annotate.ll +++ b/llvm/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