diff options
Diffstat (limited to 'llvm/test/Transforms')
-rw-r--r-- | llvm/test/Transforms/SampleProfile/Inputs/branch.prof | 2 | ||||
-rw-r--r-- | llvm/test/Transforms/SampleProfile/Inputs/fnptr.binprof | bin | 221 -> 225 bytes | |||
-rw-r--r-- | llvm/test/Transforms/SampleProfile/Inputs/fnptr.prof | 1 | ||||
-rw-r--r-- | llvm/test/Transforms/SampleProfile/branch.ll | 8 | ||||
-rw-r--r-- | llvm/test/Transforms/SampleProfile/calls.ll | 8 | ||||
-rw-r--r-- | llvm/test/Transforms/SampleProfile/discriminator.ll | 8 | ||||
-rw-r--r-- | llvm/test/Transforms/SampleProfile/entry_counts.ll | 2 | ||||
-rw-r--r-- | llvm/test/Transforms/SampleProfile/fnptr.ll | 12 | ||||
-rw-r--r-- | llvm/test/Transforms/SampleProfile/offset.ll | 4 | ||||
-rw-r--r-- | llvm/test/Transforms/SampleProfile/propagate.ll | 12 |
10 files changed, 29 insertions, 28 deletions
diff --git a/llvm/test/Transforms/SampleProfile/Inputs/branch.prof b/llvm/test/Transforms/SampleProfile/Inputs/branch.prof index ac958e325c4..035af631a7a 100644 --- a/llvm/test/Transforms/SampleProfile/Inputs/branch.prof +++ b/llvm/test/Transforms/SampleProfile/Inputs/branch.prof @@ -1,4 +1,4 @@ -main:15680:0 +main:15680:2500 1: 2500 4: 1000 5: 1000 diff --git a/llvm/test/Transforms/SampleProfile/Inputs/fnptr.binprof b/llvm/test/Transforms/SampleProfile/Inputs/fnptr.binprof Binary files differindex 420fd8f86d0..71934365218 100644 --- a/llvm/test/Transforms/SampleProfile/Inputs/fnptr.binprof +++ b/llvm/test/Transforms/SampleProfile/Inputs/fnptr.binprof diff --git a/llvm/test/Transforms/SampleProfile/Inputs/fnptr.prof b/llvm/test/Transforms/SampleProfile/Inputs/fnptr.prof index 2491c427393..01680d846d8 100644 --- a/llvm/test/Transforms/SampleProfile/Inputs/fnptr.prof +++ b/llvm/test/Transforms/SampleProfile/Inputs/fnptr.prof @@ -3,6 +3,7 @@ _Z3fooi:7711:610 _Z3bari:20301:1437 1: 1437 main:184019:0 + 3: 0 4: 534 6: 2080 9: 2064 _Z3bari:1471 _Z3fooi:631 diff --git a/llvm/test/Transforms/SampleProfile/branch.ll b/llvm/test/Transforms/SampleProfile/branch.ll index ac68fd857bd..2ef01a76b0f 100644 --- a/llvm/test/Transforms/SampleProfile/branch.ll +++ b/llvm/test/Transforms/SampleProfile/branch.ll @@ -49,8 +49,8 @@ entry: %0 = load i32, i32* %argc.addr, align 4, !dbg !21 %cmp = icmp slt i32 %0, 2, !dbg !23 br i1 %cmp, label %if.then, label %if.end, !dbg !24 -; CHECK: edge entry -> if.then probability is 0x4ccccccd / 0x80000000 = 60.00% -; CHECK: edge entry -> if.end probability is 0x33333333 / 0x80000000 = 40.00% +; CHECK: edge entry -> if.then probability is 0x4ccf6b16 / 0x80000000 = 60.01% +; CHECK: edge entry -> if.end probability is 0x333094ea / 0x80000000 = 39.99% if.then: ; preds = %entry store i32 1, i32* %retval, align 4, !dbg !25 @@ -67,8 +67,8 @@ if.end: ; preds = %entry %3 = load i32, i32* %limit, align 4, !dbg !32 %cmp1 = icmp sgt i32 %3, 100, !dbg !34 br i1 %cmp1, label %if.then.2, label %if.else, !dbg !35 -; CHECK: edge if.end -> if.then.2 probability is 0x66666666 / 0x80000000 = 80.00% -; CHECK: edge if.end -> if.else probability is 0x1999999a / 0x80000000 = 20.00% +; CHECK: edge if.end -> if.then.2 probability is 0x6652c748 / 0x80000000 = 79.94% +; CHECK: edge if.end -> if.else probability is 0x19ad38b8 / 0x80000000 = 20.06% if.then.2: ; preds = %if.end call void @llvm.dbg.declare(metadata double* %s, metadata !36, metadata !17), !dbg !38 diff --git a/llvm/test/Transforms/SampleProfile/calls.ll b/llvm/test/Transforms/SampleProfile/calls.ll index 0105019c73e..bf10fea7aad 100644 --- a/llvm/test/Transforms/SampleProfile/calls.ll +++ b/llvm/test/Transforms/SampleProfile/calls.ll @@ -48,8 +48,8 @@ while.cond: ; preds = %if.end, %entry store i32 %inc, i32* %i, align 4, !dbg !14 %cmp = icmp slt i32 %0, 400000000, !dbg !14 br i1 %cmp, label %while.body, label %while.end, !dbg !14 -; CHECK: edge while.cond -> while.body probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge] -; CHECK: edge while.cond -> while.end probability is 0x00000000 / 0x80000000 = 0.00% +; CHECK: edge while.cond -> while.body probability is 0x7ffa4e20 / 0x80000000 = 99.98% [HOT edge] +; CHECK: edge while.cond -> while.end probability is 0x0005b1e0 / 0x80000000 = 0.02% while.body: ; preds = %while.cond %1 = load i32, i32* %i, align 4, !dbg !16 @@ -59,8 +59,8 @@ while.body: ; preds = %while.cond ; both branches out of while.body had the same weight. In reality, ; the edge while.body->if.then is taken most of the time. ; -; CHECK: edge while.body -> if.else probability is 0x00000000 / 0x80000000 = 0.00% -; CHECK: edge while.body -> if.then probability is 0x80000000 / 0x80000000 = 100.00% [HOT edge] +; CHECK: edge while.body -> if.else probability is 0x0005b1e0 / 0x80000000 = 0.02% +; CHECK: edge while.body -> if.then probability is 0x7ffa4e20 / 0x80000000 = 99.98% [HOT edge] if.then: ; preds = %while.body diff --git a/llvm/test/Transforms/SampleProfile/discriminator.ll b/llvm/test/Transforms/SampleProfile/discriminator.ll index 862c2ee43c5..d0b96a9ea16 100644 --- a/llvm/test/Transforms/SampleProfile/discriminator.ll +++ b/llvm/test/Transforms/SampleProfile/discriminator.ll @@ -35,15 +35,15 @@ while.cond: ; preds = %if.end, %entry %0 = load i32, i32* %i.addr, align 4, !dbg !12 %cmp = icmp slt i32 %0, 100, !dbg !12 br i1 %cmp, label %while.body, label %while.end, !dbg !12 -; CHECK: edge while.cond -> while.body probability is 0x7ebb907a / 0x80000000 = 99.01% [HOT edge] -; CHECK: edge while.cond -> while.end probability is 0x01446f86 / 0x80000000 = 0.99% +; CHECK: edge while.cond -> while.body probability is 0x7d83ba68 / 0x80000000 = 98.06% [HOT edge] +; CHECK: edge while.cond -> while.end probability is 0x027c4598 / 0x80000000 = 1.94% while.body: ; preds = %while.cond %1 = load i32, i32* %i.addr, align 4, !dbg !14 %cmp1 = icmp slt i32 %1, 50, !dbg !14 br i1 %cmp1, label %if.then, label %if.end, !dbg !14 -; CHECK: edge while.body -> if.then probability is 0x06666666 / 0x80000000 = 5.00% -; CHECK: edge while.body -> if.end probability is 0x7999999a / 0x80000000 = 95.00% [HOT edge] +; CHECK: edge while.body -> if.then probability is 0x07878788 / 0x80000000 = 5.88% +; CHECK: edge while.body -> if.end probability is 0x78787878 / 0x80000000 = 94.12% [HOT edge] if.then: ; preds = %while.body %2 = load i32, i32* %x, align 4, !dbg !17 diff --git a/llvm/test/Transforms/SampleProfile/entry_counts.ll b/llvm/test/Transforms/SampleProfile/entry_counts.ll index 1f7aceb8abb..6137a6908cf 100644 --- a/llvm/test/Transforms/SampleProfile/entry_counts.ll +++ b/llvm/test/Transforms/SampleProfile/entry_counts.ll @@ -2,7 +2,7 @@ ; RUN: opt < %s -passes=sample-profile -sample-profile-file=%S/Inputs/entry_counts.prof -S | FileCheck %s ; According to the profile, function empty() was called 13,293 times. -; CHECK: {{.*}} = !{!"function_entry_count", i64 13293} +; CHECK: {{.*}} = !{!"function_entry_count", i64 13294} define void @empty() !dbg !4 { entry: diff --git a/llvm/test/Transforms/SampleProfile/fnptr.ll b/llvm/test/Transforms/SampleProfile/fnptr.ll index b41fec7aed1..5359eee831f 100644 --- a/llvm/test/Transforms/SampleProfile/fnptr.ll +++ b/llvm/test/Transforms/SampleProfile/fnptr.ll @@ -8,12 +8,12 @@ ; RUN: opt < %s -passes=sample-profile -sample-profile-file=%S/Inputs/fnptr.prof | opt -analyze -branch-prob | FileCheck %s ; RUN: opt < %s -passes=sample-profile -sample-profile-file=%S/Inputs/fnptr.binprof | opt -analyze -branch-prob | FileCheck %s -; CHECK: edge for.body3 -> if.then probability is 0x1a4f3959 / 0x80000000 = 20.55% -; CHECK: edge for.body3 -> if.else probability is 0x65b0c6a7 / 0x80000000 = 79.45% -; CHECK: edge for.inc -> for.inc12 probability is 0x20dc8dc9 / 0x80000000 = 25.67% -; CHECK: edge for.inc -> for.body3 probability is 0x5f237237 / 0x80000000 = 74.33% -; CHECK: edge for.inc12 -> for.end14 probability is 0x00000000 / 0x80000000 = 0.00% -; CHECK: edge for.inc12 -> for.cond1.preheader probability is 0x80000000 / 0x80000000 = 100.00% +; CHECK: edge for.body3 -> if.then probability is 0x1a56a56a / 0x80000000 = 20.58% +; CHECK: edge for.body3 -> if.else probability is 0x65a95a96 / 0x80000000 = 79.42% +; CHECK: edge for.inc -> for.inc12 probability is 0x000fdc50 / 0x80000000 = 0.05% +; CHECK: edge for.inc -> for.body3 probability is 0x7ff023b0 / 0x80000000 = 99.95% +; CHECK: edge for.inc12 -> for.end14 probability is 0x40000000 / 0x80000000 = 50.00% +; CHECK: edge for.inc12 -> for.cond1.preheader probability is 0x40000000 / 0x80000000 = 50.00% ; Original C++ test case. ; diff --git a/llvm/test/Transforms/SampleProfile/offset.ll b/llvm/test/Transforms/SampleProfile/offset.ll index c8d52408e86..17ca21d7a57 100644 --- a/llvm/test/Transforms/SampleProfile/offset.ll +++ b/llvm/test/Transforms/SampleProfile/offset.ll @@ -29,8 +29,8 @@ entry: %0 = load i32, i32* %a.addr, align 4, !dbg !14 %cmp = icmp sgt i32 %0, 0, !dbg !18 br i1 %cmp, label %if.then, label %if.else, !dbg !19 -; CHECK: edge entry -> if.then probability is 0x0147ae14 / 0x80000000 = 1.00% -; CHECK: edge entry -> if.else probability is 0x7eb851ec / 0x80000000 = 99.00% [HOT edge] +; CHECK: edge entry -> if.then probability is 0x0167ba82 / 0x80000000 = 1.10% +; CHECK: edge entry -> if.else probability is 0x7e98457e / 0x80000000 = 98.90% [HOT edge] if.then: ; preds = %entry store i32 10, i32* %retval, align 4, !dbg !20 diff --git a/llvm/test/Transforms/SampleProfile/propagate.ll b/llvm/test/Transforms/SampleProfile/propagate.ll index a5796695ca0..45e3b8003ff 100644 --- a/llvm/test/Transforms/SampleProfile/propagate.ll +++ b/llvm/test/Transforms/SampleProfile/propagate.ll @@ -85,8 +85,8 @@ for.body: ; preds = %for.cond %div = sdiv i64 %7, 3, !dbg !43 %cmp2 = icmp sgt i64 %6, %div, !dbg !44 br i1 %cmp2, label %if.then3, label %if.end, !dbg !45 -; CHECK: edge for.body -> if.then3 probability is 0x51451451 / 0x80000000 = 63.49% -; CHECK: edge for.body -> if.end probability is 0x2ebaebaf / 0x80000000 = 36.51% +; CHECK: edge for.body -> if.then3 probability is 0x51292fa6 / 0x80000000 = 63.41% +; CHECK: edge for.body -> if.end probability is 0x2ed6d05a / 0x80000000 = 36.59% if.then3: ; preds = %for.body %8 = load i32, i32* %x.addr, align 4, !dbg !46 @@ -100,8 +100,8 @@ if.end: ; preds = %if.then3, %for.body %div4 = sdiv i64 %10, 4, !dbg !51 %cmp5 = icmp sgt i64 %9, %div4, !dbg !52 br i1 %cmp5, label %if.then6, label %if.else7, !dbg !53 -; CHECK: edge if.end -> if.then6 probability is 0x5dbaa1dc / 0x80000000 = 73.23% -; CHECK: edge if.end -> if.else7 probability is 0x22455e24 / 0x80000000 = 26.77% +; CHECK: edge if.end -> if.then6 probability is 0x5d89d89e / 0x80000000 = 73.08% +; CHECK: edge if.end -> if.else7 probability is 0x22762762 / 0x80000000 = 26.92% if.then6: ; preds = %if.end %11 = load i32, i32* %y.addr, align 4, !dbg !54 @@ -121,8 +121,8 @@ for.cond8: ; preds = %for.inc, %if.else7 %13 = load i64, i64* %j, align 8, !dbg !64 %cmp9 = icmp slt i64 %13, 100, !dbg !67 br i1 %cmp9, label %for.body10, label %for.end, !dbg !68 -; CHECK: edge for.cond8 -> for.body10 probability is 0x7e985735 / 0x80000000 = 98.90% [HOT edge] -; CHECK: edge for.cond8 -> for.end probability is 0x0167a8cb / 0x80000000 = 1.10% +; CHECK: edge for.cond8 -> for.body10 probability is 0x7e941a89 / 0x80000000 = 98.89% [HOT edge] +; CHECK: edge for.cond8 -> for.end probability is 0x016be577 / 0x80000000 = 1.11% for.body10: ; preds = %for.cond8 |