[PATCH] D66207: [Attributor] Deduce "noalias" attribute
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 28 09:34:54 PDT 2019
jdoerfert added a comment.
I think except the small nits below this is fine. We can get this in and work from there
================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:1533
+ // because `noalias` may not be valid in the current position.
+ }
+
----------------
uenoku wrote:
> jdoerfert wrote:
> > I do not understand. Could you elaborate or point me to a test case?
> ```
> declare void @test11_helper(i8* %a)
> define void @test11(i8* noalias %a) {
> tail call void @test11_helper(i8* %a) ; maybe captured
> %c = load i8 , i8* %a ; It is invalid to deduce noalias for %a because of noalias in argument
> ret void
> }
> ```
> Isn't it?
Ah, now I see your point. thx
================
Comment at: llvm/test/Transforms/FunctionAttrs/internal-noalias.ll:8
+ %add = add nsw i32 %call1, %call2
+ ret i32 %add
+}
----------------
Add check lines above or use `llvm/utils/update_test_checks.py` for the test files.
================
Comment at: llvm/test/Transforms/FunctionAttrs/noalias_returned.ll:145
+define internal void @test9(i8* %a, i8* %b) {
+; FIXME: missing noalias
+; CHECK: define internal void @test9(i8* %a, i8* %b)
----------------
Missing noalias where? Maybe show how it should look like.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66207/new/
https://reviews.llvm.org/D66207
More information about the llvm-commits
mailing list