[all-commits] [llvm/llvm-project] 9de831: Add lowering TODO for bindings returning derived t...

jeanPerier via All-commits all-commits at lists.llvm.org
Tue Jun 14 01:49:04 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9de831aa2cbc6ab94265ff8136fb36d9b6c1cfae
      https://github.com/llvm/llvm-project/commit/9de831aa2cbc6ab94265ff8136fb36d9b6c1cfae
  Author: Jean Perier <jperier at nvidia.com>
  Date:   2022-06-14 (Tue, 14 Jun 2022)

  Changed paths:
    M flang/lib/Lower/ConvertExpr.cpp
    M flang/lib/Optimizer/Transforms/AbstractResult.cpp

  Log Message:
  -----------
  Add lowering TODO for bindings returning derived types or arrays

Codegen does not support fir.addressof of functions returning derived
types, arrays are descriptors inside GlobalOp region.

This is because the  abstract-result-opt is required to rewrite such
functions (a hidden argument must be added), but this pass is meant to
run in GlobalOp currently.

Such fir.address_of may be created when lowering procedure pointers
initial value (TODO), or when creating derived type descriptors for
types with bindings.

Add a TODO in lowering until abstract-result-opt is modified to run
on GlobalOp too.

This patch is part of the upstreaming effort from fir-dev branch.

Reviewed By: jeanPerier

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




More information about the All-commits mailing list