[all-commits] [llvm/llvm-project] 9f1bb3: [flang] Carry the whole polymorphic box in Polymor...

Valentin Clement (バレンタイン クレメン) via All-commits all-commits at lists.llvm.org
Thu Jan 12 09:00:34 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9f1bb307da6fec6fc8123bdec79ecec28fced874
      https://github.com/llvm/llvm-project/commit/9f1bb307da6fec6fc8123bdec79ecec28fced874
  Author: Valentin Clement <clementval at gmail.com>
  Date:   2023-01-12 (Thu, 12 Jan 2023)

  Changed paths:
    M flang/include/flang/Optimizer/Builder/BoxValue.h
    M flang/include/flang/Optimizer/CodeGen/CGOps.td
    M flang/include/flang/Optimizer/Dialect/FIROps.td
    M flang/lib/Lower/ConvertExpr.cpp
    M flang/lib/Optimizer/Builder/BoxValue.cpp
    M flang/lib/Optimizer/Builder/FIRBuilder.cpp
    M flang/lib/Optimizer/Builder/MutableBox.cpp
    M flang/lib/Optimizer/CodeGen/CodeGen.cpp
    M flang/lib/Optimizer/CodeGen/PreCGRewrite.cpp
    M flang/lib/Optimizer/Dialect/FIROps.cpp
    M flang/test/Fir/fir-ops.fir
    M flang/test/Fir/invalid.fir
    M flang/test/Fir/polymorphic.fir
    M flang/test/Lower/allocatable-polymorphic.f90
    M flang/test/Lower/dispatch.f90
    M flang/test/Lower/pointer-association-polymorphic.f90
    M flang/test/Lower/polymorphic.f90
    M flang/test/Lower/select-type.f90

  Log Message:
  -----------
  [flang] Carry the whole polymorphic box in PolymorphicValue

Until now, only the address of the type descriptor was hold in
a PolymorphicValue. In some cases, the element size and the
type code are also needed when creating new polymorphic
descriptors from an element of a polymorphic entity.

This patch updates PolymorphicValue to carry the source
descriptor from which the element is extracted. The source
descriptor is then used when emboxing the element to a new
polymorphic descriptor.

This simplify the code done in D141274 and will be used
when creating polymorphic temporary as well.

Reviewed By: jeanPerier, PeteSteinfeld

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




More information about the All-commits mailing list