brintos

brintos / llvm-project-archived public Read only

0
0
Text · 11.5 KiB · f7c2474 Raw
200 lines · plain
1; RUN: llc %s -mtriple=x86_64-apple-darwin -filetype=obj -o %t -enable-misched2; RUN: llvm-dwarfdump -v %t | FileCheck %s3 4; rdar://131832035; Make sure when misched is enabled, we still have location information for6; function parameters.7; CHECK: .debug_info contents:8; CHECK: DW_TAG_compile_unit9; CHECK:   DW_TAG_subprogram10; CHECK-NOT: DW_TAG11; CHECK:     DW_AT_name {{.*}} "Proc8"12; CHECK-NOT: {{DW_TAG|NULL}}13; CHECK:     DW_TAG_formal_parameter14; CHECK-NOT: DW_TAG15; CHECK:       DW_AT_location16; CHECK-NOT: DW_TAG17; CHECK:       DW_AT_name {{.*}} "Array1Par"18; CHECK-NOT: {{DW_TAG|NULL}}19; CHECK:     DW_TAG_formal_parameter20; CHECK-NOT: DW_TAG21; CHECK:       DW_AT_location22; CHECK-NOT: DW_TAG23; CHECK:       DW_AT_name {{.*}} "Array2Par"24; CHECK-NOT: {{DW_TAG|NULL}}25; CHECK:     DW_TAG_formal_parameter26; CHECK-NOT: DW_TAG27; CHECK:       DW_AT_location28; CHECK-NOT: DW_TAG29; CHECK:       DW_AT_name {{.*}} "IntParI1"30; CHECK-NOT: {{DW_TAG|NULL}}31; CHECK:     DW_TAG_formal_parameter32; CHECK-NOT: DW_TAG33; CHECK:       DW_AT_location34; CHECK-NOT: DW_TAG35; CHECK:       DW_AT_name {{.*}} "IntParI2"36 37source_filename = "test/DebugInfo/X86/misched-dbg-value.ll"38 39%struct.Record = type { ptr, i32, i32, i32, [31 x i8] }40 41@Version = global [4 x i8] c"1.1\00", align 1, !dbg !042@IntGlob = common global i32 0, align 4, !dbg !743@BoolGlob = common global i32 0, align 4, !dbg !1044@Char1Glob = common global i8 0, align 1, !dbg !1345@Char2Glob = common global i8 0, align 1, !dbg !1546@Array1Glob = common global [51 x i32] zeroinitializer, align 16, !dbg !1747@Array2Glob = common global [51 x [51 x i32]] zeroinitializer, align 16, !dbg !2348@PtrGlb = common global ptr null, align 8, !dbg !2849@PtrGlbNext = common global ptr null, align 8, !dbg !5450 51; Function Attrs: nounwind optsize52define void @Proc8(ptr nocapture %Array1Par, ptr nocapture %Array2Par, i32 %IntParI1, i32 %IntParI2) #0 !dbg !61 {53entry:54  tail call void @llvm.dbg.value(metadata ptr %Array1Par, metadata !67, metadata !73), !dbg !7455  tail call void @llvm.dbg.value(metadata ptr %Array2Par, metadata !68, metadata !73), !dbg !7556  tail call void @llvm.dbg.value(metadata i32 %IntParI1, metadata !69, metadata !73), !dbg !7657  tail call void @llvm.dbg.value(metadata i32 %IntParI2, metadata !70, metadata !73), !dbg !7758  %add = add i32 %IntParI1, 5, !dbg !7859  tail call void @llvm.dbg.value(metadata i32 %add, metadata !71, metadata !73), !dbg !7860  %idxprom = sext i32 %add to i64, !dbg !7961  %arrayidx = getelementptr inbounds i32, ptr %Array1Par, i64 %idxprom, !dbg !7962  store i32 %IntParI2, ptr %arrayidx, align 4, !dbg !7963  %add3 = add nsw i32 %IntParI1, 6, !dbg !8064  %idxprom4 = sext i32 %add3 to i64, !dbg !8065  %arrayidx5 = getelementptr inbounds i32, ptr %Array1Par, i64 %idxprom4, !dbg !8066  store i32 %IntParI2, ptr %arrayidx5, align 4, !dbg !8067  %add6 = add nsw i32 %IntParI1, 35, !dbg !8168  %idxprom7 = sext i32 %add6 to i64, !dbg !8169  %arrayidx8 = getelementptr inbounds i32, ptr %Array1Par, i64 %idxprom7, !dbg !8170  store i32 %add, ptr %arrayidx8, align 4, !dbg !8171  tail call void @llvm.dbg.value(metadata i32 %add, metadata !72, metadata !73), !dbg !8272  br label %for.body, !dbg !8273 74for.body:                                         ; preds = %for.body, %entry75  %indvars.iv = phi i64 [ %idxprom, %entry ], [ %indvars.iv.next, %for.body ]76  %IntIndex.046 = phi i32 [ %add, %entry ], [ %inc, %for.body ]77  %arrayidx13 = getelementptr inbounds [51 x i32], ptr %Array2Par, i64 %idxprom, i64 %indvars.iv, !dbg !8478  store i32 %add, ptr %arrayidx13, align 4, !dbg !8479  %inc = add nsw i32 %IntIndex.046, 1, !dbg !8280  tail call void @llvm.dbg.value(metadata i32 %inc, metadata !72, metadata !73), !dbg !8281  %cmp = icmp sgt i32 %inc, %add3, !dbg !8282  %indvars.iv.next = add i64 %indvars.iv, 1, !dbg !8283  br i1 %cmp, label %for.end, label %for.body, !dbg !8284 85for.end:                                          ; preds = %for.body86  %sub = add nsw i32 %IntParI1, 4, !dbg !8587  %idxprom14 = sext i32 %sub to i64, !dbg !8588  %arrayidx17 = getelementptr inbounds [51 x i32], ptr %Array2Par, i64 %idxprom, i64 %idxprom14, !dbg !8589  %0 = load i32, ptr %arrayidx17, align 4, !dbg !8590  %inc18 = add nsw i32 %0, 1, !dbg !8591  store i32 %inc18, ptr %arrayidx17, align 4, !dbg !8592  %1 = load i32, ptr %arrayidx, align 4, !dbg !8693  %add22 = add nsw i32 %IntParI1, 25, !dbg !8694  %idxprom23 = sext i32 %add22 to i64, !dbg !8695  %arrayidx25 = getelementptr inbounds [51 x i32], ptr %Array2Par, i64 %idxprom23, i64 %idxprom, !dbg !8696  store i32 %1, ptr %arrayidx25, align 4, !dbg !8697  store i32 5, ptr @IntGlob, align 4, !dbg !8798  ret void, !dbg !8899}100 101; Function Attrs: nounwind readnone102declare void @llvm.dbg.value(metadata, metadata, metadata) #1103 104attributes #0 = { nounwind optsize }105attributes #1 = { nounwind readnone }106 107!llvm.dbg.cu = !{!56}108!llvm.module.flags = !{!60}109 110!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())111!1 = !DIGlobalVariable(name: "Version", scope: null, file: !2, line: 111, type: !3, isLocal: false, isDefinition: true)112!2 = !DIFile(filename: "dry.c", directory: "/Users/manmanren/test-Nov/rdar_13183203/test2")113!3 = !DICompositeType(tag: DW_TAG_array_type, baseType: !4, size: 32, align: 8, elements: !5)114!4 = !DIBasicType(name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)115!5 = !{!6}116!6 = !DISubrange(count: 4) ; [ DW_TAG_enumerator ] [Ident1 :: 0]117!7 = !DIGlobalVariableExpression(var: !8, expr: !DIExpression()) ; [ DW_TAG_enumerator ] [Ident2 :: 10000]118!8 = !DIGlobalVariable(name: "IntGlob", scope: null, file: !2, line: 171, type: !9, isLocal: false, isDefinition: true) ; [ DW_TAG_enumerator ] [Ident3 :: 10001]119!9 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) ; [ DW_TAG_enumerator ] [Ident4 :: 10002]120!10 = !DIGlobalVariableExpression(var: !11, expr: !DIExpression()) ; [ DW_TAG_enumerator ] [Ident5 :: 10003]121!11 = !DIGlobalVariable(name: "BoolGlob", scope: null, file: !2, line: 172, type: !12, isLocal: false, isDefinition: true)122!12 = !DIDerivedType(tag: DW_TAG_typedef, name: "boolean", file: !2, line: 149, baseType: !9)123!13 = !DIGlobalVariableExpression(var: !14, expr: !DIExpression())124!14 = !DIGlobalVariable(name: "Char1Glob", scope: null, file: !2, line: 173, type: !4, isLocal: false, isDefinition: true)125!15 = !DIGlobalVariableExpression(var: !16, expr: !DIExpression())126!16 = !DIGlobalVariable(name: "Char2Glob", scope: null, file: !2, line: 174, type: !4, isLocal: false, isDefinition: true)127!17 = !DIGlobalVariableExpression(var: !18, expr: !DIExpression())128!18 = !DIGlobalVariable(name: "Array1Glob", scope: null, file: !2, line: 175, type: !19, isLocal: false, isDefinition: true)129!19 = !DIDerivedType(tag: DW_TAG_typedef, name: "Array1Dim", file: !2, line: 135, baseType: !20)130!20 = !DICompositeType(tag: DW_TAG_array_type, baseType: !9, size: 1632, align: 32, elements: !21)131!21 = !{!22}132!22 = !DISubrange(count: 51)133!23 = !DIGlobalVariableExpression(var: !24, expr: !DIExpression())134!24 = !DIGlobalVariable(name: "Array2Glob", scope: null, file: !2, line: 176, type: !25, isLocal: false, isDefinition: true)135!25 = !DIDerivedType(tag: DW_TAG_typedef, name: "Array2Dim", file: !2, line: 136, baseType: !26)136!26 = !DICompositeType(tag: DW_TAG_array_type, baseType: !9, size: 83232, align: 32, elements: !27)137!27 = !{!22, !22}138!28 = !DIGlobalVariableExpression(var: !29, expr: !DIExpression())139!29 = !DIGlobalVariable(name: "PtrGlb", scope: null, file: !2, line: 177, type: !30, isLocal: false, isDefinition: true)140!30 = !DIDerivedType(tag: DW_TAG_typedef, name: "RecordPtr", file: !2, line: 148, baseType: !31)141!31 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !32, size: 64, align: 64)142!32 = !DIDerivedType(tag: DW_TAG_typedef, name: "RecordType", file: !2, line: 147, baseType: !33)143!33 = !DICompositeType(tag: DW_TAG_structure_type, name: "Record", file: !2, line: 138, size: 448, align: 64, elements: !34)144!34 = !{!35, !37, !46, !47, !49}145!35 = !DIDerivedType(tag: DW_TAG_member, name: "PtrComp", scope: !33, file: !2, line: 140, baseType: !36, size: 64, align: 64)146!36 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !33, size: 64, align: 64)147!37 = !DIDerivedType(tag: DW_TAG_member, name: "Discr", scope: !33, file: !2, line: 141, baseType: !38, size: 32, align: 32, offset: 64)148!38 = !DIDerivedType(tag: DW_TAG_typedef, name: "Enumeration", file: !2, line: 128, baseType: !39)149!39 = !DICompositeType(tag: DW_TAG_enumeration_type, file: !2, line: 128, size: 32, align: 32, elements: !40)150!40 = !{!41, !42, !43, !44, !45}151!41 = !DIEnumerator(name: "Ident1", value: 0)152!42 = !DIEnumerator(name: "Ident2", value: 10000)153!43 = !DIEnumerator(name: "Ident3", value: 10001)154!44 = !DIEnumerator(name: "Ident4", value: 10002)155!45 = !DIEnumerator(name: "Ident5", value: 10003)156!46 = !DIDerivedType(tag: DW_TAG_member, name: "EnumComp", scope: !33, file: !2, line: 142, baseType: !38, size: 32, align: 32, offset: 96)157!47 = !DIDerivedType(tag: DW_TAG_member, name: "IntComp", scope: !33, file: !2, line: 143, baseType: !48, size: 32, align: 32, offset: 128)158!48 = !DIDerivedType(tag: DW_TAG_typedef, name: "OneToFifty", file: !2, line: 132, baseType: !9)159!49 = !DIDerivedType(tag: DW_TAG_member, name: "StringComp", scope: !33, file: !2, line: 144, baseType: !50, size: 248, align: 8, offset: 160)160!50 = !DIDerivedType(tag: DW_TAG_typedef, name: "String30", file: !2, line: 134, baseType: !51)161!51 = !DICompositeType(tag: DW_TAG_array_type, baseType: !4, size: 248, align: 8, elements: !52)162!52 = !{!53}163!53 = !DISubrange(count: 31)164!54 = !DIGlobalVariableExpression(var: !55, expr: !DIExpression())165!55 = !DIGlobalVariable(name: "PtrGlbNext", scope: null, file: !2, line: 178, type: !30, isLocal: false, isDefinition: true)166!56 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang version 3.3 (trunk 175015)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !57, retainedTypes: !58, globals: !59, imports: !58)167!57 = !{!39}168!58 = !{}169!59 = !{!0, !7, !10, !13, !15, !17, !23, !28, !54}170!60 = !{i32 1, !"Debug Info Version", i32 3}171!61 = distinct !DISubprogram(name: "Proc8", scope: !2, file: !2, line: 180, type: !62, isLocal: false, isDefinition: true, scopeLine: 185, virtualIndex: 6, isOptimized: true, unit: !56, retainedNodes: !66)172!62 = !DISubroutineType(types: !63)173!63 = !{null, !64, !65, !48, !48}174!64 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !9, size: 64, align: 64)175!65 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !20, size: 64, align: 64)176!66 = !{!67, !68, !69, !70, !71, !72}177!67 = !DILocalVariable(name: "Array1Par", arg: 1, scope: !61, file: !2, line: 181, type: !64)178!68 = !DILocalVariable(name: "Array2Par", arg: 2, scope: !61, file: !2, line: 182, type: !65)179!69 = !DILocalVariable(name: "IntParI1", arg: 3, scope: !61, file: !2, line: 183, type: !48)180!70 = !DILocalVariable(name: "IntParI2", arg: 4, scope: !61, file: !2, line: 184, type: !48)181!71 = !DILocalVariable(name: "IntLoc", scope: !61, file: !2, line: 186, type: !48)182!72 = !DILocalVariable(name: "IntIndex", scope: !61, file: !2, line: 187, type: !48)183!73 = !DIExpression()184!74 = !DILocation(line: 181, scope: !61)185!75 = !DILocation(line: 182, scope: !61)186!76 = !DILocation(line: 183, scope: !61)187!77 = !DILocation(line: 184, scope: !61)188!78 = !DILocation(line: 189, scope: !61)189!79 = !DILocation(line: 190, scope: !61)190!80 = !DILocation(line: 191, scope: !61)191!81 = !DILocation(line: 192, scope: !61)192!82 = !DILocation(line: 193, scope: !83)193!83 = distinct !DILexicalBlock(scope: !61, file: !2, line: 193)194!84 = !DILocation(line: 194, scope: !83)195!85 = !DILocation(line: 195, scope: !61)196!86 = !DILocation(line: 196, scope: !61)197!87 = !DILocation(line: 197, scope: !61)198!88 = !DILocation(line: 198, scope: !61)199 200