[all-commits] [llvm/llvm-project] 6df4e7: [flang] Add ability to have special allocator for ...

Valentin Clement (バレンタイン クレメン) via All-commits all-commits at lists.llvm.org
Thu Aug 1 09:40:14 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6df4e7c25ffb15ed8cba8ccb9cf9fa18b082013d
      https://github.com/llvm/llvm-project/commit/6df4e7c25ffb15ed8cba8ccb9cf9fa18b082013d
  Author: Valentin Clement (バレンタイン クレメン) <clementval at gmail.com>
  Date:   2024-08-01 (Thu, 01 Aug 2024)

  Changed paths:
    M flang/include/flang/ISO_Fortran_binding.h
    M flang/include/flang/Optimizer/CodeGen/TBAABuilder.h
    M flang/include/flang/Optimizer/CodeGen/TypeConverter.h
    M flang/include/flang/Runtime/descriptor.h
    M flang/lib/Optimizer/CodeGen/CodeGen.cpp
    M flang/lib/Optimizer/CodeGen/TypeConverter.cpp
    M flang/runtime/CMakeLists.txt
    M flang/runtime/ISO_Fortran_util.h
    A flang/runtime/allocator-registry.cpp
    A flang/runtime/allocator-registry.h
    M flang/runtime/descriptor.cpp
    M flang/test/Fir/box.fir
    M flang/test/Fir/convert-to-llvm.fir
    M flang/test/Fir/embox-char.fir
    M flang/test/Fir/embox.fir
    M flang/test/Fir/ignore-missing-type-descriptor.fir
    M flang/test/Fir/polymorphic.fir
    M flang/test/Fir/rebox-global.fir
    M flang/test/Fir/rebox.fir
    M flang/test/Fir/tbaa.fir
    M flang/test/Fir/type-descriptor.fir
    M flang/test/Lower/allocatable-polymorphic.f90

  Log Message:
  -----------
  [flang] Add ability to have special allocator for descriptor data (#100690)

This patch enhances the descriptor with the ability to have specialized
allocator. The allocators are registered in a dedicated registry and the
index of the desired allocator is stored in the descriptor. The default
allocator, std::malloc, is registered at index 0.

In order to have this allocator index in the descriptor, the f18Addendum
field is repurposed to be able to hold the presence flag for the
addendum (lsb) and the allocator index.

Since this is a change in the semantic and name of the 7th field of the
descriptor, the CFI_VERSION is bumped to the date of the initial change.

This patch only adds the ability to have this features as part of the
descriptor but does not add specific allocator yet. CUDA fortran will be
the first user of this feature to allocate descriptor data in the
different type of device memory base on the CUDA attribute.

---------

Co-authored-by: Slava Zakharin <szakharin at nvidia.com>



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