[all-commits] [llvm/llvm-project] cf73fa: [flang] Add hlfir.as_expr definition

jeanPerier via All-commits all-commits at lists.llvm.org
Wed Dec 7 05:44:28 PST 2022


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

  Changed paths:
    M flang/include/flang/Optimizer/HLFIR/HLFIROps.td
    M flang/lib/Optimizer/HLFIR/IR/HLFIROps.cpp
    A flang/test/HLFIR/as_expr.fir

  Log Message:
  -----------
  [flang] Add hlfir.as_expr definition

hlfir.as_expr allows taking a value from a character, derived type,
or array expressions. This will allow implementing parentheses.

Combining as_expr + hlfir.associate will allow creating a variable copy
into a new temporary variable.

A later patch will add the ability to "move" a variable into an
expression (to give ownership of the variable storage to the expression,
with the commitment that the variable will not be used anymore).

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




More information about the All-commits mailing list