aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/CodeGen.cpp
diff options
context:
space:
mode:
authorjeanPerier <jperier@nvidia.com>2024-10-23 12:33:14 +0200
committerGitHub <noreply@github.com>2024-10-23 12:33:14 +0200
commitd89c1dbaf5f60c734f5168e8c778ba250d7d2d5e (patch)
tree8e8167f31698723098e87070ebd7e361d0970883 /llvm/lib/CodeGen/CodeGen.cpp
parentac5a2010ad35a72de3e75a1883e2495345b92a73 (diff)
downloadllvm-d89c1dbaf5f60c734f5168e8c778ba250d7d2d5e.zip
llvm-d89c1dbaf5f60c734f5168e8c778ba250d7d2d5e.tar.gz
llvm-d89c1dbaf5f60c734f5168e8c778ba250d7d2d5e.tar.bz2
[flang][hlfir] refine hlfir.assign side effects (#113319)
hlfir.assign currently has the `MemoryEffects<[MemWrite]` which makes it look like it can write to anything. This is good for some cases where the assign effect cannot be precisely described through the MLIR side effect API (e.g., when the LHS is a descriptor and it is not possible to get an OpOperand describing the data address, or when derived type are involved and finalization could be called, or user defined assignment for some components). For the most common case of hlfir.assign on intrinsic types without whole allocatable LHS, this is pessimistic. This patch implements a finer description of the side effects when possible, and also adds the proper read/allocate/free effects when relevant. The ultimate goal is to suppress the generation of temporary for the LHS address when dealing with an assignment to a vector subscripted LHS where the vector subscript is an array constructor that does not refer to the LHS (as in `x([a,b]) = y`). Two more patches will follow to enable this.
Diffstat (limited to 'llvm/lib/CodeGen/CodeGen.cpp')
0 files changed, 0 insertions, 0 deletions