mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-21 18:29:46 +00:00
Move the specialized metadata nodes for the new debug info hierarchy into place, finishing off PR22464. I've done bootstraps (and all that) and I'm confident this commit is NFC as far as DWARF output is concerned. Let me know if I'm wrong :). The code changes are fairly mechanical: - Bumped the "Debug Info Version". - `DIBuilder` now creates the appropriate subclass of `MDNode`. - Subclasses of DIDescriptor now expect to hold their "MD" counterparts (e.g., `DIBasicType` expects `MDBasicType`). - Deleted a ton of dead code in `AsmWriter.cpp` and `DebugInfo.cpp` for printing comments. - Big update to LangRef to describe the nodes in the new hierarchy. Feel free to make it better. Testcase changes are enormous. There's an accompanying clang commit on its way. If you have out-of-tree debug info testcases, I just broke your build. - `upgrade-specialized-nodes.sh` is attached to PR22564. I used it to update all the IR testcases. - Unfortunately I failed to find way to script the updates to CHECK lines, so I updated all of these by hand. This was fairly painful, since the old CHECKs are difficult to reason about. That's one of the benefits of the new hierarchy. This work isn't quite finished, BTW. The `DIDescriptor` subclasses are almost empty wrappers, but not quite: they still have loose casting checks (see the `RETURN_FROM_RAW()` macro). Once they're completely gutted, I'll rename the "MD" classes to "DI" and kill the wrappers. I also expect to make a few schema changes now that it's easier to reason about everything. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231082 91177308-0d34-0410-b5e6-96231b3b80d8
67 lines
3.1 KiB
LLVM
67 lines
3.1 KiB
LLVM
; RUN: llc < %s - -filetype=obj | llvm-dwarfdump -debug-dump=loc - | FileCheck %s
|
|
; Radar 9376013
|
|
target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:32:64-v128:32:128-a0:0:32-n32"
|
|
target triple = "thumbv7-apple-macosx10.6.7"
|
|
|
|
; Just making sure the first part of the location isn't a repetition
|
|
; of the size of the location description.
|
|
;
|
|
; 0x90 DW_OP_regx of super-register
|
|
|
|
; CHECK: 0x00000000: Beginning address offset:
|
|
; CHECK-NEXT: Ending address offset:
|
|
; CHECK-NEXT: Location description: 90 {{.. .. .. .. $}}
|
|
|
|
define void @_Z3foov() optsize ssp {
|
|
entry:
|
|
%call = tail call float @_Z3barv() optsize, !dbg !11
|
|
tail call void @llvm.dbg.value(metadata float %call, i64 0, metadata !5, metadata !MDExpression()), !dbg !11
|
|
%call16 = tail call float @_Z2f2v() optsize, !dbg !12
|
|
%cmp7 = fcmp olt float %call, %call16, !dbg !12
|
|
br i1 %cmp7, label %for.body, label %for.end, !dbg !12
|
|
|
|
for.body: ; preds = %entry, %for.body
|
|
%k.08 = phi float [ %inc, %for.body ], [ %call, %entry ]
|
|
%call4 = tail call float @_Z2f3f(float %k.08) optsize, !dbg !13
|
|
%inc = fadd float %k.08, 1.000000e+00, !dbg !14
|
|
%call1 = tail call float @_Z2f2v() optsize, !dbg !12
|
|
%cmp = fcmp olt float %inc, %call1, !dbg !12
|
|
br i1 %cmp, label %for.body, label %for.end, !dbg !12
|
|
|
|
for.end: ; preds = %for.body, %entry
|
|
ret void, !dbg !15
|
|
}
|
|
|
|
declare float @_Z3barv() optsize
|
|
|
|
declare float @_Z2f2v() optsize
|
|
|
|
declare float @_Z2f3f(float) optsize
|
|
|
|
declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnone
|
|
|
|
!llvm.dbg.cu = !{!0}
|
|
!llvm.module.flags = !{!20}
|
|
|
|
!0 = !MDCompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.0 (trunk 130845)", isOptimized: true, emissionKind: 1, file: !18, enums: !19, retainedTypes: !19, subprograms: !16, imports: null)
|
|
!1 = !MDSubprogram(name: "foo", linkageName: "_Z3foov", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 5, file: !18, scope: !2, type: !3, function: void ()* @_Z3foov, variables: !17)
|
|
!2 = !MDFile(filename: "k.cc", directory: "/private/tmp")
|
|
!3 = !MDSubroutineType(types: !4)
|
|
!4 = !{null}
|
|
!5 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "k", line: 6, scope: !6, file: !2, type: !7)
|
|
!6 = distinct !MDLexicalBlock(line: 5, column: 12, file: !18, scope: !1)
|
|
!7 = !MDBasicType(tag: DW_TAG_base_type, name: "float", size: 32, align: 32, encoding: DW_ATE_float)
|
|
!8 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "y", line: 8, scope: !9, file: !2, type: !7)
|
|
!9 = distinct !MDLexicalBlock(line: 7, column: 25, file: !18, scope: !10)
|
|
!10 = distinct !MDLexicalBlock(line: 7, column: 3, file: !18, scope: !6)
|
|
!11 = !MDLocation(line: 6, column: 18, scope: !6)
|
|
!12 = !MDLocation(line: 7, column: 3, scope: !6)
|
|
!13 = !MDLocation(line: 8, column: 20, scope: !9)
|
|
!14 = !MDLocation(line: 7, column: 20, scope: !10)
|
|
!15 = !MDLocation(line: 10, column: 1, scope: !6)
|
|
!16 = !{!1}
|
|
!17 = !{!5, !8}
|
|
!18 = !MDFile(filename: "k.cc", directory: "/private/tmp")
|
|
!19 = !{i32 0}
|
|
!20 = !{i32 1, !"Debug Info Version", i32 3}
|