]> granicus.if.org Git - llvm/commit
Update the new PM pipeline to make ICP aware if it is SamplePGO build.
authorDehao Chen <dehao@google.com>
Wed, 2 Aug 2017 01:28:31 +0000 (01:28 +0000)
committerDehao Chen <dehao@google.com>
Wed, 2 Aug 2017 01:28:31 +0000 (01:28 +0000)
commitcbd284128f6bede7c09c6e28dd205d948a5d6ddf
tree51bbdbc79709dedc742122869590459840f8fdf8
parentdbd873dceb685962f5be9bb84c7fd1fb61f64530
Update the new PM pipeline to make ICP aware if it is SamplePGO build.

Summary: In ThinLTO backend compile, OPTOptions are not set so that the ICP in ThinLTO backend does not know if it is a SamplePGO build, in which profile count needs to be annotated directly on call instructions. This patch cleaned up the PGOOptions handling logic and passes down PGOOptions to ThinLTO backend.

Reviewers: chandlerc, tejohnson, davidxl

Reviewed By: chandlerc

Subscribers: sanjoy, llvm-commits, mehdi_amini

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309780 91177308-0d34-0410-b5e6-96231b3b80d8
lib/LTO/LTOBackend.cpp
lib/Passes/PassBuilder.cpp
test/LTO/Resolution/X86/Inputs/load-sample-prof-icp.prof [new file with mode: 0644]
test/LTO/Resolution/X86/load-sample-prof-icp.ll [new file with mode: 0644]