[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 13:35:43 PDT 2022


MaskRay added inline comments.


================
Comment at: clang/test/Misc/backend-resource-limit-diagnostics.hip:2
+// 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
+
----------------
paulkirth wrote:
> arsenm wrote:
> > arsenm wrote:
> > > paulkirth wrote:
> > > > Is this planned for this patch? or for future refactoring in multiple tests?
> > > I'm not sure. I currently cannot comprehend why this flag exists. It's only used in a handful of tests, and its effect seems to be to just create an edge case to crash codegen when there's no target streamer
> > A little more digging suggests this is a feature that is only properly implemented for 5/24 targets. Still don't really see the point 
> I think it's ideal for testing diagnostics in the backend,  where you need codegen to occur but the actual output is unnecessary. IIUC this flag allows you to avoid using a non-portable way to throw away the output instead of redirecting to `/dev/null`.  
`FIXME:` looks like an unused check prefix. Drop `:`


================
Comment at: clang/test/Misc/backend-resource-limit-diagnostics.hip:13
+
+// CHECK: error: <stdin>:[[@LINE-5]]:0: local memory (480000) exceeds limit (65536) in function '_Z12use_huge_ldsIiEvv'
+ template
----------------
`[[@LINE-5]]` uses deprecated syntax. Use `[[#@LINE-5]]`


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

https://reviews.llvm.org/D136954



More information about the llvm-commits mailing list