[flang-commits] [flang] [flang] Associate named constant actual arguments with their storage (PR #222986)
via flang-commits
flang-commits at lists.llvm.org
Tue Sep 22 08:47:39 PDT 2026
================
@@ -1392,19 +1392,24 @@ static PreparedDummyArgument preparePresentUserCallActualArgument(
bool mustDoCopyIn{false};
bool mustDoCopyOut{false};
+ // Default to suggesting a copy when the copy analysis does not run, so
+ // that the parameter-object temporary below stays conservative in
+ // contexts that disable the analysis.
+ bool suggestCopyIn{true};
+ bool suggestCopyOut{true};
if (callContext.doCopyIn) {
----------------
jeanPerier wrote:
I am not sure I follow the `true` default. What are the cases where `callContext.doCopyin` is set to false and we could still need a parameter copy?
Won't this lead to extra copies when passing parameters in user defined assignment calls?
https://github.com/llvm/llvm-project/pull/222986
More information about the flang-commits
mailing list