[PATCH] D67286: [Attributor] Implement "noalias" callsite argument deduction

Hideto Ueno via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 6 11:11:52 PDT 2019


uenoku added inline comments.


================
Comment at: llvm/test/Transforms/FunctionAttrs/noalias_returned.ll:235
+  ret void
+}
----------------
jdoerfert wrote:
> We need to make sure this test works as well:
> 
> ```
> define void @test12_3(){
>   %A = tail call noalias i8* @malloc(i64 4)
>   tail call void @two_args(i8* %A, i8* %A)
>   ret void
> }
> ```
If @two_args is:
```
declare void @two_args(i8* nocapture , i8* nocapture)
```
then
```
define void @test12_3(){
  %A = tail call noalias i8* @malloc(i64 4)
  tail call void @two_args(i8* noalias nocapture %A, i8* noalias nocapture%A)
  ret void
}
```
(If either argument is not marked as `nocapture`, there is no problem.)
It is not good ... I'll fix. We need to compare the call site argument and ensure that there is no copy.




CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67286/new/

https://reviews.llvm.org/D67286





More information about the llvm-commits mailing list