[PATCH] D62687: [Attributor] Deduce "nofree" function attribute
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 1 13:19:33 PDT 2019
jdoerfert added a comment.
Last comments wrt the test cases. I hope D62784 <https://reviews.llvm.org/D62784> is uncontroversial and we can use the `Function Attr:` check lines. That is the last change I'd like to see.
================
Comment at: llvm/test/Transforms/FunctionAttrs/nofree.ll:32
+; FNATTR: define void @only_free(i8* nocapture) local_unnamed_addr
+; ATTRIBUTOR: define void @only_free(i8* nocapture) local_unnamed_addr #1
define void @only_free(i8* nocapture) local_unnamed_addr #0 {
----------------
Assuming I can land D62784, you can check for "nofree" as you do for the FNATTR attributes.
Use -NEXT: for the define lines so you make sure that you check the attributes of that definition.
Use -NOT: nofree for the negative test cases to make sure we do not derive it.
================
Comment at: llvm/test/Transforms/FunctionAttrs/nofree.ll:174
+
+; FIXME: missing "nofree"
+; FNATTRS: Function Attrs: noinline nounwind uwtable
----------------
Great!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62687/new/
https://reviews.llvm.org/D62687
More information about the llvm-commits
mailing list