[flang-commits] [PATCH] D140220: [flang] Lower statement function references in HLFIR

Jean Perier via Phabricator via flang-commits flang-commits at lists.llvm.org
Fri Dec 16 07:57:56 PST 2022


jeanPerier created this revision.
jeanPerier added reviewers: PeteSteinfeld, vdonaldson.
jeanPerier added a project: Flang.
Herald added subscribers: mehdi_amini, jdoerfert.
Herald added a project: All.
jeanPerier requested review of this revision.

Enable lowering of statement function references in HLFIR.  This follows
the same principle as statement function lowering with the current
lowering:

- Actual arguments are lowered and mapped to the statement function dummy symbols.
- "HostAssociated" symbols are mapped to their host values (these are the symbols referred to inside the statement function expressions that are not statement function dummies. e.g: `x` in `stmt_func(i) = x(i)`).
- The statement function expression is evaluated.

evaluate::SetLength has to be lowered to deal with statement functions
returning characters since the front-end is generating one to ensure the
statement function expression value is trimmed/padded to match the statement
function declared type.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D140220

Files:
  flang/include/flang/Lower/ConvertVariable.h
  flang/lib/Lower/Bridge.cpp
  flang/lib/Lower/ConvertCall.cpp
  flang/lib/Lower/ConvertExprToHLFIR.cpp
  flang/lib/Lower/ConvertVariable.cpp
  flang/lib/Lower/SymbolMap.cpp
  flang/test/Lower/HLFIR/statement-functions.f90

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140220.483546.patch
Type: text/x-patch
Size: 11216 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20221216/592ccae0/attachment-0001.bin>


More information about the flang-commits mailing list