[all-commits] [llvm/llvm-project] 4b15c0: [Flang][HLFIR][OpenMP] Fix offloading tests broken...
Sergio Afonso via All-commits
all-commits at lists.llvm.org
Mon Oct 23 08:41:08 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4b15c0ed0a5d5804ecd68bf44efce9277f15a4d7
https://github.com/llvm/llvm-project/commit/4b15c0ed0a5d5804ecd68bf44efce9277f15a4d7
Author: Sergio Afonso <safonsof at amd.com>
Date: 2023-10-23 (Mon, 23 Oct 2023)
Changed paths:
M flang/lib/Optimizer/Transforms/OMPEarlyOutlining.cpp
M flang/test/Lower/OpenMP/FIR/array-bounds.f90
R flang/test/Lower/OpenMP/FIR/declare-target-implicit-tarop-cap.f90
R flang/test/Lower/OpenMP/FIR/function-filtering-2.f90
R flang/test/Lower/OpenMP/FIR/function-filtering.f90
A flang/test/Lower/OpenMP/declare-target-implicit-tarop-cap.f90
A flang/test/Lower/OpenMP/function-filtering-2.f90
A flang/test/Lower/OpenMP/function-filtering.f90
M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
Log Message:
-----------
[Flang][HLFIR][OpenMP] Fix offloading tests broken by HLFIR (#69457)
This patch makes changes to the early outlining pass to avoid compiler
crashes due to not handling `hlfir.declare` operations correctly. That
pass is intended to eventually be removed (#67319), but in the meantime
this fixes some issues arising in different parts of the OpenMP
offloading compilation process.
The main changes included in this patch are the following:
- Added support for mapped values defined by an `hlfir.declare`
operation. These operations are now kept in outlined target functions,
so that both of their outputs (base and original base) are available to
the corresponding `omp.target`'s map arguments and region.
- Added a fix by @agozillon to prevent unused map clauses from producing
a compiler crash. All these unused mapped variables are added to the
outlined function's inputs.
- Added a fix to the OpenMP translation to MLIR to support integer
arguments to these outlined functions. This enables successfully
compiling and running the tests in
opemp/libomptarget/test/offloading/fortran using HLFIR.
Co-authored-by: agozillon <Andrew.Gozillon at amd.com>
More information about the All-commits
mailing list