revert my previous commit (r159173), since as Eli pointed out, it's perfectly ok to mark realloc as noalias

llvm-svn: 159175
This commit is contained in:
Nuno Lopes 2012-06-25 23:26:10 +00:00
parent 07c43bea93
commit 31b54a5379
2 changed files with 2 additions and 1 deletions

View File

@ -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 ||

View File

@ -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