Make ICP uses PSI to check for hotness.
authorDehao Chen <dehao@google.com>
Tue, 8 Aug 2017 20:57:33 +0000 (20:57 +0000)
committerDehao Chen <dehao@google.com>
Tue, 8 Aug 2017 20:57:33 +0000 (20:57 +0000)
commit34cfcb29aaccbba4e00786013db1a0db77838eae
tree9c1703e388e5798f1d357d7dbbd1f308acd627c5
parent512253292cfd21d59a175156402c54fb64e97ef8
Make ICP uses PSI to check for hotness.

Summary: Currently, ICP checks the count against a fixed value to see if it is hot enough to be promoted. This does not work for SamplePGO because sampled count may be much smaller. This patch uses PSI to check if the count is hot enough to be promoted.

Reviewers: davidxl, tejohnson, eraman

Reviewed By: davidxl

Subscribers: sanjoy, llvm-commits, mehdi_amini

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

llvm-svn: 310416
llvm/lib/Analysis/IndirectCallPromotionAnalysis.cpp
llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp
llvm/test/Other/new-pm-lto-defaults.ll
llvm/test/Transforms/PGOProfile/icp_invoke.ll
llvm/test/Transforms/PGOProfile/indirect_call_promotion.ll
llvm/test/Transforms/PGOProfile/thinlto_indirect_call_promotion.ll
llvm/test/Transforms/PGOProfile/thinlto_samplepgo_icp.ll