diff options
author | Dehao Chen <dehao@google.com> | 2017-02-23 22:15:18 +0000 |
---|---|---|
committer | Dehao Chen <dehao@google.com> | 2017-02-23 22:15:18 +0000 |
commit | cc75d2441d664002174d9cca824502e352d8a3a8 (patch) | |
tree | 418513438854518e68e60b56096b8de26ef4aae9 /llvm/lib/Transforms/IPO/SampleProfile.cpp | |
parent | 635a7369b75d703798d8d8c02b1889ebb79dc67f (diff) | |
download | bcm5719-llvm-cc75d2441d664002174d9cca824502e352d8a3a8.tar.gz bcm5719-llvm-cc75d2441d664002174d9cca824502e352d8a3a8.zip |
Add call branch annotation for ICP promoted direct call in SamplePGO mode.
Summary: SamplePGO uses branch_weight annotation to represent callsite hotness. When ICP promotes an indirect call to direct call, we need to make sure the direct call is annotated with branch_weight in SamplePGO mode, so that downstream function inliner can use hot callsite heuristic.
Reviewers: davidxl, eraman, xur
Reviewed By: davidxl, xur
Subscribers: mehdi_amini, llvm-commits
Differential Revision: https://reviews.llvm.org/D30282
llvm-svn: 296028
Diffstat (limited to 'llvm/lib/Transforms/IPO/SampleProfile.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/SampleProfile.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/SampleProfile.cpp b/llvm/lib/Transforms/IPO/SampleProfile.cpp index 34891601cba..ad057d50cc3 100644 --- a/llvm/lib/Transforms/IPO/SampleProfile.cpp +++ b/llvm/lib/Transforms/IPO/SampleProfile.cpp @@ -646,7 +646,7 @@ bool SampleProfileLoader::inlineHotFunctions(Function &F) { // We set the probability to 80% taken to indicate that the static // call is likely taken. DI = dyn_cast<Instruction>( - promoteIndirectCall(I, CalledFunction, 80, 100) + promoteIndirectCall(I, CalledFunction, 80, 100, false) ->stripPointerCasts()); PromotedInsns.insert(I); } else { |