aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorjeanPerier <jperier@nvidia.com>2024-05-30 09:30:27 +0200
committerGitHub <noreply@github.com>2024-05-30 09:30:27 +0200
commite398383f9a05ec6f3766e5ab49dd862a72325ba6 (patch)
tree2727af7296090a85c8982b1e7a59decafd0180fa /clang/lib/CodeGen/CodeGenModule.cpp
parent6f2794afeb3c76293cc91cb9f8ae8c90a2ba8b3e (diff)
downloadllvm-e398383f9a05ec6f3766e5ab49dd862a72325ba6.zip
llvm-e398383f9a05ec6f3766e5ab49dd862a72325ba6.tar.gz
llvm-e398383f9a05ec6f3766e5ab49dd862a72325ba6.tar.bz2
[flang][fir] add codegen for fir.load of assumed-rank fir.box (#93569)
- Update LLVM type conversion of assumed-rank fir.box/class to generate the type of the maximum ranked descriptor. That way, alloca for assumed rank descriptor copies are always big enough. This is needed in the fir.load case that generates a new storage for the value - Add a "computeBoxSize" helper to compute the dynamic size of a descriptor. - Use that size to generate an llvm.memcpy intrinsic to copy the input descriptor into the new storage. Looking at https://reviews.llvm.org/D108221?id=404635, it seems valid to add the TBAA node on the memcpy, which I did. In a further patch, I think we should likely always use a memcpy since LLVM seems to have a better time optimizing it than fir.load/fir.store patterns.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions