brintos

brintos / llvm-project-archived public Read only

0
0
Text · 10.5 KiB · 9edeb61 Raw
219 lines · plain
1# RUN: llc -o - %s -mtriple=thumbv7-apple-ios -start-before=livedebugvalues | FileCheck %s2# RUN: llc -o - %s -mtriple=thumbv6-apple-ios -start-before=livedebugvalues | FileCheck %s3 4# struct A {5#   A();6#   virtual ~A();7# };8# struct B : A {9#   B();10#   virtual ~B();11# };12# B::B() {}13# CHECK: __ZN1BC1Ev:14# CHECK:     .loc       1 9 0 prologue_end15# CHECK-NOT: .loc       1 0 0 prologue_end16#17# The location of the prologue_end marker should not be affected by the presence18# of CFI instructions.19 20--- |21  %struct.B = type { %struct.A }22  %struct.A = type { ptr }23 24  @_ZTV1B = external unnamed_addr constant [4 x ptr]25 26  ; Function Attrs: nounwind27  define ptr @_ZN1BC2Ev(ptr %this) unnamed_addr #0 align 2 !dbg !31 {28  entry:29    tail call void @llvm.dbg.value(metadata ptr %this, metadata !33, metadata !DIExpression()), !dbg !3530    %0 = bitcast ptr %this to ptr, !dbg !3631    %call = tail call ptr @_ZN1AC2Ev(ptr %0) #0, !dbg !3632    %1 = bitcast ptr %this to ptr, !dbg !3633    store ptr getelementptr inbounds ([4 x ptr], ptr @_ZTV1B, i32 0, i32 2), ptr %1, align 4, !dbg !36, !tbaa !3734    ret ptr %this, !dbg !3635  }36 37  declare ptr @_ZN1AC2Ev(ptr)38 39  ; Function Attrs: nounwind40  define ptr @_ZN1BC1Ev(ptr %this) unnamed_addr #0 align 2 !dbg !40 {41  entry:42    tail call void @llvm.dbg.value(metadata ptr %this, metadata !42, metadata !DIExpression()), !dbg !4343    tail call void @llvm.dbg.value(metadata ptr %this, metadata !33, metadata !DIExpression()) #0, !dbg !4444    %0 = bitcast ptr %this to ptr, !dbg !4645    %call.i = tail call ptr @_ZN1AC2Ev(ptr %0) #0, !dbg !4646    %1 = bitcast ptr %this to ptr, !dbg !4647    store ptr getelementptr inbounds ([4 x ptr], ptr @_ZTV1B, i32 0, i32 2), ptr %1, align 4, !dbg !46, !tbaa !3748    ret ptr %this, !dbg !4549  }50 51  ; Function Attrs: nounwind readnone speculatable52  declare void @llvm.dbg.value(metadata, metadata, metadata) #153 54  declare void @_Unwind_SjLj_Register(ptr)55 56  declare void @_Unwind_SjLj_Unregister(ptr)57 58  ; Function Attrs: nounwind readnone59  declare ptr @llvm.frameaddress(i32) #260 61  ; Function Attrs: nounwind62  declare ptr @llvm.stacksave() #063 64  ; Function Attrs: nounwind65  declare void @llvm.stackrestore(ptr) #066 67  ; Function Attrs: nounwind68  declare void @llvm.eh.sjlj.setup.dispatch() #069 70  ; Function Attrs: nounwind readnone71  declare ptr @llvm.eh.sjlj.lsda() #272 73  ; Function Attrs: nounwind readnone74  declare void @llvm.eh.sjlj.callsite(i32) #275 76  ; Function Attrs: nounwind77  declare void @llvm.eh.sjlj.functioncontext(ptr) #078 79  ; Function Attrs: nounwind80  declare void @llvm.stackprotector(ptr, ptr) #081 82  attributes #0 = { nounwind  "target-features"="+v8m" }83  attributes #1 = { nounwind readnone speculatable }84  attributes #2 = { nounwind readnone }85 86  !llvm.dbg.cu = !{!0}87  !llvm.module.flags = !{!26, !27, !28, !29}88  !llvm.ident = !{!30}89 90  !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.6.0 (trunk 224279) (llvm/trunk 224283)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !3, globals: !2, imports: !2)91  !1 = !DIFile(filename: "<stdin>", directory: "")92  !2 = !{}93  !3 = !{!4, !8}94  !4 = !DICompositeType(tag: DW_TAG_structure_type, name: "B", file: !5, line: 5, size: 32, align: 32, elements: !6, vtableHolder: !8, identifier: "_ZTS1B")95  !5 = !DIFile(filename: "test1.cpp", directory: "")96  !6 = !{!7, !21, !25}97  !7 = !DIDerivedType(tag: DW_TAG_inheritance, scope: !4, baseType: !8)98  !8 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !5, line: 1, size: 32, align: 32, elements: !9, vtableHolder: !8, identifier: "_ZTS1A")99  !9 = !{!10, !16, !20}100  !10 = !DIDerivedType(tag: DW_TAG_member, name: "_vptr$A", scope: !5, file: !5, baseType: !11, size: 32, flags: DIFlagArtificial)101  !11 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !12, size: 32)102  !12 = !DIDerivedType(tag: DW_TAG_pointer_type, name: "__vtbl_ptr_type", baseType: !13, size: 32)103  !13 = !DISubroutineType(types: !14)104  !14 = !{!15}105  !15 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)106  !16 = !DISubprogram(name: "A", scope: !8, file: !5, line: 2, type: !17, isLocal: false, isDefinition: false, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true)107  !17 = !DISubroutineType(types: !18)108  !18 = !{null, !19}109  !19 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !8, size: 32, align: 32, flags: DIFlagArtificial | DIFlagObjectPointer)110  !20 = !DISubprogram(name: "~A", scope: !8, file: !5, line: 3, type: !17, isLocal: false, isDefinition: false, scopeLine: 3, containingType: !8, virtuality: DW_VIRTUALITY_virtual, virtualIndex: 0, flags: DIFlagPrototyped, isOptimized: true)111  !21 = !DISubprogram(name: "B", scope: !4, file: !5, line: 6, type: !22, isLocal: false, isDefinition: false, scopeLine: 6, flags: DIFlagPrototyped, isOptimized: true)112  !22 = !DISubroutineType(types: !23)113  !23 = !{null, !24}114  !24 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !4, size: 32, align: 32, flags: DIFlagArtificial | DIFlagObjectPointer)115  !25 = !DISubprogram(name: "~B", scope: !4, file: !5, line: 7, type: !22, isLocal: false, isDefinition: false, scopeLine: 7, containingType: !4, virtuality: DW_VIRTUALITY_virtual, virtualIndex: 0, flags: DIFlagPrototyped, isOptimized: true)116  !26 = !{i32 2, !"Dwarf Version", i32 4}117  !27 = !{i32 2, !"Debug Info Version", i32 3}118  !28 = !{i32 1, !"wchar_size", i32 4}119  !29 = !{i32 1, !"min_enum_size", i32 4}120  !30 = !{!"clang version 3.6.0 (trunk 224279) (llvm/trunk 224283)"}121  !31 = distinct !DISubprogram(name: "B", linkageName: "_ZN1BC2Ev", scope: !4, file: !5, line: 9, type: !22, isLocal: false, isDefinition: true, scopeLine: 9, flags: DIFlagPrototyped, isOptimized: true, unit: !0, declaration: !21, retainedNodes: !32)122  !32 = !{!33}123  !33 = !DILocalVariable(name: "this", arg: 1, scope: !31, type: !34, flags: DIFlagArtificial | DIFlagObjectPointer)124  !34 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !4, size: 32, align: 32)125  !35 = !DILocation(line: 0, scope: !31)126  !36 = !DILocation(line: 9, scope: !31)127  !37 = !{!38, !38, i64 0}128  !38 = !{!"vtable pointer", !39, i64 0}129  !39 = !{!"Simple C/C++ TBAA"}130  !40 = distinct !DISubprogram(name: "B", linkageName: "_ZN1BC1Ev", scope: !4, file: !5, line: 9, type: !22, isLocal: false, isDefinition: true, scopeLine: 9, flags: DIFlagPrototyped, isOptimized: true, unit: !0, declaration: !21, retainedNodes: !41)131  !41 = !{!42}132  !42 = !DILocalVariable(name: "this", arg: 1, scope: !40, type: !34, flags: DIFlagArtificial | DIFlagObjectPointer)133  !43 = !DILocation(line: 0, scope: !40)134  !44 = !DILocation(line: 0, scope: !31, inlinedAt: !45)135  !45 = !DILocation(line: 9, scope: !40)136  !46 = !DILocation(line: 9, scope: !31, inlinedAt: !45)137 138...139---140name:            _ZN1BC2Ev141alignment:       2142tracksRegLiveness: true143liveins:144  - { reg: '$r0' }145frameInfo:146  stackSize:       8147  maxAlignment:    4148  adjustsStack:    true149  hasCalls:        true150  maxCallFrameSize: 0151stack:152  - { id: 0, type: spill-slot, offset: -4, size: 4, alignment: 4, stack-id: default,153      callee-saved-register: '$lr', callee-saved-restored: false }154  - { id: 1, type: spill-slot, offset: -8, size: 4, alignment: 4, stack-id: default,155      callee-saved-register: '$r4' }156body:             |157  bb.0.entry:158    liveins: $r0, $r4, $lr159 160    frame-setup tPUSH 14, $noreg, killed $r4, killed $lr, implicit-def $sp, implicit $sp161    frame-setup CFI_INSTRUCTION def_cfa_offset 8162    frame-setup CFI_INSTRUCTION offset $lr, -4163    frame-setup CFI_INSTRUCTION offset $r4, -8164    DBG_VALUE debug-use $r0, debug-use $noreg, !33, !DIExpression(), debug-location !35165    $r4 = tMOVr $r0, 14, $noreg166    DBG_VALUE debug-use $r4, debug-use $noreg, !33, !DIExpression(), debug-location !35167    tBL 14, $noreg, @_ZN1AC2Ev, csr_ios, implicit-def dead $lr, implicit $sp, implicit killed $r0, implicit-def $sp, implicit-def dead $r0, debug-location !36168    $r0 = t2MOVi16_ga_pcrel target-flags(arm-lo16, arm-nonlazy) @_ZTV1B, 0, debug-location !36169    $r0 = t2MOVTi16_ga_pcrel killed $r0, target-flags(arm-hi16, arm-nonlazy) @_ZTV1B, 0, debug-location !36170    $r0 = tPICADD killed $r0, 0, debug-location !36171    renamable $r0 = tLDRi killed renamable $r0, 0, 14, $noreg, debug-location !36 :: (load (s32) from got)172    renamable $r0, dead $cpsr = nuw tADDi8 killed renamable $r0, 8, 14, $noreg, debug-location !36173    tSTRi killed renamable $r0, renamable $r4, 0, 14, $noreg, debug-location !36 :: (store (s32) into %ir.1, !tbaa !37)174    $r0 = tMOVr killed $r4, 14, $noreg, debug-location !36175    tPOP_RET 14, $noreg, def $r4, def $pc, implicit killed $r0, debug-location !36176 177...178---179name:            _ZN1BC1Ev180alignment:       2181tracksRegLiveness: true182liveins:183  - { reg: '$r0' }184frameInfo:185  stackSize:       8186  maxAlignment:    4187  adjustsStack:    true188  hasCalls:        true189  maxCallFrameSize: 0190stack:191  - { id: 0, type: spill-slot, offset: -4, size: 4, alignment: 4, stack-id: default,192      callee-saved-register: '$lr', callee-saved-restored: false }193  - { id: 1, type: spill-slot, offset: -8, size: 4, alignment: 4, stack-id: default,194      callee-saved-register: '$r4' }195body:             |196  bb.0.entry:197    liveins: $r0, $r4, $lr198 199    frame-setup tPUSH 14, $noreg, killed $r4, killed $lr, implicit-def $sp, implicit $sp200    frame-setup CFI_INSTRUCTION def_cfa_offset 8201    frame-setup CFI_INSTRUCTION offset $lr, -4202    frame-setup CFI_INSTRUCTION offset $r4, -8203    DBG_VALUE debug-use $r0, debug-use $noreg, !42, !DIExpression(), debug-location !43204    DBG_VALUE debug-use $r0, debug-use $noreg, !33, !DIExpression(), debug-location !44205    $r4 = tMOVr $r0, 14, $noreg206    DBG_VALUE debug-use $r4, debug-use $noreg, !33, !DIExpression(), debug-location !44207    DBG_VALUE debug-use $r4, debug-use $noreg, !42, !DIExpression(), debug-location !43208    tBL 14, $noreg, @_ZN1AC2Ev, csr_ios, implicit-def dead $lr, implicit $sp, implicit killed $r0, implicit-def $sp, implicit-def dead $r0, debug-location !46209    $r0 = t2MOVi16_ga_pcrel target-flags(arm-lo16, arm-nonlazy) @_ZTV1B, 0, debug-location !46210    $r0 = t2MOVTi16_ga_pcrel killed $r0, target-flags(arm-hi16, arm-nonlazy) @_ZTV1B, 0, debug-location !46211    $r0 = tPICADD killed $r0, 0, debug-location !46212    renamable $r0 = tLDRi killed renamable $r0, 0, 14, $noreg, debug-location !46 :: (load (s32) from got)213    renamable $r0, dead $cpsr = nuw tADDi8 killed renamable $r0, 8, 14, $noreg, debug-location !46214    tSTRi killed renamable $r0, renamable $r4, 0, 14, $noreg, debug-location !46 :: (store (s32) into %ir.1, !tbaa !37)215    $r0 = tMOVr killed $r4, 14, $noreg, debug-location !45216    tPOP_RET 14, $noreg, def $r4, def $pc, implicit killed $r0, debug-location !45217 218...219