[llvm] 8ab9eeb - [Pseudo Probe] Add the test for probe desc

via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 24 12:43:39 PDT 2023


Author: wlei
Date: 2023-03-24T12:43:16-07:00
New Revision: 8ab9eebb1897ab96f0a8f5bc5430f4039e38e6f8

URL: https://github.com/llvm/llvm-project/commit/8ab9eebb1897ab96f0a8f5bc5430f4039e38e6f8
DIFF: https://github.com/llvm/llvm-project/commit/8ab9eebb1897ab96f0a8f5bc5430f4039e38e6f8.diff

LOG: [Pseudo Probe] Add the test for probe desc

Added a test to https://reviews.llvm.org/D146657, make sure the guid and name are computed using the debug info name.

Reviewed By: hoy, wenlei

Differential Revision: https://reviews.llvm.org/D146826

Added: 
    llvm/test/Transforms/SampleProfile/pseudo-probe-desc-guid.ll

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/SampleProfile/pseudo-probe-desc-guid.ll b/llvm/test/Transforms/SampleProfile/pseudo-probe-desc-guid.ll
new file mode 100644
index 0000000000000..68bf54f2ebd79
--- /dev/null
+++ b/llvm/test/Transforms/SampleProfile/pseudo-probe-desc-guid.ll
@@ -0,0 +1,31 @@
+; REQUIRES: x86_64-linux
+; RUN: opt < %s -passes=pseudo-probe -S -o - | FileCheck %s
+
+; CHECK: ![[#]] = !{i64 -3345296970173352005, i64 [[#]], !"foo.dbg"}
+; CHECK-NOT: ![[#]] = !{i64 6699318081062747564, i64 [[#]], !"foo"}
+
+; Function Attrs: noinline nounwind optnone uwtable
+define dso_local void @foo() #0 !dbg !8 {
+entry:
+  ret void, !dbg !12
+}
+
+attributes #0 = { noinline nounwind optnone uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
+
+!llvm.dbg.cu = !{!0}
+!llvm.module.flags = !{!2, !3, !4, !5, !6}
+!llvm.ident = !{!7}
+
+!0 = distinct !DICompileUnit(language: DW_LANG_C11, file: !1, producer: "clang version 17.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None)
+!1 = !DIFile(filename: "test.c", directory: "")
+!2 = !{i32 7, !"Dwarf Version", i32 5}
+!3 = !{i32 2, !"Debug Info Version", i32 3}
+!4 = !{i32 1, !"wchar_size", i32 4}
+!5 = !{i32 7, !"uwtable", i32 2}
+!6 = !{i32 7, !"frame-pointer", i32 2}
+!7 = !{!"clang version 17.0.0 "}
+!8 = distinct !DISubprogram(name: "foo.dbg", scope: !1, file: !1, line: 1, type: !9, scopeLine: 1, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !11)
+!9 = !DISubroutineType(types: !10)
+!10 = !{null}
+!11 = !{}
+!12 = !DILocation(line: 1, column: 13, scope: !8)


        


More information about the llvm-commits mailing list