brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.3 KiB · 7fc7207 Raw
77 lines · plain
1; RUN: opt -passes='annotation-remarks' -pass-remarks-missed='annotation-remarks' -disable-output -pass-remarks-output=%t.opt.yaml %s2; RUN: FileCheck --input-file=%t.opt.yaml %s3 4; Make sure a suitable location is used for the function start when emitting5; the annotation summary remarks.6 7; CHECK:      --- !Analysis8; CHECK-NEXT: Pass:            annotation-remarks9; CHECK-NEXT: Name:            AnnotationSummary10; CHECK-NEXT: DebugLoc: { File: test.c, Line: 10, Column: 0 }11; CHECK-NEXT: Function:        test112; CHECK-NEXT: Args:13; CHECK-NEXT:   - String:          'Annotated '14; CHECK-NEXT:   - count:           '4'15; CHECK-NEXT:   - String:          ' instructions with '16; CHECK-NEXT:   - type:            _remarks117; CHECK-NEXT: ...18; CHECK-NEXT: --- !Analysis19; CHECK-NEXT: Pass:            annotation-remarks20; CHECK-NEXT: Name:            AnnotationSummary21; CHECK-NEXT: DebugLoc: { File: test.c, Line: 10, Column: 0 }22; CHECK-NEXT: Function:        test123; CHECK-NEXT: Args:24; CHECK-NEXT:   - String:          'Annotated '25; CHECK-NEXT:   - count:           '3'26; CHECK-NEXT:   - String:          ' instructions with '27; CHECK-NEXT:   - type:            _remarks228; CHECK-NEXT: ...29; CHECK-NEXT: --- !Analysis30; CHECK-NEXT: Pass:            annotation-remarks31; CHECK-NEXT: Name:            AnnotationSummary32; CHECK-NEXT: DebugLoc: { File: test.c, Line: 20, Column: 0 }33; CHECK-NEXT: Function:        test234; CHECK-NEXT: Args:35; CHECK-NEXT:   - String:          'Annotated '36; CHECK-NEXT:   - count:           '2'37; CHECK-NEXT:   - String:          ' instructions with '38; CHECK-NEXT:   - type:            _remarks139; CHECK-NEXT: ...40 41define void @test1(ptr %a) !dbg !7 {42entry:43  %a.addr = alloca ptr, align 8, !dbg !16, !annotation !544  store ptr null, ptr %a.addr, align 8, !annotation !645  store ptr %a, ptr %a.addr, align 8, !annotation !546  ret void, !annotation !547}48 49define void @test2(ptr %a) !dbg !17 {50entry:51  %a.addr = alloca ptr, align 8, !annotation !652  ret void, !dbg !18, !annotation !653}54 55!llvm.dbg.cu = !{!0}56!llvm.module.flags = !{!3, !4}57 58!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)59!1 = !DIFile(filename: "test.c", directory: "/test")60!2 = !{}61!3 = !{i32 2, !"Dwarf Version", i32 4}62!4 = !{i32 2, !"Debug Info Version", i32 3}63!5 = !{!"_remarks1", !"_remarks2"}64!6 = !{!"_remarks1"}65!7 = distinct !DISubprogram(name: "test1", scope: !1, file: !1, line: 11, type: !8, scopeLine: 10, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !14)66!8 = !DISubroutineType(types: !9)67!9 = !{null, !10, !10, !13}68!10 = !DIDerivedType(tag: DW_TAG_restrict_type, baseType: !11)69!11 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !12, size: 32, align: 32)70!12 = !DIBasicType(name: "float", size: 32, align: 32, encoding: DW_ATE_float)71!13 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)72!14 = !{!15}73!15 = !DILocalVariable(name: "a", arg: 1, scope: !7, file: !1, line: 1, type: !10)74!16 = !DILocation(line: 400, column: 3, scope: !7)75!17 = distinct !DISubprogram(name: "test2", scope: !1, file: !1, line: 21, type: !8, scopeLine: 20, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !2)76!18 = !DILocation(line: 200, column: 3, scope: !17)77