[flang-commits] [flang] [flang] Apply nocapture attribute to dummy arguments (PR #116182)
via flang-commits
flang-commits at lists.llvm.org
Wed Nov 27 22:37:32 PST 2024
s-watanabe314 wrote:
Thank you for the approval! I'll merge it.
> I'm not sure how to handle the regression in the `Fir/box.fir` test when `FunctionAttrPass` is modified to run by default. Could you advise me on this?
>
> https://github.com/llvm/llvm-project/blob/40afff7bd95090a75bc68a0d26b8017cc0ae65c1/flang/test/Fir/box.fir#L55-L58
>
> It seems that the return value of function `@b1` is converted to a dummy argument(`ptr %[[res:.*]]`) by the `CodeGenRewritePass`, and `nocapture` is applied to it. Is it correct to apply `nocapture` to a dummy argument that was originally a return value?
I previously asked about the transformation that moves the return value to an argument, but I don't understand the purpose of this transformation. Could someone please explain it to me?
https://github.com/llvm/llvm-project/pull/116182
More information about the flang-commits
mailing list