diff options
author | Dehao Chen <dehao@google.com> | 2016-07-11 16:40:17 +0000 |
---|---|---|
committer | Dehao Chen <dehao@google.com> | 2016-07-11 16:40:17 +0000 |
commit | 29d2641f52fc1410845e874b829b7c039e01c50e (patch) | |
tree | b51ac17753d13ce6484ca121f4abadbb19346faf /llvm/test/Transforms/SampleProfile | |
parent | ddc3cc65cb16b3f655782d29f9fccb7488f826ec (diff) | |
download | bcm5719-llvm-29d2641f52fc1410845e874b829b7c039e01c50e.tar.gz bcm5719-llvm-29d2641f52fc1410845e874b829b7c039e01c50e.zip |
Tune the weight propagation algorithm for sample profile.
Summary: Handle the case when there is only one incoming/outgoing edge for a visited basic block: use the block weight to adjust edge weight even when the edge has been visited before. This can help reduce inaccuracies introduced by incorrect basic block profile, as shown in the updated unittest.
Reviewers: davidxl, dnovillo
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D22180
llvm-svn: 275072
Diffstat (limited to 'llvm/test/Transforms/SampleProfile')
-rw-r--r-- | llvm/test/Transforms/SampleProfile/fnptr.ll | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/test/Transforms/SampleProfile/fnptr.ll b/llvm/test/Transforms/SampleProfile/fnptr.ll index 540ddbd79c9..b41fec7aed1 100644 --- a/llvm/test/Transforms/SampleProfile/fnptr.ll +++ b/llvm/test/Transforms/SampleProfile/fnptr.ll @@ -10,10 +10,10 @@ ; 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 0x33d4a4c1 / 0x80000000 = 40.49% -; CHECK: edge for.inc -> for.body3 probability is 0x4c2b5b3f / 0x80000000 = 59.51% -; CHECK: edge for.inc12 -> for.end14 probability is 0x3f06d04e / 0x80000000 = 49.24% -; CHECK: edge for.inc12 -> for.cond1.preheader probability is 0x40f92fb2 / 0x80000000 = 50.76% +; 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% ; Original C++ test case. ; |