diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2015-11-05 22:03:56 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2015-11-05 22:03:56 +0000 |
commit | d4bff30370db9f2cb13838897012768739cf1ee0 (patch) | |
tree | f6c80f666794291c78575617d326207f57939b61 /llvm/test/DebugInfo/X86/2011-12-16-BadStructRef.ll | |
parent | 18da38edb315fe9e063348c4d785b26111b6d7ec (diff) | |
download | bcm5719-llvm-d4bff30370db9f2cb13838897012768739cf1ee0.tar.gz bcm5719-llvm-d4bff30370db9f2cb13838897012768739cf1ee0.zip |
DI: Reverse direction of subprogram -> function edge.
Previously, subprograms contained a metadata reference to the function they
described. Because most clients need to get or set a subprogram for a given
function rather than the other way around, this created unneeded inefficiency.
For example, many passes needed to call the function llvm::makeSubprogramMap()
to build a mapping from functions to subprograms, and the IR linker needed to
fix up function references in a way that caused quadratic complexity in the IR
linking phase of LTO.
This change reverses the direction of the edge by storing the subprogram as
function-level metadata and removing DISubprogram's function field.
Since this is an IR change, a bitcode upgrade has been provided.
Fixes PR23367. An upgrade script for textual IR for out-of-tree clients is
attached to the PR.
Differential Revision: http://reviews.llvm.org/D14265
llvm-svn: 252219
Diffstat (limited to 'llvm/test/DebugInfo/X86/2011-12-16-BadStructRef.ll')
-rw-r--r-- | llvm/test/DebugInfo/X86/2011-12-16-BadStructRef.ll | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/llvm/test/DebugInfo/X86/2011-12-16-BadStructRef.ll b/llvm/test/DebugInfo/X86/2011-12-16-BadStructRef.ll index 6031bdd9445..2319c0b7088 100644 --- a/llvm/test/DebugInfo/X86/2011-12-16-BadStructRef.ll +++ b/llvm/test/DebugInfo/X86/2011-12-16-BadStructRef.ll @@ -7,7 +7,7 @@ %struct.bar = type { %struct.baz, %struct.baz* } %struct.baz = type { i32 } -define i32 @main(i32 %argc, i8** %argv) uwtable ssp { +define i32 @main(i32 %argc, i8** %argv) uwtable ssp !dbg !29 { entry: %retval = alloca i32, align 4 %argc.addr = alloca i32, align 4 @@ -25,7 +25,7 @@ entry: declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone -define linkonce_odr void @_ZN3barC1Ei(%struct.bar* %this, i32 %x) unnamed_addr uwtable ssp align 2 { +define linkonce_odr void @_ZN3barC1Ei(%struct.bar* %this, i32 %x) unnamed_addr uwtable ssp align 2 !dbg !37 { entry: %this.addr = alloca %struct.bar*, align 8 %x.addr = alloca i32, align 4 @@ -39,7 +39,7 @@ entry: ret void, !dbg !62 } -define linkonce_odr void @_ZN3barC2Ei(%struct.bar* %this, i32 %x) unnamed_addr uwtable ssp align 2 { +define linkonce_odr void @_ZN3barC2Ei(%struct.bar* %this, i32 %x) unnamed_addr uwtable ssp align 2 !dbg !40 { entry: %this.addr = alloca %struct.bar*, align 8 %x.addr = alloca i32, align 4 @@ -57,7 +57,7 @@ entry: ret void, !dbg !68 } -define linkonce_odr void @_ZN3bazC1Ei(%struct.baz* %this, i32 %a) unnamed_addr uwtable ssp align 2 { +define linkonce_odr void @_ZN3bazC1Ei(%struct.baz* %this, i32 %a) unnamed_addr uwtable ssp align 2 !dbg !43 { entry: %this.addr = alloca %struct.baz*, align 8 %a.addr = alloca i32, align 4 @@ -71,7 +71,7 @@ entry: ret void, !dbg !74 } -define linkonce_odr void @_ZN3bazC2Ei(%struct.baz* %this, i32 %a) unnamed_addr nounwind uwtable ssp align 2 { +define linkonce_odr void @_ZN3bazC2Ei(%struct.baz* %this, i32 %a) unnamed_addr nounwind uwtable ssp align 2 !dbg !46 { entry: %this.addr = alloca %struct.baz*, align 8 %a.addr = alloca i32, align 4 @@ -111,7 +111,7 @@ entry: !23 = !{null, !24, !12} !24 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial, baseType: !5) !27 = !{!29, !37, !40, !43, !46} -!29 = distinct !DISubprogram(name: "main", line: 17, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !82, scope: !6, type: !30, function: i32 (i32, i8**)* @main) +!29 = distinct !DISubprogram(name: "main", line: 17, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !82, scope: !6, type: !30) !30 = !DISubroutineType(types: !31) !31 = !{!12, !12, !32} !32 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !33) @@ -119,16 +119,16 @@ entry: !34 = !DIBasicType(tag: DW_TAG_base_type, name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char) !35 = !{!36} !36 = !{} ; previously: invalid DW_TAG_base_type -!37 = distinct !DISubprogram(name: "bar", linkageName: "_ZN3barC1Ei", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !82, scope: null, type: !22, function: void (%struct.bar*, i32)* @_ZN3barC1Ei, declaration: !21) +!37 = distinct !DISubprogram(name: "bar", linkageName: "_ZN3barC1Ei", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !82, scope: null, type: !22, declaration: !21) !38 = !{!39} !39 = !{} ; previously: invalid DW_TAG_base_type -!40 = distinct !DISubprogram(name: "bar", linkageName: "_ZN3barC2Ei", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !82, scope: null, type: !22, function: void (%struct.bar*, i32)* @_ZN3barC2Ei, declaration: !21) +!40 = distinct !DISubprogram(name: "bar", linkageName: "_ZN3barC2Ei", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !82, scope: null, type: !22, declaration: !21) !41 = !{!42} !42 = !{} ; previously: invalid DW_TAG_base_type -!43 = distinct !DISubprogram(name: "baz", linkageName: "_ZN3bazC1Ei", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !82, scope: null, type: !14, function: void (%struct.baz*, i32)* @_ZN3bazC1Ei, declaration: !13) +!43 = distinct !DISubprogram(name: "baz", linkageName: "_ZN3bazC1Ei", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !82, scope: null, type: !14, declaration: !13) !44 = !{!45} !45 = !{} ; previously: invalid DW_TAG_base_type -!46 = distinct !DISubprogram(name: "baz", linkageName: "_ZN3bazC2Ei", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !82, scope: null, type: !14, function: void (%struct.baz*, i32)* @_ZN3bazC2Ei, declaration: !13) +!46 = distinct !DISubprogram(name: "baz", linkageName: "_ZN3bazC2Ei", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !82, scope: null, type: !14, declaration: !13) !49 = !DILocalVariable(name: "argc", line: 16, arg: 1, scope: !29, file: !6, type: !12) !50 = !DILocation(line: 16, column: 14, scope: !29) !51 = !DILocalVariable(name: "argv", line: 16, arg: 2, scope: !29, file: !6, type: !32) |