[llvm-commits] [llvm] r159175 - in /llvm/trunk: lib/Transforms/Scalar/SimplifyLibCalls.cpp test/Transforms/SimplifyLibCalls/2009-01-04-Annotate.ll

Duncan Sands baldrick at free.fr
Tue Jun 26 00:35:10 PDT 2012


Hi Nuno,

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

how about adding a comment explaining why noalias is OK.

Ciao, Duncan.

>
> Modified:
>      llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp
>      llvm/trunk/test/Transforms/SimplifyLibCalls/2009-01-04-Annotate.ll
>
> Modified: llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp?rev=159175&r1=159174&r2=159175&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp (original)
> +++ llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp Mon Jun 25 18:26:10 2012
> @@ -1942,6 +1942,7 @@
>             !FTy->getReturnType()->isPointerTy())
>           return;
>         setDoesNotThrow(F);
> +      setDoesNotAlias(F, 0);
>         setDoesNotCapture(F, 1);
>       } else if (Name == "read") {
>         if (FTy->getNumParams() != 3 ||
>
> Modified: llvm/trunk/test/Transforms/SimplifyLibCalls/2009-01-04-Annotate.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SimplifyLibCalls/2009-01-04-Annotate.ll?rev=159175&r1=159174&r2=159175&view=diff
> ==============================================================================
> --- llvm/trunk/test/Transforms/SimplifyLibCalls/2009-01-04-Annotate.ll (original)
> +++ llvm/trunk/test/Transforms/SimplifyLibCalls/2009-01-04-Annotate.ll Mon Jun 25 18:26:10 2012
> @@ -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
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>





More information about the llvm-commits mailing list