Skip to content

Commit

Permalink
AMDGPU: Diagnose which LDS global failed to lower
Browse files Browse the repository at this point in the history
Also lowercase the message to start since that seems to be the
prevailing convention for error messages.
  • Loading branch information
arsenm committed Jan 3, 2023
1 parent f3a113f commit 6fed2c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
Expand Up @@ -721,8 +721,9 @@ class AMDGPULowerModuleLDS : public ModulePass {
if (K.second.size() == 1) {
KernelAccessVariables.insert(GV);
} else {
report_fatal_error("Cannot lower LDS to kernel access as it is "
"reachable from multiple kernels");
report_fatal_error(
"cannot lower LDS '" + GV->getName() +
"' to kernel access as it is reachable from multiple kernels");
}
break;

Expand Down
Expand Up @@ -36,7 +36,7 @@ define amdgpu_kernel void @k1() {
;; Function accesses variable, reachable from two kernels, can't use kernel lowering for either
;; Hybrid can put it in module lds without cost as the first variable is free

; KERNEL: LLVM ERROR: Cannot lower LDS to kernel access as it is reachable from multiple kernels
; KERNEL: LLVM ERROR: cannot lower LDS 'function.lds' to kernel access as it is reachable from multiple kernels

@function.lds = addrspace(3) global i16 undef
define void @f0() {
Expand Down

0 comments on commit 6fed2c9

Please sign in to comment.