[all-commits] [llvm/llvm-project] 7531c8: [flang][hlfir] Enable allocate, deallocate, pointe...
jeanPerier via All-commits
all-commits at lists.llvm.org
Fri Jan 20 05:08:23 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7531c87183822cf8931496a757a09779e24aeac0
https://github.com/llvm/llvm-project/commit/7531c87183822cf8931496a757a09779e24aeac0
Author: Jean Perier <jperier at nvidia.com>
Date: 2023-01-20 (Fri, 20 Jan 2023)
Changed paths:
M flang/include/flang/Lower/ConvertExprToHLFIR.h
M flang/lib/Lower/Allocatable.cpp
M flang/lib/Lower/Bridge.cpp
M flang/lib/Lower/ConvertCall.cpp
M flang/lib/Lower/ConvertExprToHLFIR.cpp
A flang/test/Lower/HLFIR/allocatable-and-pointer-status-change.f90
Log Message:
-----------
[flang][hlfir] Enable allocate, deallocate, pointer assignment lowering
The previous patches allowed lowering allocatable/and pointer designator
expressions with HLFIR.
This patch updates the bridge genExprMutableBox to use HLFIR lowering
when HLFIR flag is set. For allocate and deallocate lowering that use
genExprMutableBox, no other change is needed.
For pointer assignments, the code doing the pointer assignments in the
bridge can be reused and is simply moved so that it can be shared, and
the "explicit context" special cases of the previous lowering are
by-passed.
The code doing pointer assignment revealed that convertExprToAddress
did not match the previous genExprAddr behavior (that actually
does not create temps for "x" where x is not contiguous).
Instead of trying to copy the old behavior that is a bit weird (was
dictated by the implementation rather than design). Update
convertExprToAddress to do something sensible and that works with
the current genExprAddr usages (if anything, it should saves bogus
array section temps).
Differential Revision: https://reviews.llvm.org/D142197
More information about the All-commits
mailing list