aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Serialization/ModuleManager.cpp
diff options
context:
space:
mode:
authorSlava Zakharin <szakharin@nvidia.com>2025-05-12 14:03:15 -0700
committerGitHub <noreply@github.com>2025-05-12 14:03:15 -0700
commit09b772e2efad804fdda02e2bd9ee44a2aaaddeeb (patch)
treed4169dd2730b21d76549f8a617ef8c0ad32878ba /clang/lib/Serialization/ModuleManager.cpp
parentab60910e01eaa8bcf993cdb59a95f882b3859fd1 (diff)
downloadllvm-09b772e2efad804fdda02e2bd9ee44a2aaaddeeb.zip
llvm-09b772e2efad804fdda02e2bd9ee44a2aaaddeeb.tar.gz
llvm-09b772e2efad804fdda02e2bd9ee44a2aaaddeeb.tar.bz2
[flang] Postpone hlfir.end_associate generation for calls. (#138786)
If we generate hlfir.end_associate at the end of the statement, we get easier optimizable HLFIR, because there are no compiler generated operations with side-effects in between the call and the consumers. This allows more hlfir.eval_in_mem to reuse the LHS instead of allocating temporary buffer. I do not think the same can be done for hlfir.copy_out always, e.g.: ``` subroutine test2(x) interface function array_func2(x,y) real:: x(*), array_func2(10), y end function array_func2 end interface real :: x(:) x = array_func2(x, 1.0) end subroutine test2 ``` If we postpone the copy-out until after the assignment, then the result may be wrong.
Diffstat (limited to 'clang/lib/Serialization/ModuleManager.cpp')
0 files changed, 0 insertions, 0 deletions