[PATCH] D139730: [OpenMP][DeviceRTL][AMDGPU] Support code object version 5

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 4 12:24:36 PDT 2023


jhuber6 added a comment.

In D139730#4561573 <https://reviews.llvm.org/D139730#4561573>, @arsenm wrote:

> In D139730#4561540 <https://reviews.llvm.org/D139730#4561540>, @jhuber6 wrote:
>
>> Could you explain briefly what the approach here is? I'm confused as to what's actually changed and how we're handling this difference. I thought if this was just the definition of some builtin function we could just rely on the backend to figure it out. Why do we need to know the code object version inside the device RTL?
>
> The build is called in the device rtl, so the device RTL needs to contain both implementations. The "backend figuring it out" is dead code elimination

Okay, do we expect to re-use this interface anywhere? If it's just for OpenMP then we should probably copy the approach taken for `__omp_rtl_debug_kind`, which is a global created on the GPU by `CGOpenMPRuntimeGPU`'s constructor and does more or less the same thing.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139730



More information about the cfe-commits mailing list