]> granicus.if.org Git - llvm/commit
Build SymbolMap in SampleProfileLoader to help matchin function names with suffix.
authorDehao Chen <dehao@google.com>
Mon, 17 Apr 2017 22:23:05 +0000 (22:23 +0000)
committerDehao Chen <dehao@google.com>
Mon, 17 Apr 2017 22:23:05 +0000 (22:23 +0000)
commit62b2c39c08511b4863f306e85a378276f0056c7d
treeebb44d7c2f6f17e747394fe4d8cbca88b13370b3
parente8773635a3b0d4c1778826f61afbdebee881d7d1
Build SymbolMap in SampleProfileLoader to help matchin function names with suffix.

Summary: If there is suffix added in the function name (e.g. module hash added by thinLTO), we will not be able to find a match in profile as the suffix does not exist in profile. This patch build a map from function name to Function *. The map includes the entry for the stripped function name so that inlineHotFunctions can find the corresponding function to promote/inline.

Reviewers: davidxl, dnovillo, tejohnson

Reviewed By: davidxl

Subscribers: mehdi_amini, llvm-commits

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

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