[all-commits] [llvm/llvm-project] 6ed4a8: [flang][hlfir] Lower intrinsic module procedures t...
jeanPerier via All-commits
all-commits at lists.llvm.org
Mon Mar 6 05:01:14 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6ed4a8b9b1f3041c661b6e7be43db73cda27a2bd
https://github.com/llvm/llvm-project/commit/6ed4a8b9b1f3041c661b6e7be43db73cda27a2bd
Author: Jean Perier <jperier at nvidia.com>
Date: 2023-03-06 (Mon, 06 Mar 2023)
Changed paths:
M flang/include/flang/Lower/ConvertCall.h
M flang/lib/Lower/ConvertCall.cpp
M flang/lib/Lower/ConvertExpr.cpp
A flang/test/Lower/HLFIR/intrinsic-module-procedures.f90
Log Message:
-----------
[flang][hlfir] Lower intrinsic module procedures to HLFIR
Intrinsic module procedures are a bit different from intrinsic
procedures: they are defined in intrinsic module files, but their
signature and representation in semantics is the same as user
procedures.
The code to lower them in lowering (when they are not implemented in
Fortran) is the same as for intrinsic procedures
(Optimizer/Builder/IntrinsicCall.cpp).
The dispatching in in HLFIR procedure reference lowering must be
slightly modified so that these evaluate::ProcRef that have a
semantics::Symbol instead of an evaluate::SpecificIntrinsic can
be dispatched as evaluate::SpecificIntrinsic:
- move isIntrinsicModuleProcedure to detect them
- in the helpers dealing with intrinsics, make evaluate::SpecificIntrinsic
a pointer argument that can be null for intrinsic module procedures.
- add getProcedureName() to call context to avoid relying on the
evaluate::SpecificIntrinsic when it is not know to be null.
Differential Revision: https://reviews.llvm.org/D145360
More information about the All-commits
mailing list