[all-commits] [llvm/llvm-project] 9035d0: [flang][cuda] Size managed globals with descriptor...

Vijay Kandiah via All-commits all-commits at lists.llvm.org
Tue Jul 14 12:02:50 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9035d06155596c1214f302bef2e60b631d38e73a
      https://github.com/llvm/llvm-project/commit/9035d06155596c1214f302bef2e60b631d38e73a
  Author: Vijay Kandiah <vkandiah at nvidia.com>
  Date:   2026-07-14 (Tue, 14 Jul 2026)

  Changed paths:
    M flang/lib/Optimizer/Transforms/CUDA/CUFAddConstructor.cpp
    A flang/test/Fir/CUDA/cuda-managed-descriptor-component.fir

  Log Message:
  -----------
  [flang][cuda] Size managed globals with descriptor components via LLVM Type (#209577)

When we do `-cuda -gpu=unified` (or `managed`) on a derived type with an
allocatable/pointer component, recent change
https://github.com/llvm/llvm-project/pull/209292 implicitly
attributed the component making lowering place the enclosing
derived-type global
in CUF managed memory. `CUFAddConstructor` then sizes that global via
`getTypeSizeAndAlignmentOrCrash`, which has no case for the descriptor
component
(`!fir.box<...>`) and aborts.

With this change, instead of aborting, we fall back to converting the
global to its LLVM type which
inlines the fixed-size descriptors, and query the data layout.



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