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/Transforms/SampleProfile | |
| 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/Transforms/SampleProfile')
| -rw-r--r-- | llvm/test/Transforms/SampleProfile/branch.ll | 4 | ||||
| -rw-r--r-- | llvm/test/Transforms/SampleProfile/calls.ll | 8 | ||||
| -rw-r--r-- | llvm/test/Transforms/SampleProfile/coverage-warning.ll | 4 | ||||
| -rw-r--r-- | llvm/test/Transforms/SampleProfile/discriminator.ll | 4 | ||||
| -rw-r--r-- | llvm/test/Transforms/SampleProfile/entry_counts.ll | 4 | ||||
| -rw-r--r-- | llvm/test/Transforms/SampleProfile/fnptr.ll | 12 | ||||
| -rw-r--r-- | llvm/test/Transforms/SampleProfile/gcc-simple.ll | 8 | ||||
| -rw-r--r-- | llvm/test/Transforms/SampleProfile/inline-coverage.ll | 8 | ||||
| -rw-r--r-- | llvm/test/Transforms/SampleProfile/inline.ll | 8 | ||||
| -rw-r--r-- | llvm/test/Transforms/SampleProfile/nolocinfo.ll | 4 | ||||
| -rw-r--r-- | llvm/test/Transforms/SampleProfile/offset.ll | 4 | ||||
| -rw-r--r-- | llvm/test/Transforms/SampleProfile/propagate.ll | 8 | ||||
| -rw-r--r-- | llvm/test/Transforms/SampleProfile/remarks.ll | 8 |
13 files changed, 42 insertions, 42 deletions
diff --git a/llvm/test/Transforms/SampleProfile/branch.ll b/llvm/test/Transforms/SampleProfile/branch.ll index 9ee124b8d8c..1700749f0be 100644 --- a/llvm/test/Transforms/SampleProfile/branch.ll +++ b/llvm/test/Transforms/SampleProfile/branch.ll @@ -28,7 +28,7 @@ @.str = private unnamed_addr constant [15 x i8] c"result is %lf\0A\00", align 1 ; Function Attrs: uwtable -define i32 @main(i32 %argc, i8** %argv) #0 { +define i32 @main(i32 %argc, i8** %argv) #0 !dbg !6 { ; CHECK: Printing analysis 'Branch Probability Analysis' for function 'main': entry: @@ -163,7 +163,7 @@ attributes #4 = { nounwind readonly } !3 = !{!4} !4 = !DIBasicType(name: "double", size: 64, align: 64, encoding: DW_ATE_float) !5 = !{!6} -!6 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 4, type: !7, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: false, function: i32 (i32, i8**)* @main, variables: !2) +!6 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 4, type: !7, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: false, variables: !2) !7 = !DISubroutineType(types: !8) !8 = !{!9, !9, !10} !9 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) diff --git a/llvm/test/Transforms/SampleProfile/calls.ll b/llvm/test/Transforms/SampleProfile/calls.ll index aa176434cc2..53ea9297d7d 100644 --- a/llvm/test/Transforms/SampleProfile/calls.ll +++ b/llvm/test/Transforms/SampleProfile/calls.ll @@ -24,7 +24,7 @@ @.str = private unnamed_addr constant [11 x i8] c"sum is %d\0A\00", align 1 ; Function Attrs: nounwind uwtable -define i32 @_Z3sumii(i32 %x, i32 %y) { +define i32 @_Z3sumii(i32 %x, i32 %y) !dbg !4 { entry: %x.addr = alloca i32, align 4 %y.addr = alloca i32, align 4 @@ -37,7 +37,7 @@ entry: } ; Function Attrs: uwtable -define i32 @main() { +define i32 @main() !dbg !7 { entry: %retval = alloca i32, align 4 %s = alloca i32, align 4 @@ -96,10 +96,10 @@ declare i32 @printf(i8*, ...) #2 !1 = !DIFile(filename: "calls.cc", directory: ".") !2 = !{} !3 = !{!4, !7} -!4 = distinct !DISubprogram(name: "sum", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !5, type: !6, function: i32 (i32, i32)* @_Z3sumii, variables: !2) +!4 = distinct !DISubprogram(name: "sum", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "calls.cc", directory: ".") !6 = !DISubroutineType(types: !2) -!7 = distinct !DISubprogram(name: "main", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 7, file: !1, scope: !5, type: !6, function: i32 ()* @main, variables: !2) +!7 = distinct !DISubprogram(name: "main", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 7, file: !1, scope: !5, type: !6, variables: !2) !8 = !{i32 2, !"Dwarf Version", i32 4} !9 = !{i32 1, !"Debug Info Version", i32 3} !10 = !{!"clang version 3.5 "} diff --git a/llvm/test/Transforms/SampleProfile/coverage-warning.ll b/llvm/test/Transforms/SampleProfile/coverage-warning.ll index f96068002dd..7407bef9e9d 100644 --- a/llvm/test/Transforms/SampleProfile/coverage-warning.ll +++ b/llvm/test/Transforms/SampleProfile/coverage-warning.ll @@ -1,5 +1,5 @@ ; RUN: opt < %s -sample-profile -sample-profile-file=%S/Inputs/coverage-warning.prof -sample-profile-check-coverage=90 2>& 1 | FileCheck %s -define i32 @foo(i32 %i) { +define i32 @foo(i32 %i) !dbg !4 { ; The profile has samples for line locations that are no longer present. ; Coverage does not reach 90%, so we should get this warning: ; @@ -33,7 +33,7 @@ return: ; preds = %if.end, %if.then !1 = !DIFile(filename: "coverage-warning.c", directory: ".") !2 = !{} !3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, function: i32 (i32)* @foo, variables: !2) +!4 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, variables: !2) !5 = !DISubroutineType(types: !2) !6 = !{i32 2, !"Dwarf Version", i32 4} !7 = !{i32 2, !"Debug Info Version", i32 3} diff --git a/llvm/test/Transforms/SampleProfile/discriminator.ll b/llvm/test/Transforms/SampleProfile/discriminator.ll index ffc474b82fd..0915fc884f8 100644 --- a/llvm/test/Transforms/SampleProfile/discriminator.ll +++ b/llvm/test/Transforms/SampleProfile/discriminator.ll @@ -21,7 +21,7 @@ ; This means that the predicate 'i < 5' (line 3) is executed 100 times, ; but the then branch (line 3.1) is only executed 5 times. -define i32 @foo(i32 %i) #0 { +define i32 @foo(i32 %i) #0 !dbg !4 { ; CHECK: Printing analysis 'Branch Probability Analysis' for function 'foo': entry: %i.addr = alloca i32, align 4 @@ -70,7 +70,7 @@ while.end: ; preds = %while.cond !1 = !DIFile(filename: "discriminator.c", directory: ".") !2 = !{} !3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, function: i32 (i32)* @foo, variables: !2) +!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "discriminator.c", directory: ".") !6 = !DISubroutineType(types: !2) !7 = !{i32 2, !"Dwarf Version", i32 4} diff --git a/llvm/test/Transforms/SampleProfile/entry_counts.ll b/llvm/test/Transforms/SampleProfile/entry_counts.ll index bfd65c0d651..50cd575295a 100644 --- a/llvm/test/Transforms/SampleProfile/entry_counts.ll +++ b/llvm/test/Transforms/SampleProfile/entry_counts.ll @@ -3,7 +3,7 @@ ; According to the profile, function empty() was called 13,293 times. ; CHECK: {{.*}} = !{!"function_entry_count", i64 13293} -define void @empty() { +define void @empty() !dbg !4 { entry: ret void, !dbg !9 } @@ -16,7 +16,7 @@ entry: !1 = !DIFile(filename: "entry_counts.c", directory: ".") !2 = !{} !3 = !{!4} -!4 = distinct !DISubprogram(name: "empty", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: false, function: void ()* @empty, variables: !2) +!4 = distinct !DISubprogram(name: "empty", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: false, variables: !2) !5 = !DISubroutineType(types: !2) !6 = !{i32 2, !"Dwarf Version", i32 4} !7 = !{i32 2, !"Debug Info Version", i32 3} diff --git a/llvm/test/Transforms/SampleProfile/fnptr.ll b/llvm/test/Transforms/SampleProfile/fnptr.ll index f95bf9797d9..7b07ca9679b 100644 --- a/llvm/test/Transforms/SampleProfile/fnptr.ll +++ b/llvm/test/Transforms/SampleProfile/fnptr.ll @@ -46,7 +46,7 @@ @.str = private unnamed_addr constant [9 x i8] c"S = %lf\0A\00", align 1 -define double @_Z3fooi(i32 %x) #0 { +define double @_Z3fooi(i32 %x) #0 !dbg !3 { entry: %conv = sitofp i32 %x to double, !dbg !2 %call = tail call double @sin(double %conv) #3, !dbg !8 @@ -56,7 +56,7 @@ entry: declare double @sin(double) #1 -define double @_Z3bari(i32 %x) #0 { +define double @_Z3bari(i32 %x) #0 !dbg !10 { entry: %conv = sitofp i32 %x to double, !dbg !9 %call = tail call double @cos(double %conv) #3, !dbg !11 @@ -66,7 +66,7 @@ entry: declare double @cos(double) #1 -define i32 @main() #2 { +define i32 @main() #2 !dbg !13 { entry: br label %for.cond1.preheader, !dbg !12 @@ -130,17 +130,17 @@ declare i32 @printf(i8* nocapture readonly, ...) #1 !0 = !{i32 2, !"Debug Info Version", i32 3} !1 = !{!"clang version 3.6.0 "} !2 = !DILocation(line: 9, column: 3, scope: !3) -!3 = distinct !DISubprogram(name: "foo", line: 8, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 8, file: !4, scope: !5, type: !6, function: double (i32)* @_Z3fooi, variables: !7) +!3 = distinct !DISubprogram(name: "foo", line: 8, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 8, file: !4, scope: !5, type: !6, variables: !7) !4 = !DIFile(filename: "fnptr.cc", directory: ".") !5 = !DIFile(filename: "fnptr.cc", directory: ".") !6 = !DISubroutineType(types: !7) !7 = !{} !8 = !DILocation(line: 9, column: 14, scope: !3) !9 = !DILocation(line: 13, column: 3, scope: !10) -!10 = distinct !DISubprogram(name: "bar", line: 12, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 12, file: !4, scope: !5, type: !6, function: double (i32)* @_Z3bari, variables: !7) +!10 = distinct !DISubprogram(name: "bar", line: 12, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 12, file: !4, scope: !5, type: !6, variables: !7) !11 = !DILocation(line: 13, column: 14, scope: !10) !12 = !DILocation(line: 19, column: 3, scope: !13) -!13 = distinct !DISubprogram(name: "main", line: 16, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 16, file: !4, scope: !5, type: !6, function: i32 ()* @main, variables: !7) +!13 = distinct !DISubprogram(name: "main", line: 16, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 16, file: !4, scope: !5, type: !6, variables: !7) !14 = !DILocation(line: 20, column: 5, scope: !13) !15 = !DILocation(line: 21, column: 15, scope: !13) !16 = !DILocation(line: 22, column: 11, scope: !13) diff --git a/llvm/test/Transforms/SampleProfile/gcc-simple.ll b/llvm/test/Transforms/SampleProfile/gcc-simple.ll index 75d54bf9304..1ae927158c1 100644 --- a/llvm/test/Transforms/SampleProfile/gcc-simple.ll +++ b/llvm/test/Transforms/SampleProfile/gcc-simple.ll @@ -24,7 +24,7 @@ ; $ perf record -b ./gcc-simple ; $ create_gcov --binary=gcc-simple --gcov=gcc-simple.afdo -define i64 @_Z3fool(i64 %i) #0 { +define i64 @_Z3fool(i64 %i) #0 !dbg !4 { ; CHECK: !prof ![[EC1:[0-9]+]] entry: %retval = alloca i64, align 8 @@ -66,7 +66,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 declare i32 @rand() #2 ; Function Attrs: nounwind uwtable -define i32 @main() #0 { +define i32 @main() #0 !dbg !9 { ; CHECK: !prof ![[EC2:[0-9]+]] entry: %retval = alloca i32, align 4 @@ -148,12 +148,12 @@ attributes #3 = { nounwind } !1 = !DIFile(filename: "discriminator.cc", directory: "/usr/local/google/home/dnovillo/llvm/test/autofdo") !2 = !{} !3 = !{!4, !9} -!4 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fool", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, function: i64 (i64)* @_Z3fool, variables: !2) +!4 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fool", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{!7, !8} !7 = !DIBasicType(name: "long long int", size: 64, align: 64, encoding: DW_ATE_signed) !8 = !DIBasicType(name: "long int", size: 64, align: 64, encoding: DW_ATE_signed) -!9 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 7, type: !10, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: false, function: i32 ()* @main, variables: !2) +!9 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 7, type: !10, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: false, variables: !2) !10 = !DISubroutineType(types: !11) !11 = !{!12} !12 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) diff --git a/llvm/test/Transforms/SampleProfile/inline-coverage.ll b/llvm/test/Transforms/SampleProfile/inline-coverage.ll index 77927858983..4f87b1661a6 100644 --- a/llvm/test/Transforms/SampleProfile/inline-coverage.ll +++ b/llvm/test/Transforms/SampleProfile/inline-coverage.ll @@ -26,7 +26,7 @@ ; use: ; CHECK: warning: coverage.cc:7: 4 of 5 available profile records (80%) were applied -define i64 @_Z3fool(i64 %i) { +define i64 @_Z3fool(i64 %i) !dbg !4 { entry: %i.addr = alloca i64, align 8 store i64 %i, i64* %i.addr, align 8 @@ -42,7 +42,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) declare i32 @rand() -define i32 @main() { +define i32 @main() !dbg !9 { entry: %retval = alloca i32, align 4 %sum = alloca i64, align 8 @@ -89,12 +89,12 @@ for.end: ; preds = %for.cond !1 = !DIFile(filename: "coverage.cc", directory: ".") !2 = !{} !3 = !{!4, !9} -!4 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fool", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, function: i64 (i64)* @_Z3fool, variables: !2) +!4 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fool", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{!7, !8} !7 = !DIBasicType(name: "long long int", size: 64, align: 64, encoding: DW_ATE_signed) !8 = !DIBasicType(name: "long int", size: 64, align: 64, encoding: DW_ATE_signed) -!9 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 7, type: !10, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: false, function: i32 ()* @main, variables: !2) +!9 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 7, type: !10, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: false, variables: !2) !10 = !DISubroutineType(types: !11) !11 = !{!12} !12 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) diff --git a/llvm/test/Transforms/SampleProfile/inline.ll b/llvm/test/Transforms/SampleProfile/inline.ll index 50f72811fbe..a128df56dbf 100644 --- a/llvm/test/Transforms/SampleProfile/inline.ll +++ b/llvm/test/Transforms/SampleProfile/inline.ll @@ -19,7 +19,7 @@ @.str = private unnamed_addr constant [11 x i8] c"sum is %d\0A\00", align 1 ; Function Attrs: nounwind uwtable -define i32 @_Z3sumii(i32 %x, i32 %y) { +define i32 @_Z3sumii(i32 %x, i32 %y) !dbg !4 { entry: %x.addr = alloca i32, align 4 %y.addr = alloca i32, align 4 @@ -32,7 +32,7 @@ entry: } ; Function Attrs: uwtable -define i32 @main() { +define i32 @main() !dbg !7 { entry: %retval = alloca i32, align 4 %s = alloca i32, align 4 @@ -84,10 +84,10 @@ declare i32 @printf(i8*, ...) #2 !1 = !DIFile(filename: "calls.cc", directory: ".") !2 = !{} !3 = !{!4, !7} -!4 = distinct !DISubprogram(name: "sum", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !5, type: !6, function: i32 (i32, i32)* @_Z3sumii, variables: !2) +!4 = distinct !DISubprogram(name: "sum", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "calls.cc", directory: ".") !6 = !DISubroutineType(types: !2) -!7 = distinct !DISubprogram(name: "main", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 7, file: !1, scope: !5, type: !6, function: i32 ()* @main, variables: !2) +!7 = distinct !DISubprogram(name: "main", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 7, file: !1, scope: !5, type: !6, variables: !2) !8 = !{i32 2, !"Dwarf Version", i32 4} !9 = !{i32 1, !"Debug Info Version", i32 3} !10 = !{!"clang version 3.5 "} diff --git a/llvm/test/Transforms/SampleProfile/nolocinfo.ll b/llvm/test/Transforms/SampleProfile/nolocinfo.ll index d700e5f289a..08bca20984d 100644 --- a/llvm/test/Transforms/SampleProfile/nolocinfo.ll +++ b/llvm/test/Transforms/SampleProfile/nolocinfo.ll @@ -1,6 +1,6 @@ ; RUN: opt < %s -sample-profile -sample-profile-file=%S/Inputs/nolocinfo.prof -S -pass-remarks=sample-profile 2>&1 | FileCheck %s -define i32 @foo(i32 %i) { +define i32 @foo(i32 %i) !dbg !4 { entry: %i.addr = alloca i32, align 4 %0 = load i32, i32* %i.addr, align 4 @@ -27,7 +27,7 @@ if.end: !1 = !DIFile(filename: "nolocinfo.c", directory: ".") !2 = !{} !3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, function: i32 (i32)* @foo, variables: !2) +!4 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{!7, !7} !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) diff --git a/llvm/test/Transforms/SampleProfile/offset.ll b/llvm/test/Transforms/SampleProfile/offset.ll index 151fc0941ed..499b2826402 100644 --- a/llvm/test/Transforms/SampleProfile/offset.ll +++ b/llvm/test/Transforms/SampleProfile/offset.ll @@ -19,7 +19,7 @@ ; #5 } ; Function Attrs: nounwind uwtable -define i32 @_Z3fooi(i32 %a) #0 { +define i32 @_Z3fooi(i32 %a) #0 !dbg !4 { entry: %retval = alloca i32, align 4 %a.addr = alloca i32, align 4 @@ -58,7 +58,7 @@ attributes #1 = { nounwind readnone } !1 = !DIFile(filename: "a.cc", directory: "/tmp") !2 = !{} !3 = !{!4} -!4 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooi", scope: !1, file: !1, line: 5, type: !5, isLocal: false, isDefinition: true, scopeLine: 5, flags: DIFlagPrototyped, isOptimized: false, function: i32 (i32)* @_Z3fooi, variables: !2) +!4 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooi", scope: !1, file: !1, line: 5, type: !5, isLocal: false, isDefinition: true, scopeLine: 5, flags: DIFlagPrototyped, isOptimized: false, variables: !2) !5 = !DISubroutineType(types: !6) !6 = !{!7, !7} !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) diff --git a/llvm/test/Transforms/SampleProfile/propagate.ll b/llvm/test/Transforms/SampleProfile/propagate.ll index 3945519f601..eef7b162eb7 100644 --- a/llvm/test/Transforms/SampleProfile/propagate.ll +++ b/llvm/test/Transforms/SampleProfile/propagate.ll @@ -40,7 +40,7 @@ target triple = "x86_64-unknown-linux-gnu" @.str = private unnamed_addr constant [24 x i8] c"foo(%d, %d, %ld) = %ld\0A\00", align 1 ; Function Attrs: nounwind uwtable -define i64 @_Z3fooiil(i32 %x, i32 %y, i64 %N) #0 { +define i64 @_Z3fooiil(i32 %x, i32 %y, i64 %N) #0 !dbg !4 { entry: %retval = alloca i64, align 8 %x.addr = alloca i32, align 4 @@ -167,7 +167,7 @@ return: ; preds = %if.end19, %if.then } ; Function Attrs: uwtable -define i32 @main() #1 { +define i32 @main() #1 !dbg !7 { entry: %retval = alloca i32, align 4 %x = alloca i32, align 4 @@ -202,10 +202,10 @@ attributes #2 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "n !1 = !DIFile(filename: "propagate.cc", directory: ".") !2 = !{} !3 = !{!4, !7} -!4 = distinct !DISubprogram(name: "foo", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !5, type: !6, function: i64 (i32, i32, i64)* @_Z3fooiil, variables: !2) +!4 = distinct !DISubprogram(name: "foo", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !2) !5 = !DIFile(filename: "propagate.cc", directory: ".") !6 = !DISubroutineType(types: !{null}) -!7 = distinct !DISubprogram(name: "main", line: 24, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 24, file: !1, scope: !5, type: !6, function: i32 ()* @main, variables: !2) +!7 = distinct !DISubprogram(name: "main", line: 24, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 24, file: !1, scope: !5, type: !6, variables: !2) !8 = !{i32 2, !"Dwarf Version", i32 4} !9 = !{i32 1, !"Debug Info Version", i32 3} !10 = !{!"clang version 3.5 "} diff --git a/llvm/test/Transforms/SampleProfile/remarks.ll b/llvm/test/Transforms/SampleProfile/remarks.ll index f6e9a4267f4..a0e6a9deb8a 100644 --- a/llvm/test/Transforms/SampleProfile/remarks.ll +++ b/llvm/test/Transforms/SampleProfile/remarks.ll @@ -27,7 +27,7 @@ ; CHECK: remark: remarks.cc:9:15: most popular destination for conditional branches at remarks.cc:6:9 ; Function Attrs: nounwind uwtable -define i64 @_Z3foov() #0 { +define i64 @_Z3foov() #0 !dbg !4 { entry: %sum = alloca i64, align 8 %i = alloca i32, align 4 @@ -104,7 +104,7 @@ declare i32 @rand() #3 declare void @llvm.lifetime.end(i64, i8* nocapture) #1 ; Function Attrs: nounwind uwtable -define i32 @main() #0 { +define i32 @main() #0 !dbg !13 { entry: %retval = alloca i32, align 4 store i32 0, i32* %retval, align 4 @@ -128,7 +128,7 @@ attributes #4 = { nounwind } !1 = !DIFile(filename: "remarks.cc", directory: ".") !2 = !{} !3 = !{!4, !13} -!4 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: true, function: i64 ()* @_Z3foov, variables: !8) +!4 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: true, variables: !8) !5 = !DISubroutineType(types: !6) !6 = !{!7} !7 = !DIBasicType(name: "long long int", size: 64, align: 64, encoding: DW_ATE_signed) @@ -137,7 +137,7 @@ attributes #4 = { nounwind } !10 = !DILocalVariable(name: "i", scope: !11, file: !1, line: 5, type: !12) !11 = distinct !DILexicalBlock(scope: !4, file: !1, line: 5, column: 3) !12 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!13 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 13, type: !14, isLocal: false, isDefinition: true, scopeLine: 13, flags: DIFlagPrototyped, isOptimized: true, function: i32 ()* @main, variables: !2) +!13 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 13, type: !14, isLocal: false, isDefinition: true, scopeLine: 13, flags: DIFlagPrototyped, isOptimized: true, variables: !2) !14 = !DISubroutineType(types: !15) !15 = !{!12} !16 = !{i32 2, !"Dwarf Version", i32 4} |

