brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.4 KiB · a9fc850 Raw
131 lines · plain
1; RUN: llc %s -enable-machine-outliner -mtriple=aarch64-unknown-unknown -pass-remarks=machine-outliner -pass-remarks-missed=machine-outliner -o /dev/null 2>&1 | FileCheck %s2; CHECK: <unknown>:0:0:3; CHECK-SAME: Did not outline 2 instructions from 2 locations.4; CHECK-SAME: Bytes from outlining all occurrences (16) >=5; CHECK-SAME: Unoutlined instruction bytes (16)6; CHECK-SAME: (Also found at: <UNKNOWN LOCATION>)7; CHECK: remark: <unknown>:0:0: Saved 40 bytes by outlining 13 instructions8; CHECK-SAME: from 2 locations. (Found at: <UNKNOWN LOCATION>,9; CHECK-SAME: <UNKNOWN LOCATION>)10; RUN: llc %s -enable-machine-outliner -mtriple=aarch64-unknown-unknown -o /dev/null -pass-remarks-missed=machine-outliner -pass-remarks-output=%t.yaml11; RUN: cat %t.yaml | FileCheck %s -check-prefix=YAML12 13; For the YAML case, the function we pick depends on the order of the candidate14; list.15; YAML: --- !Missed16; YAML-NEXT: Pass:            machine-outliner17; YAML-NEXT: Name:            NotOutliningCheaper18; YAML-NEXT: Function:19; YAML-NEXT: Args:20; YAML-NEXT:   - String:          'Did not outline '21; YAML-NEXT:   - Length:          '2'22; YAML-NEXT:   - String:          ' instructions'23; YAML-NEXT:   - String:          ' from '24; YAML-NEXT:   - NumOccurrences:  '2'25; YAML-NEXT:   - String:          ' locations.'26; YAML-NEXT:   - String:          ' Bytes from outlining all occurrences ('27; YAML-NEXT:   - OutliningCost:   '16'28; YAML-NEXT:   - String:          ')'29; YAML-NEXT:   - String:          ' >= Unoutlined instruction bytes ('30; YAML-NEXT:   - NotOutliningCost: '16'31; YAML-NEXT:   - String:          ')'32; YAML-NEXT:   - String:          ' (Also found at: '33; YAML-NEXT:   - OtherStartLoc1:  '<UNKNOWN LOCATION>'34; YAML-NEXT:   - String:          ')'35; YAML: --- !Passed36; YAML-NEXT: Pass:            machine-outliner37; YAML-NEXT: Name:            OutlinedFunction38; YAML-NEXT: Function:        OUTLINED_FUNCTION_039; YAML-NEXT: Args:40; YAML-NEXT:   - String:          'Saved '41; YAML-NEXT:   - OutliningBenefit: '40'42; YAML-NEXT:   - String:          ' bytes by '43; YAML-NEXT:   - String:          'outlining '44; YAML-NEXT:   - Length:          '13'45; YAML-NEXT:   - String:          ' instructions '46; YAML-NEXT:   - String:          'from '47; YAML-NEXT:   - NumOccurrences:  '2'48; YAML-NEXT:   - String:          ' locations. '49; YAML-NEXT:   - String:          '(Found at: '50; YAML-NEXT:   - StartLoc0:       '<UNKNOWN LOCATION>'51; YAML-NEXT:   - String:          ', '52; YAML-NEXT:   - StartLoc1:       '<UNKNOWN LOCATION>'53; YAML-NEXT:   - String:          ')'54 55define void @dog() #0 !dbg !8 {56entry:57  %x = alloca i32, align 458  %y = alloca i32, align 459  store i32 0, ptr %x, align 460  store i32 1, ptr %y, align 4, !dbg !1261  ret void62}63 64define void @cat() #0 !dbg !14 {65entry:66  %x = alloca i32, align 467  %y = alloca i32, align 468  store i32 0, ptr %x, align 469  store i32 1, ptr %y, align 4, !dbg !1670  ret void71}72 73define void @foo() #0 !dbg !18 {74  %1 = alloca i32, align 475  %2 = alloca i32, align 476  %3 = alloca i32, align 477  %4 = alloca i32, align 478  %5 = alloca i32, align 479  %6 = alloca i32, align 480  store i32 1, ptr %1, align 4, !dbg !2481  store i32 2, ptr %2, align 482  store i32 3, ptr %3, align 483  store i32 4, ptr %4, align 484  store i32 5, ptr %5, align 485  store i32 6, ptr %6, align 4, !dbg !2686  ret void87}88 89define void @bar() #0 !dbg !27 {90  %1 = alloca i32, align 491  %2 = alloca i32, align 492  %3 = alloca i32, align 493  %4 = alloca i32, align 494  %5 = alloca i32, align 495  %6 = alloca i32, align 496  store i32 1, ptr %1, align 4, !dbg !3397  store i32 2, ptr %2, align 498  store i32 3, ptr %3, align 499  store i32 4, ptr %4, align 4100  store i32 5, ptr %5, align 4101  store i32 6, ptr %6, align 4, !dbg !35102  ret void103}104 105attributes #0 = { noredzone nounwind ssp uwtable minsize "frame-pointer"="none" "target-cpu"="cyclone" }106 107!llvm.dbg.cu = !{!0}108!llvm.module.flags = !{!3, !4, !5, !6}109!llvm.ident = !{!7}110 111!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)112!1 = !DIFile(filename: "machine-outliner-remarks.ll", directory: "/tmp")113!2 = !{}114!3 = !{i32 2, !"Dwarf Version", i32 4}115!4 = !{i32 2, !"Debug Info Version", i32 3}116!5 = !{i32 1, !"wchar_size", i32 4}117!6 = !{i32 7, !"PIC Level", i32 2}118!7 = !{!""}119!8 = distinct !DISubprogram(name: "dog", scope: !1, file: !1, line: 2, type: !9, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)120!9 = !DISubroutineType(types: !10)121!10 = !{null}122!12 = !DILocation(line: 5, column: 9, scope: !8)123!14 = distinct !DISubprogram(name: "cat", scope: !1, file: !1, line: 10, type: !9, isLocal: false, isDefinition: true, scopeLine: 11, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)124!16 = !DILocation(line: 13, column: 9, scope: !14)125!18 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 26, type: !9, isLocal: false, isDefinition: true, scopeLine: 26, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)126!24 = !DILocation(line: 27, column: 9, scope: !18)127!26 = !DILocation(line: 29, column: 9, scope: !18)128!27 = distinct !DISubprogram(name: "bar", scope: !1, file: !1, line: 35, type: !9, isLocal: false, isDefinition: true, scopeLine: 35, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)129!33 = !DILocation(line: 36, column: 1, scope: !27)130!35 = !DILocation(line: 38, column: 1, scope: !27)131