[llvm-branch-commits] [llvm] [Offload] Add `olGetGlobalVariable` (PR #147944)

2025-07-10 Thread Ross Brunton via llvm-branch-commits
RossBrunton wrote: @jhuber6 I'm not sure that's possible generically. The AMD backend at least needs to mangle kernel names to add ".kd" on the end, so we'd need to know ahead of time whether it's a kernel or not. However, `olGetSymbol` could work if we pass in the symbol kind as a parameter,

[llvm-branch-commits] [llvm] [Offload] Add `olGetGlobalVariable` (PR #147944)

2025-07-10 Thread Joseph Huber via llvm-branch-commits
https://github.com/jhuber6 commented: Debating whether or not we should just have `olGetSymbol` and let the user assume whether or not it's a kernel and let them use the info to verify if they're unsure. https://github.com/llvm/llvm-project/pull/147944 _

[llvm-branch-commits] [llvm] [Offload] Add `olGetGlobalVariable` (PR #147944)

2025-07-10 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-offload Author: Ross Brunton (RossBrunton) Changes Looks up a global variable as a symbol --- Full diff: https://github.com/llvm/llvm-project/pull/147944.diff 6 Files Affected: - (modified) offload/liboffload/API/Symbol.td (+15) - (modified) offloa

[llvm-branch-commits] [llvm] [Offload] Add `olGetGlobalVariable` (PR #147944)

2025-07-10 Thread Ross Brunton via llvm-branch-commits
https://github.com/RossBrunton created https://github.com/llvm/llvm-project/pull/147944 Looks up a global variable as a symbol >From de96f4311a866a3277086df3441c4c72a81970ce Mon Sep 17 00:00:00 2001 From: Ross Brunton Date: Thu, 10 Jul 2025 12:53:30 +0100 Subject: [PATCH] [Offload] Add `olGet