OSDN Git Service

Add call branch annotation for ICP promoted direct call in SamplePGO mode.
authorDehao Chen <dehao@google.com>
Thu, 23 Feb 2017 22:15:18 +0000 (22:15 +0000)
committerDehao Chen <dehao@google.com>
Thu, 23 Feb 2017 22:15:18 +0000 (22:15 +0000)
commit8580d5005b7d2aacf66e81079625dfd64d1d775f
treed0eaf3a07d8885728a122afa2b94a2d2ce9531b4
parent9bb4f10172a963415d97576498c60af4d8b3db61
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296028 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Passes/PassBuilder.h
include/llvm/Transforms/Instrumentation.h
include/llvm/Transforms/PGOInstrumentation.h
lib/Passes/PassBuilder.cpp
lib/Transforms/IPO/PassManagerBuilder.cpp
lib/Transforms/IPO/SampleProfile.cpp
lib/Transforms/Instrumentation/IndirectCallPromotion.cpp
test/Transforms/PGOProfile/indirect_call_promotion.ll