[PATCH] D133926: [DebugInfo] Allow non-stack_value variadic expressions and use in DBG_INSTR_REF
Felipe de Azevedo Piovezan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 17 05:30:55 PDT 2023
fdeazeve added a comment.
Could you give this a try? It repros for me with a `llc test.ll`.
target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx12.1.0"
declare void @llvm.dbg.value(metadata, metadata, metadata) #0
define swifttailcc void @"blah"(ptr swiftasync %0) !dbg !26 {
%use = getelementptr i8, ptr %0, i64 9
call void @llvm.dbg.value(metadata ptr %0, metadata !30, metadata !DIExpression(DW_OP_LLVM_entry_value, 1, DW_OP_plus_uconst, 16, DW_OP_plus_uconst, 16, DW_OP_deref, DW_OP_deref)), !dbg !34
%use1 = load i32, ptr null, !dbg !45
%use2 = sext i32 %use1 to i64
%use3 = getelementptr i8, ptr null, i64 %use2
store ptr %use3, ptr %0
ret void
}
attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
!llvm.module.flags = !{!0}
!llvm.dbg.cu = !{!1}
!0 = !{i32 2, !"Debug Info Version", i32 3}
!1 = distinct !DICompileUnit(language: DW_LANG_Swift, file: !7, producer: "blah", isOptimized: true, flags: "blah", runtimeVersion: 5, emissionKind: FullDebug, globals: !3, imports: !10, sysroot: "blah", sdk: "blah")
!3 = !{!4, !11}
!4 = !DIGlobalVariableExpression(var: !5, expr: !DIExpression())
!5 = distinct !DIGlobalVariable(name: "blah", linkageName: "blah", scope: !6, file: !7, line: 49, type: !8, isLocal: true, isDefinition: true)
!6 = !DIModule(scope: null, name: "blah", includePath: "blah")
!7 = !DIFile(filename: "blah", directory: "blah")
!8 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !9)
!9 = !DICompositeType(tag: DW_TAG_structure_type, name: "blah", scope: !6, file: !7, size: 64, elements: !10, runtimeLang: DW_LANG_Swift, identifier: "blah")
!10 = !{}
!11 = !DIGlobalVariableExpression(var: !12, expr: !DIExpression())
!12 = distinct !DIGlobalVariable(name: "blah", linkageName: "blah", scope: !6, file: !7, line: 44, type: !14, isLocal: false, isDefinition: true)
!14 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !15)
!15 = !DICompositeType(tag: DW_TAG_structure_type, name: "blah", scope: !17, file: !7, size: 64, elements: !10, runtimeLang: DW_LANG_Swift, identifier: "blah")
!17 = !DIModule(scope: null, name: "blah", configMacros: "blah", includePath: "blah")
!26 = distinct !DISubprogram(name: "blah", linkageName: "blah", scope: !28, file: !7, line: 115, type: !29, scopeLine: 117, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !1, retainedNodes: !10, thrownTypes: !10)
!28 = !DICompositeType(tag: DW_TAG_structure_type, name: "blah", scope: !6, file: !7, elements: !10, runtimeLang: DW_LANG_Swift, identifier: "blah")
!29 = !DISubroutineType(types: !10)
!30 = !DILocalVariable(name: "blah", arg: 1, scope: !31, file: !7, line: 95, type: !33, flags: DIFlagArtificial)
!31 = distinct !DISubprogram(name: "blah", linkageName: "blah", scope: !28, file: !7, line: 95, type: !32, scopeLine: 95, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !1, retainedNodes: !10)
!32 = distinct !DISubroutineType(types: !10)
!33 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !28)
!34 = !DILocation(line: 95, column: 9, scope: !31, inlinedAt: !35)
!35 = distinct !DILocation(line: 0, scope: !36, inlinedAt: !38)
!36 = distinct !DISubprogram(name: "blah", linkageName: "blah", scope: !28, file: !7, type: !32, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !1)
!38 = distinct !DILocation(line: 121, column: 36, scope: !44)
!44 = distinct !DILexicalBlock(scope: !26, file: !7, line: 116, column: 7)
!45 = !DILocation(line: 0, scope: !46, inlinedAt: !35)
!46 = !DILexicalBlockFile(scope: !31, file: !7, discriminator: 0)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133926/new/
https://reviews.llvm.org/D133926
More information about the llvm-commits
mailing list