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/CodeGen/X86/unknown-location.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/CodeGen/X86/unknown-location.ll')
| -rw-r--r-- | llvm/test/CodeGen/X86/unknown-location.ll | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/test/CodeGen/X86/unknown-location.ll b/llvm/test/CodeGen/X86/unknown-location.ll index 8222a623025..c41e529aa95 100644 --- a/llvm/test/CodeGen/X86/unknown-location.ll +++ b/llvm/test/CodeGen/X86/unknown-location.ll @@ -10,7 +10,7 @@ ; CHECK-NEXT: idivl ; CHECK-NEXT: .loc 1 4 3 -define i32 @foo(i32 %w, i32 %x, i32 %y, i32 %z) nounwind { +define i32 @foo(i32 %w, i32 %x, i32 %y, i32 %z) nounwind !dbg !1 { entry: %a = add i32 %w, %x, !dbg !8 %b = sdiv i32 %a, %y @@ -22,7 +22,7 @@ entry: !llvm.module.flags = !{!12} !0 = !DILocalVariable(name: "x", line: 1, arg: 2, scope: !1, file: !2, type: !6) -!1 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 1, file: !10, scope: !2, type: !4, function: i32 (i32, i32, i32, i32)* @foo) +!1 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 1, file: !10, scope: !2, type: !4) !2 = !DIFile(filename: "test.c", directory: "/dir") !3 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "producer", isOptimized: false, emissionKind: 0, file: !10, enums: !11, retainedTypes: !11, subprograms: !9) !4 = !DISubroutineType(types: !5) |

