[PATCH] D104667: Improve the diagnostic of DiagnosticInfoResourceLimit (and warn-stack-size in particular)

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 21 15:55:42 PDT 2021


MaskRay added inline comments.


================
Comment at: clang/test/Misc/backend-resource-limit-diagnostics.cl:4
 
-// CHECK: error: local memory limit exceeded (480000) in use_huge_lds
+// CHECK: error: local memory (480000) exceeds limit in function 'use_huge_lds'
 kernel void use_huge_lds()
----------------
nickdesaulniers wrote:
> The value of the limit is still not printed though.
> 
> Oh, we don't print `(0)` if the limit is `0`? Perhaps add a `--check-prefix` and additional `RUN` line that exercises a non-zero limit from the frontend?
0 means the diagnostic does not convey the limit information. It needs more refactoring to make this happen... and probably should not be the job of this patch...


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104667



More information about the llvm-commits mailing list