[flang-commits] [flang] [flang] Apply nocapture attribute to dummy arguments (PR #116182)

via flang-commits flang-commits at lists.llvm.org
Tue Nov 19 23:20:24 PST 2024


s-watanabe314 wrote:

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?

https://github.com/llvm/llvm-project/pull/116182


More information about the flang-commits mailing list