[all-commits] [llvm/llvm-project] 6a41f5: [flang][hlfir] do not propagate polymorphic tempor...

jeanPerier via All-commits all-commits at lists.llvm.org
Fri Jun 6 00:54:04 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6a41f53c39cb4a40a9085e26697f3460eb8bedb1
      https://github.com/llvm/llvm-project/commit/6a41f53c39cb4a40a9085e26697f3460eb8bedb1
  Author: jeanPerier <jperier at nvidia.com>
  Date:   2025-06-06 (Fri, 06 Jun 2025)

  Changed paths:
    M flang/include/flang/Optimizer/Builder/FIRBuilder.h
    M flang/include/flang/Optimizer/Builder/MutableBox.h
    M flang/include/flang/Optimizer/Dialect/FIRType.h
    M flang/lib/Optimizer/Builder/FIRBuilder.cpp
    M flang/lib/Optimizer/Builder/HLFIRTools.cpp
    M flang/lib/Optimizer/Builder/MutableBox.cpp
    M flang/lib/Optimizer/CodeGen/LowerRepackArrays.cpp
    M flang/lib/Optimizer/Dialect/FIRType.cpp
    M flang/lib/Optimizer/HLFIR/IR/HLFIROps.cpp
    M flang/lib/Optimizer/HLFIR/Transforms/BufferizeHLFIR.cpp
    M flang/test/HLFIR/as_expr-codegen-polymorphic.fir
    M flang/test/HLFIR/as_expr-codegen.fir
    M flang/test/HLFIR/associate-codegen.fir
    M flang/test/HLFIR/bufferize-poly-expr.fir
    M flang/test/HLFIR/element-codegen-issue-118922.fir
    M flang/test/HLFIR/elemental-codegen.fir
    M flang/test/Lower/OpenMP/DelayedPrivatization/target-private-multiple-variables.f90
    M flang/test/Lower/OpenMP/delayed-privatization-allocatable-array.f90
    M flang/test/Lower/OpenMP/delayed-privatization-array.f90
    M flang/test/Lower/OpenMP/parallel-reduction-allocatable-array.f90
    M flang/test/Lower/OpenMP/parallel-reduction-array-lb.f90
    M flang/test/Lower/OpenMP/parallel-reduction-array.f90
    M flang/test/Lower/OpenMP/parallel-reduction-array2.f90
    M flang/test/Lower/OpenMP/parallel-reduction-pointer-array.f90
    M flang/test/Lower/OpenMP/parallel-reduction3.f90
    M flang/test/Lower/OpenMP/reduction-array-intrinsic.f90
    M flang/test/Lower/OpenMP/wsloop-reduction-allocatable-array-minmax.f90
    M flang/test/Lower/OpenMP/wsloop-reduction-array-assumed-shape.f90
    M flang/test/Lower/OpenMP/wsloop-reduction-array.f90
    M flang/test/Lower/OpenMP/wsloop-reduction-array2.f90
    M flang/test/Lower/OpenMP/wsloop-reduction-multiple-clauses.f90
    M flang/test/Lower/do_concurrent_local_assoc_entity.f90
    M flang/test/Transforms/lower-repack-arrays.fir

  Log Message:
  -----------
  [flang][hlfir] do not propagate polymorphic temporary as allocatables (#142609)

Polymorphic temporary are currently propagated as
fir.ref<fir.class<fir.heap<>>> because their allocation may be delayed
to the hlfir.assign copy (using realloc).

This patch moves away from this and directly allocate the temp and
propagate it as a fir.class.

The polymorphic temporaries creating is also simplified by avoiding the
need to call the runtime to setup the descriptor altogether (the runtime
is still call for the allocation currently because alloca/allocmem do
not support polymorphism).



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list