[PATCH] D30754: SamplePGO ThinLTO ICP fix for local functions.

Dehao Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 8 12:55:52 PST 2017


danielcdh created this revision.
Herald added a subscriber: Prazek.

In SamplePGO, if the profile is collected from non-LTO binary, and used to drive ThinLTO, the indirect call promotion may fail because the function name will mismatch as ThinLTO added module ID in the local function name. This patch tries at the best effort to find the GUID from the unpromoted local function name (in profile), and use that in ICP promotion.


https://reviews.llvm.org/D30754

Files:
  include/llvm/IR/ModuleSummaryIndex.h
  include/llvm/ProfileData/SampleProfReader.h
  lib/Bitcode/Reader/BitcodeReader.cpp
  lib/Bitcode/Writer/BitcodeWriter.cpp
  lib/ProfileData/InstrProf.cpp
  lib/Transforms/IPO/FunctionImport.cpp
  lib/Transforms/IPO/SampleProfile.cpp
  test/Bitcode/thinlto-function-summary-originalnames.ll
  test/Transforms/PGOProfile/Inputs/thinlto_samplepgo_icp.ll
  test/Transforms/PGOProfile/thinlto_samplepgo_icp.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30754.91061.patch
Type: text/x-patch
Size: 12951 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170308/043545c9/attachment.bin>


More information about the llvm-commits mailing list