OSDN Git Service

Explicitly promote indirect calls before sample profile annotation.
authorDehao Chen <dehao@google.com>
Tue, 24 Jan 2017 21:05:51 +0000 (21:05 +0000)
committerDehao Chen <dehao@google.com>
Tue, 24 Jan 2017 21:05:51 +0000 (21:05 +0000)
commit706238d8b02dc0565bd38bc8ab3f442e71e9147b
tree32a7370b61a81da3a9e00834c4f6db57d6746d7b
parent815bff1cc4972406ec525202555e3c5c0812e3bd
Explicitly promote indirect calls before sample profile annotation.

Summary: In iterative sample pgo where profile is collected from PGOed binary, we may see indirect call targets promoted and inlined in the profile. Before profile annotation, we need to make this happen in order to annotate correctly on IR. This patch explicitly promotes these indirect calls and inlines them before profile annotation.

Reviewers: xur, davidxl

Reviewed By: davidxl

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292979 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/SampleProfile.cpp
test/Transforms/SampleProfile/Inputs/indirect-call.prof
test/Transforms/SampleProfile/indirect-call.ll