[all-commits] [llvm/llvm-project] 6a9504: [OpenMP][MLIR] Add OpenMP version attribute to OMP...
Dominik Adamski via All-commits
all-commits at lists.llvm.org
Fri May 19 03:40:52 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6a950422f3bcaf91b26ce6436c6658e503c5c87b
https://github.com/llvm/llvm-project/commit/6a950422f3bcaf91b26ce6436c6658e503c5c87b
Author: Dominik Adamski <dominik.adamski at amd.com>
Date: 2023-05-19 (Fri, 19 May 2023)
Changed paths:
M flang/include/flang/Tools/CrossToolHelpers.h
M mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
M mlir/include/mlir/Dialect/OpenMP/OpenMPOpsInterfaces.td
M mlir/test/Dialect/OpenMP/attr.mlir
Log Message:
-----------
[OpenMP][MLIR] Add OpenMP version attribute to OMP OffloadModuleInterface
The intent of OpenMP version attribute is to be applied to a module
and then hold information on OpenMP version flag.
Information about OpenMP version can be specified in Clang
by flag -fopenmp-version and it is stored in LLVM-IR module metadata:
!llvm.module.flags = !{!0, !1}
!0 = !{i32 7, !"openmp", i32 51}
!1 = !{i32 7, !"openmp-device", i32 51}
OpenMP MLIR version attributes will allow to lower Flang frontend flag
to OpenMP MLIR code and then to LLVM IR.
There are two OpenMP MLIR version attributes. The first one "omp.version"
MLIR attribute corresponds to host OpenMP version. The second one
corresponds to "openmp-device" LLVM-IR metadata. "openmp-device" LLVM-IR
metadata is attached only for offloaded code.
Differential Revision: https://reviews.llvm.org/D150351
Reviewed By: kiranchandramohan
More information about the All-commits
mailing list