[all-commits] [llvm/llvm-project] 85f666: [flang] implement sizeof lowering for polymorphic ...

jeanPerier via All-commits all-commits at lists.llvm.org
Tue Mar 12 01:04:46 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 85f6669de59b2bb75c6848afa79de63be988721c
      https://github.com/llvm/llvm-project/commit/85f6669de59b2bb75c6848afa79de63be988721c
  Author: jeanPerier <jperier at nvidia.com>
  Date:   2024-03-12 (Tue, 12 Mar 2024)

  Changed paths:
    M flang/include/flang/Optimizer/Builder/IntrinsicCall.h
    M flang/lib/Optimizer/Builder/IntrinsicCall.cpp
    A flang/test/Lower/Intrinsics/sizeof.f90

  Log Message:
  -----------
  [flang] implement sizeof lowering for polymorphic entities (#84498)

For non polymorphic entities, semantics knows the type size and rewrite
sizeof to `"cst element size" * size(x)`.

Lowering has to deal with the polymorphic case where the type size must
be retrieved from the descriptor (note that the lowering implementation
would work with any entity, polymorphic on not, it is just not used for
the non polymorphic cases).



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