[all-commits] [llvm/llvm-project] cedfd2: [flang][hlfir] Lower procedure designators to HLFIR
jeanPerier via All-commits
all-commits at lists.llvm.org
Thu Feb 9 00:03:49 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: cedfd2721e3492e5ab0ea86d24d8027846687c27
https://github.com/llvm/llvm-project/commit/cedfd2721e3492e5ab0ea86d24d8027846687c27
Author: Jean Perier <jperier at nvidia.com>
Date: 2023-02-09 (Thu, 09 Feb 2023)
Changed paths:
M flang/include/flang/Lower/CallInterface.h
M flang/include/flang/Lower/ConvertExprToHLFIR.h
M flang/include/flang/Lower/ConvertProcedureDesignator.h
M flang/include/flang/Optimizer/Builder/Character.h
M flang/include/flang/Optimizer/Builder/HLFIRTools.h
M flang/lib/Lower/Bridge.cpp
M flang/lib/Lower/CallInterface.cpp
M flang/lib/Lower/ConvertCall.cpp
M flang/lib/Lower/ConvertExprToHLFIR.cpp
M flang/lib/Lower/ConvertProcedureDesignator.cpp
M flang/lib/Lower/ConvertVariable.cpp
M flang/lib/Optimizer/Builder/Character.cpp
M flang/lib/Optimizer/Builder/HLFIRTools.cpp
A flang/test/Lower/HLFIR/procedure-designators.f90
Log Message:
-----------
[flang][hlfir] Lower procedure designators to HLFIR
- Add a convertProcedureDesignatorToHLFIR that converts the
fir::ExtendedValue from the current lowering to a
fir.boxproc/tuple<fir.boxproc, len> mlir::Value.
- Allow fir.boxproc/tuple<fir.boxproc, len> as hlfir::Entity values
(a function is an address, but from a Fortran entity point of view,
procedure that are not procedure pointers cannot be assigned to, so
it makes a lot more sense to consider those as values).
- Modify symbol association to not generate an hlfir.declare for dummy
procedures. They are not needed and allowing hlfir.declare to declare
function values would make its verifier and handling overly complex
for little benefits (maybe an hlfir.declare_proc could be added if it
turnout out useful later for debug info and attributes storing
purposes).
- Allow translation from hlfir::Entity to fir::ExtendedValue.
convertToBox return type had to be relaxed because some intrinsics
handles both object and procedure arguments and need to lower their
object arguments "asBox". fir::BoxValue is not intended to carry
dummy procedures (all its member functions would make little sense
and its verifier does not accept such type).
Note that AsAddr, AsValue and AsBox will always return the same MLIR
value for procedure designators because they are always handled the
same way in FIR.
Differential Revision: https://reviews.llvm.org/D143585
More information about the All-commits
mailing list