[openmp][nfc] Replace OMPGridValues array with struct
authorJon Chesterfield <jonathanchesterfield@gmail.com>
Thu, 19 Aug 2021 12:25:41 +0000 (13:25 +0100)
committerJon Chesterfield <jonathanchesterfield@gmail.com>
Thu, 19 Aug 2021 12:25:42 +0000 (13:25 +0100)
commit77579b99e9ce1638ca696fa7c3872ae8668d997d
tree63145c4cba6cf6023c79eb32a6abaf4fab27dda8
parentd1aa075129a94232bce6d47306f8c719ceef9142
[openmp][nfc] Replace OMPGridValues array with struct

[nfc] Replaces enum indices into an array with a struct. Named the
fields to match the enum, leaves memory layout and initialization unchanged.

Motivation is to later safely remove dead fields and replace redundant ones
with (compile time) computation. It should also be possible to factor some
common fields into a base and introduce a gfx10 amdgpu instance with less
duplication than the arrays of integers require.

Reviewed By: ronlieb

Differential Revision: https://reviews.llvm.org/D108339
clang/include/clang/Basic/TargetInfo.h
clang/lib/Basic/Targets/AMDGPU.cpp
clang/lib/Basic/Targets/NVPTX.cpp
clang/lib/CodeGen/CGOpenMPRuntimeAMDGCN.cpp
clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp
clang/lib/CodeGen/CGOpenMPRuntimeGPU.h
llvm/include/llvm/Frontend/OpenMP/OMPGridValues.h
openmp/libomptarget/plugins/amdgpu/src/rtl.cpp