summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2012-06-25 23:26:10 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2012-06-25 23:26:10 +0000
commit31b54a53793bb61dc584da3a256deadfbc2e6098 (patch)
treef90b583ec7a844c0bfde9cb7842e7824ac9a827d
parent07c43bea93d03d11780f498709e22d60e267d512 (diff)
downloadbcm5719-llvm-31b54a53793bb61dc584da3a256deadfbc2e6098.tar.gz
bcm5719-llvm-31b54a53793bb61dc584da3a256deadfbc2e6098.zip
revert my previous commit (r159173), since as Eli pointed out, it's perfectly ok to mark realloc as noalias
llvm-svn: 159175
-rw-r--r--llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp1
-rw-r--r--llvm/test/Transforms/SimplifyLibCalls/2009-01-04-Annotate.ll2
2 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp b/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
index 1100d6dd77e..99b05389b2b 100644
--- a/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
+++ b/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
@@ -1942,6 +1942,7 @@ void SimplifyLibCalls::inferPrototypeAttributes(Function &F) {
!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 d557484f2a8..73eb05b05e3 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
OpenPOWER on IntegriCloud