1 ; RUN: llc < %s -mtriple=arm64-apple-ios7.0 -pass-remarks-analysis=asm-printer \
2 ; RUN: --debugify-and-strip-all-safe=0 \
3 ; RUN: -verify-machineinstrs \
4 ; RUN: -pass-remarks-with-hotness=1 -asm-verbose=0 \
5 ; RUN: -debug-only=lazy-machine-block-freq,block-freq \
6 ; RUN: -debug-pass=Executions 2>&1 | FileCheck %s -check-prefix=HOTNESS
8 ; RUN: llc < %s -mtriple=arm64-apple-ios7.0 -pass-remarks-analysis=asm-printer \
9 ; RUN: --debugify-and-strip-all-safe=0 \
10 ; RUN: -verify-machineinstrs \
11 ; RUN: -pass-remarks-with-hotness=0 -asm-verbose=0 \
12 ; RUN: -debug-only=lazy-machine-block-freq,block-freq \
13 ; RUN: -debug-pass=Executions 2>&1 | FileCheck %s -check-prefix=NO_HOTNESS
18 ; Verify that we don't new populate MachineBFI for passes that already use
19 ; MBFI, e.g. GreedyRegAlloc. (This hard-codes the previous pass to the
20 ; GreedyRegAlloc, please adjust accordingly.)
22 ; HOTNESS: Executing Pass 'Spill Code Placement Analysis'
23 ; HOTNESS-NEXT: Executing Pass 'Lazy Machine Block Frequency Analysis'
24 ; HOTNESS-NEXT: Executing Pass 'Machine Optimization Remark Emitter'
25 ; HOTNESS-NEXT: MachineBlockFrequencyInfo is available
26 ; HOTNESS-NEXT: Executing Pass 'Greedy Register Allocator'
29 ; Verify that we only populate MachineBFI on behalf of ORE when hotness is
30 ; requested. (This hard-codes the previous pass to the Assembly Printer,
31 ; please adjust accordingly.)
33 ; HOTNESS: Freeing Pass 'Machine Outliner'
34 ; HOTNESS-NEXT: Executing Pass 'Function Pass Manager'
35 ; HOTNESS-NEXT: Executing Pass 'Verify generated machine code'
36 ; HOTNESS-NEXT: Freeing Pass 'Verify generated machine code'
37 ; HOTNESS-NEXT: Executing Pass 'Branch relaxation pass' on Function 'empty_func'
38 ; HOTNESS-NEXT: Freeing Pass 'Branch relaxation pass' on Function 'empty_func'
39 ; HOTNESS-NEXT: Executing Pass 'Verify generated machine code'
40 ; HOTNESS-NEXT: Freeing Pass 'Verify generated machine code'
41 ; HOTNESS-NEXT: Executing Pass 'AArch64 Compress Jump Tables' on Function 'empty_func'
42 ; HOTNESS-NEXT: Freeing Pass 'AArch64 Compress Jump Tables' on Function 'empty_func'
43 ; HOTNESS-NEXT: Executing Pass 'Verify generated machine code'
44 ; HOTNESS-NEXT: Freeing Pass 'Verify generated machine code'
45 ; HOTNESS-NEXT: Executing Pass 'Insert CFI remember/restore state instructions' on Function 'empty_func'
46 ; HOTNESS-NEXT: Freeing Pass 'Insert CFI remember/restore state instructions' on Function 'empty_func'
47 ; HOTNESS-NEXT: Executing Pass 'Verify generated machine code'
48 ; HOTNESS-NEXT: Freeing Pass 'Verify generated machine code'
49 ; HOTNESS: Executing Pass 'Unpack machine instruction bundles'
50 ; HOTNESS-NEXT: Freeing Pass 'Unpack machine instruction bundles'
51 ; HOTNESS-NEXT: Executing Pass 'Verify generated machine code'
52 ; HOTNESS-NEXT: Freeing Pass 'Verify generated machine code'
53 ; HOTNESS-NEXT: Executing Pass 'Lazy Machine Block Frequency Analysis'
54 ; HOTNESS-NEXT: Executing Pass 'Machine Optimization Remark Emitter'
55 ; HOTNESS-NEXT: Building MachineBlockFrequencyInfo on the fly
56 ; HOTNESS-NEXT: Building LoopInfo on the fly
57 ; HOTNESS-NEXT: Building DominatorTree on the fly
58 ; HOTNESS-NOT: Executing Pass
59 ; HOTNESS: block-frequency: empty_func
60 ; HOTNESS-NOT: Executing Pass
61 ; HOTNESS: Executing Pass 'AArch64 Assembly Printer'
63 ; HOTNESS: arm64-summary-remarks.ll:5:0: 1 instructions in function (hotness: 33)
66 ; NO_HOTNESS: Freeing Pass 'Machine Outliner'
67 ; NO_HOTNESS-NEXT: Executing Pass 'Function Pass Manager'
68 ; NO_HOTNESS-NEXT: Executing Pass 'Verify generated machine code'
69 ; NO_HOTNESS-NEXT: Freeing Pass 'Verify generated machine code'
70 ; NO_HOTNESS-NEXT: Executing Pass 'Branch relaxation pass' on Function 'empty_func'
71 ; NO_HOTNESS-NEXT: Freeing Pass 'Branch relaxation pass' on Function 'empty_func'
72 ; NO_HOTNESS-NEXT: Executing Pass 'Verify generated machine code'
73 ; NO_HOTNESS-NEXT: Freeing Pass 'Verify generated machine code'
74 ; NO_HOTNESS-NEXT: Executing Pass 'AArch64 Compress Jump Tables' on Function 'empty_func'
75 ; NO_HOTNESS-NEXT: Freeing Pass 'AArch64 Compress Jump Tables' on Function 'empty_func'
76 ; NO_HOTNESS-NEXT: Executing Pass 'Verify generated machine code'
77 ; NO_HOTNESS-NEXT: Freeing Pass 'Verify generated machine code'
78 ; NO_HOTNESS-NEXT: Executing Pass 'Insert CFI remember/restore state instructions' on Function 'empty_func'
79 ; NO_HOTNESS-NEXT: Freeing Pass 'Insert CFI remember/restore state instructions' on Function 'empty_func'
80 ; NO_HOTNESS-NEXT: Executing Pass 'Verify generated machine code'
81 ; NO_HOTNESS-NEXT: Freeing Pass 'Verify generated machine code'
82 ; NO_HOTNESS: Executing Pass 'Unpack machine instruction bundles'
83 ; NO_HOTNESS-NEXT: Freeing Pass 'Unpack machine instruction bundles'
84 ; NO_HOTNESS-NEXT: Executing Pass 'Verify generated machine code'
85 ; NO_HOTNESS-NEXT: Freeing Pass 'Verify generated machine code'
86 ; NO_HOTNESS-NEXT: Executing Pass 'Lazy Machine Block Frequency Analysis'
87 ; NO_HOTNESS-NEXT: Executing Pass 'Machine Optimization Remark Emitter'
88 ; NO_HOTNESS-NEXT: Executing Pass 'AArch64 Assembly Printer'
90 ; NO_HOTNESS: arm64-summary-remarks.ll:5:0: 1 instructions in function{{$}}
92 define void @empty_func() nounwind ssp !dbg !3 !prof !4 {
97 !llvm.module.flags = !{!2}
99 !0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1)
100 !1 = !DIFile(filename: "arm64-summary-remarks.ll", directory: "")
101 !2 = !{i32 2, !"Debug Info Version", i32 3}
102 !3 = distinct !DISubprogram(name: "empty_func", scope: !1, file: !1, line: 5, scopeLine: 5, unit: !0)
103 !4 = !{!"function_entry_count", i64 33}