OSDN Git Service

Only set branch weight during sample pgo annotation when max_weight of the branch...
authorDehao Chen <dehao@google.com>
Mon, 19 Sep 2016 16:33:41 +0000 (16:33 +0000)
committerDehao Chen <dehao@google.com>
Mon, 19 Sep 2016 16:33:41 +0000 (16:33 +0000)
commitba3d957955dcba7a35eda72c6bb301bdf753a482
tree9c369b07664f3325c8ffa8c3f8032de10ca6ca4d
parent625183db5aefe31deffea186e4cf6e85b2861edb
Only set branch weight during sample pgo annotation when max_weight of the branch is non-zero. Otherwise use default static profile to set branch probability.

Summary: It does not make sense to set equal weights for all unkown branches as we have static branch prediction available.

Reviewers: dnovillo

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D24732

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281912 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/SampleProfile.cpp
test/Transforms/SampleProfile/fnptr.ll