[llvm] [KernelInfo] Implement new LLVM IR pass for GPU code analysis (PR #102944)
Joel E. Denny via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 14 13:27:04 PDT 2024
================
@@ -0,0 +1,78 @@
+; Check info on allocas.
+
+; RUN: opt -pass-remarks=kernel-info -passes=kernel-info \
+; RUN: -disable-output %s 2>&1 | \
+; RUN: FileCheck -match-full-lines %s
+
+target datalayout = "e-i64:64-i128:128-v16:16-v32:32-n16:32:64"
+target triple = "nvptx64-nvidia-cuda"
+
+define void @h() !dbg !3 {
+entry:
+ ; CHECK: remark: test.c:0:0: in artificial function 'h', artificial alloca 'dyn_ptr' with static size of 8 bytes
----------------
jdenny-ornl wrote:
This test makes sure that functions marked as artificial in metadata are reported that way. It's been a while, but my recollection is I started with IR generated by clang, ran it through llvm-reduce, and then further reduced it by hand.
What are you objecting to? Do you want the test function to look more like an artificial function in some way? Do you want artificial functions not to be called out by kernel-info?
https://github.com/llvm/llvm-project/pull/102944
More information about the llvm-commits
mailing list