[all-commits] [llvm/llvm-project] d41d83: [Flang][MLIR][OpenMP] Add distinct var_ptr_ptr_typ...

agozillon via All-commits all-commits at lists.llvm.org
Wed Mar 4 19:51:40 PST 2026


  Branch: refs/heads/users/agozillo/attach-map-pr-set-2
  Home:   https://github.com/llvm/llvm-project
  Commit: d41d83b55806566eda807e9ea3a30e243dc078dc
      https://github.com/llvm/llvm-project/commit/d41d83b55806566eda807e9ea3a30e243dc078dc
  Author: agozillon <Andrew.Gozillon at amd.com>
  Date:   2026-03-04 (Wed, 04 Mar 2026)

  Changed paths:
    M flang/lib/Optimizer/OpenMP/AutomapToTargetData.cpp
    M flang/lib/Optimizer/OpenMP/LowerWorkdistribute.cpp
    M flang/lib/Optimizer/OpenMP/MapInfoFinalization.cpp
    M flang/lib/Optimizer/OpenMP/MapsForPrivatizedSymbols.cpp
    M flang/lib/Utils/OpenMP.cpp
    M flang/test/Analysis/AliasAnalysis/alias-analysis-omp-target-1.fir
    M flang/test/Fir/OpenMP/bounds-generation-for-char-arrays.f90
    M flang/test/Fir/convert-to-llvm-openmp-and-fir.fir
    M flang/test/Lower/OpenMP/DelayedPrivatization/target-private-allocatable.f90
    M flang/test/Lower/OpenMP/DelayedPrivatization/target-private-multiple-variables.f90
    M flang/test/Lower/OpenMP/DelayedPrivatization/target-teams-private-implicit-scalar-map.f90
    M flang/test/Lower/OpenMP/allocatable-array-bounds.f90
    M flang/test/Lower/OpenMP/allocatable-map.f90
    M flang/test/Lower/OpenMP/array-bounds.f90
    M flang/test/Lower/OpenMP/declare-mapper.f90
    M flang/test/Lower/OpenMP/defaultmap.f90
    M flang/test/Lower/OpenMP/derived-type-allocatable-map.f90
    M flang/test/Lower/OpenMP/derived-type-map.f90
    M flang/test/Lower/OpenMP/has_device_addr-mapinfo.f90
    M flang/test/Lower/OpenMP/map-character.f90
    M flang/test/Lower/OpenMP/map-descriptor-deferral.f90
    M flang/test/Lower/OpenMP/map-neg-alloca-derived-type-array.f90
    M flang/test/Lower/OpenMP/optional-argument-map-2.f90
    M flang/test/Lower/OpenMP/optional-argument-map-3.f90
    M flang/test/Lower/OpenMP/target-enter-data-default-openmp52.f90
    M flang/test/Lower/OpenMP/target.f90
    M flang/test/Lower/volatile-openmp.f90
    M flang/test/Transforms/OpenMP/conversion-declare-mapper.mlir
    M flang/test/Transforms/OpenMP/function-filtering-host-ops.mlir
    M flang/test/Transforms/omp-map-info-finalization.fir
    M mlir/include/mlir/Dialect/OpenMP/OpenMPEnums.td
    M mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
    M mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
    M mlir/lib/Dialect/OpenMP/Transforms/OpenMPOffloadPrivatizationPrepare.cpp
    M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
    M mlir/test/Dialect/OpenMP/invalid.mlir
    M mlir/test/Dialect/OpenMP/omp-offload-privatization-prepare-by-value.mlir
    M mlir/test/Dialect/OpenMP/omp-offload-privatization-prepare.mlir
    M mlir/test/Dialect/OpenMP/ops.mlir
    M mlir/test/Target/LLVMIR/allocatable_gpu_reduction.mlir
    M mlir/test/Target/LLVMIR/allocatable_gpu_reduction_teams.mlir
    M mlir/test/Target/LLVMIR/omptarget-data-use-dev-ordering.mlir
    M mlir/test/Target/LLVMIR/omptarget-memcpy-align-metadata.mlir
    M mlir/test/Target/LLVMIR/omptarget-nested-ptr-record-type-mapping-host.mlir
    M mlir/test/Target/LLVMIR/omptarget-nowait.mlir
    M mlir/test/Target/LLVMIR/omptarget-nullary-record-ptr-member-map.mlir
    M mlir/test/Target/LLVMIR/omptarget-record-type-with-ptr-member-host.mlir

  Log Message:
  -----------
  [Flang][MLIR][OpenMP] Add distinct var_ptr_ptr_type to omp.map.info operations & remove ref_ptr_ptee

This is a precursor patch to attach and ref_ptr/ptee mapping that I intend to upstream
over the next few weeks. The attach maps require both the type of the descriptor and
the pointed to data to calculate the appropriate offload/base pointers and size. In
the base case of ref_ptr_ptee all of this information can be gathered from the pointer
and pointee maps, but in cases where we have only one (i.e. ref_ptr/ref_ptee) we will
be missing one of the key elements required to create an corresponding attach map.

So, this PR basically adds the ability to ferry around the type of both var_ptr and
var_ptr_ptr as opposed to just var_ptr, then we can emit attach maps as seperate
map.info's that carry all the pre-requisite informaion for lowering to LLVM-IR. But,
otherwise it seems reasonable to have var_ptr_ptr mirror var_ptr in all aspects for
consistency.

It also removes ref_ptr_ptee, instead opting to use the setting of both ref_ptr and
ref_ptee to mean ref_ptr_ptee.



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