[OpenMP][Plugin] Update the global address calculation
authorShilei Tian <i@tianshilei.me>
Sun, 23 Jul 2023 21:40:52 +0000 (17:40 -0400)
committerShilei Tian <i@tianshilei.me>
Sun, 23 Jul 2023 21:41:06 +0000 (17:41 -0400)
commit763fdb1ffa31dda85d27bfdd4940e62ab560734f
tree05b9418104cc437b8c84bf8a280efae7d2984302
parent5da317a79e3e53f17c6d356361807df1d16a0b66
[OpenMP][Plugin] Update the global address calculation

Current global address caculation doesn't work for AMDGPU in some cases (https://reviews.llvm.org/D142569#4506212).
The root cause is the `sh_addr` is not substracted when caculating the address.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D155886
openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
openmp/libomptarget/plugins-nextgen/common/PluginInterface/GlobalHandler.cpp