[flang-commits] [PATCH] D112910: [flang] Add TargetRewrite pass
Diana Picus via Phabricator via flang-commits
flang-commits at lists.llvm.org
Mon Nov 1 05:24:53 PDT 2021
rovka added inline comments.
================
Comment at: flang/lib/Optimizer/CodeGen/Target.h:74
+ /// A function that returns a `boxchar<n>` type value must already have
+ /// converted that return value to an sret argument. This requirement is in
+ /// keeping with Fortran semantics, which require the caller to allocate the
----------------
awarzynski wrote:
> What is `sret`?
It's an LLVM [[ https://llvm.org/docs/LangRef.html#id1434 | parameter attribute ]] for a parameter that's actually the return value of the function (probably short for 'struct return'). Would it be clearer if I rephrased the comment to "[...] converted that return value to an argument with the sret attribute"? The attribute is also mentioned in the last sentence in the comment, so I'm not sure if rephrasing really adds anything.
================
Comment at: flang/test/Fir/target.fir:53
+
+func private @callee(%x : !fir.boxchar<1>)
+
----------------
awarzynski wrote:
> This signature is also modified - could you add a `CHECK` line?
Good point, thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112910/new/
https://reviews.llvm.org/D112910
More information about the flang-commits
mailing list