[all-commits] [llvm/llvm-project] 89c923: [flang] Embox derived-type directly to fir.class w...

Valentin Clement (バレンタイン クレメン) via All-commits all-commits at lists.llvm.org
Thu Oct 13 01:40:18 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 89c923655aad6de837e386aa6e1dfa72c16e2697
      https://github.com/llvm/llvm-project/commit/89c923655aad6de837e386aa6e1dfa72c16e2697
  Author: Valentin Clement <clementval at gmail.com>
  Date:   2022-10-13 (Thu, 13 Oct 2022)

  Changed paths:
    M flang/include/flang/Optimizer/Builder/FIRBuilder.h
    M flang/lib/Lower/ConvertExpr.cpp
    M flang/lib/Optimizer/Builder/FIRBuilder.cpp
    M flang/test/Lower/polymorphic.f90

  Log Message:
  -----------
  [flang] Embox derived-type directly to fir.class without fir.convert

non-polymorphic derived-type can call type-bound procedure with passed-object.
In that case, the derived-type is emboxed in order to be passed to the call.
Until now the emboxing was done to a fir.box followed by a fir.convert.
This patch update the createBox function so that we can directly embox to
a fir.class and avoid the extra fir.convert.

Reviewed By: PeteSteinfeld

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




More information about the All-commits mailing list