blob: 79cf990084336f785f731cbd1249d7a1395d0fd9 [file] [log] [blame]
Adam Nemetf373e682017-02-24 01:22:55 +00001; RUN: llc < %s -mtriple=arm64-apple-ios7.0 -pass-remarks-analysis=asm-printer \
Jessica Paquettebbcc8892018-07-30 17:13:25 +00002; RUN: -verify-machineinstrs \
Adam Nemetf373e682017-02-24 01:22:55 +00003; RUN: -pass-remarks-with-hotness=1 -asm-verbose=0 \
4; RUN: -debug-only=lazy-machine-block-freq,block-freq \
5; RUN: -debug-pass=Executions 2>&1 | FileCheck %s -check-prefix=HOTNESS
6
7; RUN: llc < %s -mtriple=arm64-apple-ios7.0 -pass-remarks-analysis=asm-printer \
Jessica Paquettebbcc8892018-07-30 17:13:25 +00008; RUN: -verify-machineinstrs \
Adam Nemetf373e682017-02-24 01:22:55 +00009; RUN: -pass-remarks-with-hotness=0 -asm-verbose=0 \
10; RUN: -debug-only=lazy-machine-block-freq,block-freq \
11; RUN: -debug-pass=Executions 2>&1 | FileCheck %s -check-prefix=NO_HOTNESS
12
13; REQUIRES: asserts
14
15
16; Verify that we don't new populate MachineBFI for passes that already use
17; MBFI, e.g. GreedyRegAlloc. (This hard-codes the previous pass to the
18; GreedyRegAlloc, please adjust accordingly.)
19
20; HOTNESS: Executing Pass 'Spill Code Placement Analysis'
21; HOTNESS-NEXT: Executing Pass 'Lazy Machine Block Frequency Analysis'
22; HOTNESS-NEXT: Executing Pass 'Machine Optimization Remark Emitter'
23; HOTNESS-NEXT: MachineBlockFrequencyInfo is available
24; HOTNESS-NEXT: Executing Pass 'Greedy Register Allocator'
25
26
27; Verify that we only populate MachineBFI on behalf of ORE when hotness is
28; requested. (This hard-codes the previous pass to the Assembly Printer,
29; please adjust accordingly.)
30
Jessica Paquettef90edbe2018-07-27 20:18:27 +000031; HOTNESS: Freeing Pass 'Machine Outliner'
32; HOTNESS-NEXT: Executing Pass 'Function Pass Manager'
Jessica Paquettebbcc8892018-07-30 17:13:25 +000033; HOTNESS-NEXT: Executing Pass 'Verify generated machine code'
34; HOTNESS-NEXT: Freeing Pass 'Verify generated machine code'
35; HOTNESS-NEXT: Executing Pass 'Lazy Machine Block Frequency Analysis'
Adam Nemetf373e682017-02-24 01:22:55 +000036; HOTNESS-NEXT: Executing Pass 'Machine Optimization Remark Emitter'
37; HOTNESS-NEXT: Building MachineBlockFrequencyInfo on the fly
38; HOTNESS-NEXT: Building LoopInfo on the fly
39; HOTNESS-NEXT: Building DominatorTree on the fly
40; HOTNESS-NOT: Executing Pass
41; HOTNESS: block-frequency: empty_func
42; HOTNESS-NOT: Executing Pass
Michael Zolotukhin8d052a02018-04-09 00:54:47 +000043; HOTNESS: Executing Pass 'AArch64 Assembly Printer'
Adam Nemetf373e682017-02-24 01:22:55 +000044
45; HOTNESS: arm64-summary-remarks.ll:5:0: 1 instructions in function (hotness: 33)
46
47
Jessica Paquettef90edbe2018-07-27 20:18:27 +000048; NO_HOTNESS: Freeing Pass 'Machine Outliner'
49; NO_HOTNESS-NEXT: Executing Pass 'Function Pass Manager'
Jessica Paquettebbcc8892018-07-30 17:13:25 +000050; NO_HOTNESS-NEXT: Executing Pass 'Verify generated machine code'
51; NO_HOTNESS-NEXT: Freeing Pass 'Verify generated machine code'
52; NO_HOTNESS-NEXT: Executing Pass 'Lazy Machine Block Frequency Analysis'
Adam Nemetf373e682017-02-24 01:22:55 +000053; NO_HOTNESS-NEXT: Executing Pass 'Machine Optimization Remark Emitter'
Adam Nemetf373e682017-02-24 01:22:55 +000054; NO_HOTNESS-NEXT: Executing Pass 'AArch64 Assembly Printer'
55
56; NO_HOTNESS: arm64-summary-remarks.ll:5:0: 1 instructions in function{{$}}
57
58define void @empty_func() nounwind ssp !dbg !3 !prof !4 {
59 ret void
60}
61
62!llvm.dbg.cu = !{!0}
63!llvm.module.flags = !{!2}
64
65!0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1)
66!1 = !DIFile(filename: "arm64-summary-remarks.ll", directory: "")
67!2 = !{i32 2, !"Debug Info Version", i32 3}
68!3 = distinct !DISubprogram(name: "empty_func", scope: !1, file: !1, line: 5, scopeLine: 5, unit: !0)
69!4 = !{!"function_entry_count", i64 33}