[PATCH] D136954: DiagnosticInfo: Report function location for resource limits

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 28 14:03:17 PDT 2022


MaskRay accepted this revision.
MaskRay added a comment.

LGTM.



================
Comment at: clang/test/Misc/backend-resource-limit-diagnostics.hip:1
+// RUN: not %clang_cc1 -debug-info-kind=standalone -triple amdgcn-amd-amdhsa -target-cpu gfx906 -x hip -fcuda-is-device -S -o /dev/null < %s 2>&1 | FileCheck %s
+// FIXME: Use -emit-codegen-only
----------------
MaskRay wrote:
> paulkirth wrote:
> > Does this need  `// REQUIRES: amdgpu-registered-target`, like the test in `backend-resourse-limit-diagnostics.cl`?
> `-emit-codegen-only` is preferred to `-S -o /dev/null`
Ignore me. I assume that the object MC backend isn't available. `-S -o /dev/null` looks fine.


================
Comment at: clang/test/Misc/backend-resource-limit-diagnostics.hip:9
+__global__ void use_huge_lds() {
+    volatile __shared__ T huge[120000];
+    huge[0] = 2;
----------------
2-space indentation is more common


================
Comment at: clang/test/Misc/backend-resource-limit-diagnostics.hip:14
+// CHECK: error: <stdin>:[[@LINE-5]]:0: local memory (480000) exceeds limit (65536) in function '_Z12use_huge_ldsIiEvv'
+ template
+ __global__ void use_huge_lds<int>();
----------------
Unintended indentation


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

https://reviews.llvm.org/D136954



More information about the llvm-commits mailing list