]> granicus.if.org Git - llvm/commit
Include GUIDs from the same module when computing GUIDs that needs to be imported.
authorDehao Chen <dehao@google.com>
Wed, 1 Nov 2017 20:26:47 +0000 (20:26 +0000)
committerDehao Chen <dehao@google.com>
Wed, 1 Nov 2017 20:26:47 +0000 (20:26 +0000)
commit2db2d47e39d2d1b07427e055ebfaeceb90794821
tree3fc6ee69ade0da3b4ee575a9a8e291c6309828f9
parent4d7894c6d831b2129c10b90ebe1c389ec1a3d758
Include GUIDs from the same module when computing GUIDs that needs to be imported.

Summary: In the compile phase of SamplePGO+ThinLTO, ICP is not invoked. Instead, indirect call targets will be included as function metadata for ThinIndex to buidl the call graph. This should not only include functions defined in other modules, but also functions defined in the same module, otherwise ThinIndex may find the callee dead and eliminate it, while ICP in backend will revive the symbol, which leads to undefined symbol.

Reviewers: tejohnson

Reviewed By: tejohnson

Subscribers: sanjoy, llvm-commits, mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317118 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ProfileData/SampleProf.h
lib/Transforms/IPO/SampleProfile.cpp
test/Transforms/SampleProfile/Inputs/function_metadata.prof [moved from test/Transforms/SampleProfile/Inputs/import.prof with 65% similarity]
test/Transforms/SampleProfile/function_metadata.ll [moved from test/Transforms/SampleProfile/import.ll with 52% similarity]