[all-commits] [llvm/llvm-project] 839591: [Flang] - Handle `BoxCharType` in `fir.box_offset`...

Pranav Bhandarkar via All-commits all-commits at lists.llvm.org
Fri Jun 6 08:48:29 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 839591289592ea79be035f814ac75ba6c6b0fba4
      https://github.com/llvm/llvm-project/commit/839591289592ea79be035f814ac75ba6c6b0fba4
  Author: Pranav Bhandarkar <pranav.bhandarkar at amd.com>
  Date:   2025-06-06 (Fri, 06 Jun 2025)

  Changed paths:
    M flang/include/flang/Optimizer/Dialect/FIROps.td
    M flang/lib/Optimizer/CodeGen/CodeGen.cpp
    M flang/lib/Optimizer/Dialect/FIROps.cpp
    M flang/lib/Optimizer/Dialect/FIRType.cpp
    M flang/test/Fir/box-offset-codegen.fir
    M flang/test/Fir/box-offset.fir
    M flang/test/Fir/invalid.fir

  Log Message:
  -----------
  [Flang] - Handle `BoxCharType` in `fir.box_offset` op (#141713)

To map `fir.boxchar` types reliably onto an offload target, such as a
GPU, the `omp.map.info` operation is used to map the underlying data
pointer (`fir.ref<fir.char<k, ?>>`) wrapped by the `fir.boxchar` MLIR
value. The `omp.map.info` operation needs a pointer to the underlying
data pointer.
Given a reference to a descriptor (`fir.box`), the `fir.box_offset` is
used to obtain the address of the underlying data pointer. This PR
extends `fir.box_offset` to provide the same functionality for
`fir.boxchar` as well.



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