[PATCH] D100226: [funcattrs] Add the maximal set of implied attributes to definitions

2021-04-27 Thread Thomas Preud'homme via Phabricator via cfe-commits
thopre added inline comments.



Comment at: llvm/test/Transforms/FunctionAttrs/2008-09-03-ReadOnly.ll:14-15
 
-; CHECK: attributes #0 = { readonly }
+; CHECK: attributes #0 = { nofree readonly }
+; CHECK: attributes #1 = { readonly }

jdoerfert wrote:
> thopre wrote:
> > I'm getting #0 for both functions. Any idea why that might happen?
> Random guess: your cmake was not rebuild since we switched to the new-PM and 
> `opt` defaults to the old one?
That's a good guess! We are still using the old PM. Thanks!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100226

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D100226: [funcattrs] Add the maximal set of implied attributes to definitions

2021-04-27 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments.



Comment at: llvm/test/Transforms/FunctionAttrs/2008-09-03-ReadOnly.ll:14-15
 
-; CHECK: attributes #0 = { readonly }
+; CHECK: attributes #0 = { nofree readonly }
+; CHECK: attributes #1 = { readonly }

thopre wrote:
> I'm getting #0 for both functions. Any idea why that might happen?
Random guess: your cmake was not rebuild since we switched to the new-PM and 
`opt` defaults to the old one?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100226

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D100226: [funcattrs] Add the maximal set of implied attributes to definitions

2021-04-27 Thread Thomas Preud'homme via Phabricator via cfe-commits
thopre added inline comments.



Comment at: llvm/test/Transforms/FunctionAttrs/2008-09-03-ReadOnly.ll:14-15
 
-; CHECK: attributes #0 = { readonly }
+; CHECK: attributes #0 = { nofree readonly }
+; CHECK: attributes #1 = { readonly }

I'm getting #0 for both functions. Any idea why that might happen?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100226

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D100226: [funcattrs] Add the maximal set of implied attributes to definitions

2021-04-16 Thread Philip Reames via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf549176ad976: [funcattrs] Add the maximal set of implied 
attributes to definitions (authored by reames).
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100226

Files:
  clang/test/CodeGenOpenCL/convergent.cl
  llvm/lib/Transforms/IPO/FunctionAttrs.cpp
  llvm/test/Analysis/TypeBasedAliasAnalysis/functionattrs.ll
  llvm/test/CodeGen/AMDGPU/inline-attr.ll
  llvm/test/Other/cgscc-devirt-iteration.ll
  llvm/test/Other/cgscc-iterate-function-mutation.ll
  llvm/test/Other/cgscc-observe-devirt.ll
  llvm/test/Transforms/FunctionAttrs/2008-09-03-ReadOnly.ll
  llvm/test/Transforms/FunctionAttrs/atomic.ll
  llvm/test/Transforms/FunctionAttrs/incompatible_fn_attrs.ll
  llvm/test/Transforms/FunctionAttrs/nofree-attributor.ll
  llvm/test/Transforms/FunctionAttrs/nofree.ll
  llvm/test/Transforms/FunctionAttrs/nosync.ll
  llvm/test/Transforms/FunctionAttrs/nounwind.ll
  llvm/test/Transforms/FunctionAttrs/optnone.ll
  llvm/test/Transforms/FunctionAttrs/willreturn-callsites.ll
  llvm/test/Transforms/FunctionAttrs/writeonly.ll
  llvm/test/Transforms/InferFunctionAttrs/norecurse_debug.ll
  llvm/test/Transforms/Inline/cgscc-update.ll

Index: llvm/test/Transforms/Inline/cgscc-update.ll
===
--- llvm/test/Transforms/Inline/cgscc-update.ll
+++ llvm/test/Transforms/Inline/cgscc-update.ll
@@ -27,7 +27,7 @@
 }
 
 ; This function should have had 'readnone' deduced for its SCC.
-; CHECK: Function Attrs: noinline nosync nounwind readnone
+; CHECK: Function Attrs: nofree noinline nosync nounwind readnone
 ; CHECK-NEXT: define void @test1_g()
 define void @test1_g() noinline {
 entry:
@@ -36,7 +36,7 @@
 }
 
 ; This function should have had 'readnone' deduced for its SCC.
-; CHECK: Function Attrs: noinline nosync nounwind readnone
+; CHECK: Function Attrs: nofree noinline nosync nounwind readnone
 ; CHECK-NEXT: define void @test1_h()
 define void @test1_h() noinline {
 entry:
@@ -59,7 +59,7 @@
 }
 
 ; This function should have had 'readnone' deduced for its SCC.
-; CHECK: Function Attrs: noinline nosync nounwind readnone
+; CHECK: Function Attrs: nofree noinline nosync nounwind readnone
 ; CHECK-NEXT: define void @test2_g()
 define void @test2_g() noinline {
 entry:
@@ -69,7 +69,7 @@
 }
 
 ; This function should have had 'readnone' deduced for its SCC.
-; CHECK: Function Attrs: noinline nosync nounwind readnone
+; CHECK: Function Attrs: nofree noinline nosync nounwind readnone
 ; CHECK-NEXT: define void @test2_h()
 define void @test2_h() noinline {
 entry:
@@ -152,7 +152,7 @@
 ; form a new SCC and should use that can deduce precise function attrs.
 
 ; This function should have had 'readnone' deduced for its SCC.
-; CHECK: Function Attrs: noinline nosync nounwind readnone
+; CHECK: Function Attrs: nofree noinline nosync nounwind readnone
 ; CHECK-NEXT: define void @test4_f1()
 define void @test4_f1() noinline {
 entry:
@@ -175,7 +175,7 @@
 }
 
 ; This function should have had 'readnone' deduced for its SCC.
-; CHECK: Function Attrs: noinline nosync nounwind readnone
+; CHECK: Function Attrs: nofree noinline nosync nounwind readnone
 ; CHECK-NEXT: define void @test4_h()
 define void @test4_h() noinline {
 entry:
Index: llvm/test/Transforms/InferFunctionAttrs/norecurse_debug.ll
===
--- llvm/test/Transforms/InferFunctionAttrs/norecurse_debug.ll
+++ llvm/test/Transforms/InferFunctionAttrs/norecurse_debug.ll
@@ -52,5 +52,5 @@
 !28 = !DILocation(line: 9, column: 18, scope: !2)
 !29 = !DILocation(line: 10, column: 1, scope: !2)
 
-; CHECK: attributes #0 = { nofree norecurse nosync nounwind willreturn }
+; CHECK: attributes #0 = { nofree norecurse nosync nounwind willreturn mustprogress }
 ; CHECK-NOT: foo.coefficient1
Index: llvm/test/Transforms/FunctionAttrs/writeonly.ll
===
--- llvm/test/Transforms/FunctionAttrs/writeonly.ll
+++ llvm/test/Transforms/FunctionAttrs/writeonly.ll
@@ -27,4 +27,4 @@
 
 ; CHECK: attributes #0 = { {{.*}} readnone {{.*}} }
 ; CHECK: attributes #1 = { {{.*}} readonly {{.*}} }
-; CHECK: attributes #2 = { {{.*}} writeonly }
+; CHECK: attributes #2 = { {{.*}} writeonly {{.*}} }
Index: llvm/test/Transforms/FunctionAttrs/willreturn-callsites.ll
===
--- llvm/test/Transforms/FunctionAttrs/willreturn-callsites.ll
+++ llvm/test/Transforms/FunctionAttrs/willreturn-callsites.ll
@@ -38,7 +38,7 @@
 }
 
 define void @test_fn_mustprogress_readonly_calls(i32* %ptr) mustprogress {
-; CHECK: Function Attrs: readonly willreturn mustprogress
+; CHECK: Function Attrs: nofree readonly willreturn mustprogress
 ; CHECK-LABEL: