aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorValentin Clement <clementval@gmail.com>2022-06-23 13:43:38 +0200
committerValentin Clement <clementval@gmail.com>2022-06-23 13:45:40 +0200
commitea3874437274e5d37e51819dd0109a66b087c251 (patch)
treebf543a51f4ff0c8b66cb9698d2b4b6fe90fd7d3a /llvm/lib/CodeGen/MachineBasicBlock.cpp
parent96b7af681545af980cd8077a739ce06628039bfa (diff)
downloadllvm-ea3874437274e5d37e51819dd0109a66b087c251.zip
llvm-ea3874437274e5d37e51819dd0109a66b087c251.tar.gz
llvm-ea3874437274e5d37e51819dd0109a66b087c251.tar.bz2
[flang] Lowering passing variables to OPTIONAL VALUE
The case where the dummy argument is OPTIONAL was missing in the handling of VALUE numerical and logical dummies (passBy::BaseAddressValueAttribute). This caused segfaults while unconditionally copying actual arguments that were legally absent at runtime. Takes this bug as an opportunity to share the code that lowers arguments that must be passed by BaseAddress, BaseAddressValueAttribute, BoxChar, and CharBoxValueAttribute. It has to deal with the exact same issues (being able to make contiguous copies of the actual argument, potentially conditionally at runtime, and potentially requiring a copy-back). The VALUE case is the same as the non value case, except there is never a copy-back and there is always a copy-in for variables. This two differences are easily controlled by a byValue flag. This as the benefit of implementing CHARACTER, VALUE for free that was previously a hard TODO. This patch is part of the upstreaming effort from fir-dev branch. Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D128418 Co-authored-by: Jean Perier <jperier@nvidia.com>
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
0 files changed, 0 insertions, 0 deletions