[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
Loading
Please sign in to comment