[PATCH] D142569: [OpenMP] Introduce kernel environment

Shilei Tian via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 17 07:57:21 PDT 2023


tianshilei1992 added a comment.

For AMDGPU it is something in the linker. If I directly read the struct from `.o` file, the value is correct, but if I read from `.img` which is generated by `lld`, then the value is messy/random.

  @__omp_offloading_32_71401f4c_main_l12_dynamic_environment = internal addrspace(1) global %struct.DynamicEnvironmentTy zeroinitializer
  @__omp_offloading_32_71401f4c_main_l12_kernel_environment = local_unnamed_addr addrspace(1) constant %struct.KernelEnvironmentTy { %struct.ConfigurationEnvironmentTy { i8 1, i8 1, i8 1 }, ptr addrspacecast (ptr addrspace(1) @1 to ptr), ptr addrspacecast (ptr addrspace(1) @__omp_offloading_32_71401f4c_main_l12_dynamic_environment to ptr) }

Does the linkage of the global `__omp_offloading_32_71401f4c_main_l12_kernel_environment` look suspicious?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142569/new/

https://reviews.llvm.org/D142569



More information about the llvm-commits mailing list