Skip to content

Commit cf919dd

Browse files
Address comments.
1 parent 00eb087 commit cf919dd

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

llvm/test/Transforms/PGOProfile/memprof_annotate_yaml.test

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
; REQUIRES: x86_64-linux
2+
13
; Make sure that we can ingest the MemProf profile in YAML and
24
; annotate a call to new as cold.
35

4-
; REQUIRES: x86_64-linux
5-
66
; RUN: split-file %s %t
77
; RUN: llvm-profdata merge %t/memprof_annotate_yaml.yaml -o %t/memprof_annotate_yaml.memprofdata
88
; RUN: opt < %t/memprof_annotate_yaml.ll -passes='memprof-use<profile-filename=%t/memprof_annotate_yaml.memprofdata>' -S 2>&1 | FileCheck %s
@@ -16,6 +16,8 @@ HeapProfileRecords:
1616
- { Function: _Z3foov, LineOffset: 0, Column: 22, IsInlineFrame: false }
1717
- { Function: main, LineOffset: 2, Column: 5, IsInlineFrame: false }
1818
MemInfoBlock:
19+
# With these numbers, llvm::memprof::getAllocType will determine that
20+
# the call to new is cold. See MemoryProfileInfo.cpp for details.
1921
TotalSize: 400
2022
AllocCount: 1
2123
TotalLifetimeAccessDensity: 1
@@ -26,14 +28,14 @@ HeapProfileRecords:
2628
define dso_local ptr @_Z3foov() !dbg !4 {
2729
entry:
2830
%call = call ptr @_Znam(i64 4) #0, !dbg !5
29-
; CHECK: call ptr @_Znam(i64 4) [[ATTR:#[0-9]+]],
31+
; CHECK: call ptr @_Znam(i64 4) #[[ATTR:[0-9]+]],
3032
ret ptr %call
3133
}
3234

3335
declare ptr @_Znam(i64)
3436

3537
attributes #0 = { builtin allocsize(0) }
36-
; CHECK: attributes [[ATTR]] = {{.*}} "memprof"="cold"
38+
; CHECK: attributes #[[ATTR]] = {{.*}} "memprof"="cold"
3739

3840
!llvm.module.flags = !{!2, !3}
3941

0 commit comments

Comments
 (0)