[OpenMP] [OMPIRBuilder] Create a new datatype to hold the unique target region info
authorJan Sjodin <jan_sjodin@yahoo.com>
Fri, 28 Oct 2022 17:54:59 +0000 (13:54 -0400)
committerJan Sjodin <jan_sjodin@yahoo.com>
Mon, 31 Oct 2022 14:49:44 +0000 (10:49 -0400)
commit67f8521cd4b6a3bd23263ad21bd6841081fd084f
tree0410da32cbb9ec0debff849aff8aa6bb5054a803
parentb923c15d3c00c78a7b9258e79755df9587e1f0b1
[OpenMP] [OMPIRBuilder] Create a new datatype to hold the unique target region info

Re-apply of: 3d0e9edd8e53fb72e85084f4170513159212839a
Reverted in: 0cb65b0a585c8b3d4a8a2aefe994a8fc907934f8

A function parameter was using the wrong type 'llvm::TargetRegion' instead of
'const llvm:: TargetRegion&', which caused the error in the address sanitizer.
The correct type is now used.

This patch puts the individual target region information attributes into a
struct so that the nested mappings are not needed and passing the information
around is simplified.

Reviewed By: jdoerfert, mikerice

Differential Revision: https://reviews.llvm.org/D136601
clang/lib/CodeGen/CGOpenMPRuntime.cpp
clang/test/OpenMP/declare_target_codegen.cpp
clang/test/OpenMP/nvptx_declare_target_var_ctor_dtor_codegen.cpp
llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp