[PATCH] D62801: Add "willreturn" function attribute
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 5 18:57:35 PDT 2019
jdoerfert added inline comments.
================
Comment at: llvm/docs/LangRef.rst:1482
+ If an invocation of an annotated function does not return the control back
+ to a point in the call stack, the behavior is undefined.
``nounwind``
----------------
Style comments:
No comma after will in the first line.
Remove the "This attribute doesn't mean" sentence.
Remove "the" in front of "control back".
================
Comment at: llvm/test/Transforms/FunctionAttrs/will-return.ll:45
+; 2.2 (negative case)
+; recursive function which doesn't stop for some input.
+; int fact_maybe_not_halt(int n) {
----------------
This function does always return. Change the text and expected input or change the code.
================
Comment at: llvm/test/Transforms/FunctionAttrs/will-return.ll:75
+
+; TEST 3 (negative case)
+; loop
----------------
Why negative?
================
Comment at: llvm/test/Transforms/FunctionAttrs/will-return.ll:204
+; FNATTR: Function Attrs: noinline nounwind uwtable
+; FNATTR-NEXT: define void @call_maybe_noreturn()
+define void @call_maybe_noreturn() #0 {
----------------
-NOT line missing.
================
Comment at: llvm/test/Transforms/FunctionAttrs/will-return.ll:253
+; invoke a function with "willreturn"
+; FIXME: We need a more argue about exception and invoke instruction.
+
----------------
I think we did.
================
Comment at: llvm/test/Transforms/FunctionAttrs/will-return.ll:286
+
+; FNATTR: Function Attrs: noinline norecurse nounwind readonly uwtable
+; FNATTR-NEXT: define i32 @loop_constant_trip_count(i32* nocapture readonly)
----------------
FIXME missing
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62801/new/
https://reviews.llvm.org/D62801
More information about the llvm-commits
mailing list