[all-commits] [llvm/llvm-project] 8febe6: [flang] Lower statement function references in HLFIR

jeanPerier via All-commits all-commits at lists.llvm.org
Mon Dec 19 02:12:25 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8febe67851458645f93efa33d72717b732007ca7
      https://github.com/llvm/llvm-project/commit/8febe67851458645f93efa33d72717b732007ca7
  Author: Jean Perier <jperier at nvidia.com>
  Date:   2022-12-19 (Mon, 19 Dec 2022)

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

  Log Message:
  -----------
  [flang] Lower statement function references in HLFIR

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.

Differential Revision: https://reviews.llvm.org/D140220




More information about the All-commits mailing list