HomePhabricator

[ThinLTO] Perform profile-guided indirect call promotion

Authored by tejohnson on Jul 17 2016, 7:47 AM.

Description

[ThinLTO] Perform profile-guided indirect call promotion

Summary:
To enable profile-guided indirect call promotion in ThinLTO mode, we
simply add call graph edges for each profitable target from the profile
to the summaries, then the summary-guided importing will consider the
callee for importing as usual.

Also we need to enable the indirect call promotion pass creation in the
PassManagerBuilder when PerformThinLTO=true (we are in the ThinLTO
backend), so that the newly imported functions are considered for
promotion in the backends.

The IC promotion profiles refer to callees by GUID, which required
adding GUIDs to the per-module VST in bitcode (and assigning them
valueIds similar to how they are assigned valueIds in the combined
index).

Reviewers: mehdi_amini, xur

Subscribers: mehdi_amini, davidxl, llvm-commits

Differential Revision: http://reviews.llvm.org/D21932

llvm-svn: 275707

Details

Committed
tejohnsonJul 17 2016, 7:47 AM
Differential Revision
D21932: [ThinLTO] Perform profile-guided indirect call promotion
Parents
rGce7de9b6fba7: Address review comments.
Branches
Unknown
Tags
Unknown