]> granicus.if.org Git - llvm/commit
[SampleProfile] Repeat indirect call promotion only when the target is actually hot.
authorTaewook Oh <twoh@fb.com>
Tue, 2 Apr 2019 15:48:21 +0000 (15:48 +0000)
committerTaewook Oh <twoh@fb.com>
Tue, 2 Apr 2019 15:48:21 +0000 (15:48 +0000)
commit2b32e0123f52d49684d9cae9f0210a796e8f021a
tree6924e1685daea1a7efda38db7c6095a2d9347aeb
parent5fc1c8d59b35c30ee9912e06894612c177465415
[SampleProfile] Repeat indirect call promotion only when the target is actually hot.

Summary: It is possible that multiple indirect call targets have been promoted for a single callsite from the profiled binary. Current implementation repeats promotion for all these targets as far as the callsite itself is hot (the callsite is assumed to be hot if any one of these targets was "hot" during the profiling). However, even when one of the ICPed target is hot other targets may not, and we should not repeat promotion for "cold" targets.

Reviewers: danielcdh, wmi

Subscribers: hiraditya, jdoerfert, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357484 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/SampleProfile.cpp
test/Transforms/SampleProfile/Inputs/cold-indirect-call.prof [new file with mode: 0644]
test/Transforms/SampleProfile/cold-indirect-call.ll [new file with mode: 0644]