mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-12 23:40:54 +00:00
Create SampleProfileLoader pass in llvm instead of clang
Summary: We used to create SampleProfileLoader pass in clang. This makes LTO/ThinLTO unable to add this pass in the linker plugin. This patch moves the SampleProfileLoader pass creation from clang to llvm pass manager builder. Reviewers: tejohnson, davidxl, dnovillo Subscribers: llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D27743 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289714 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
85e1264a86
commit
932f24fa52
@ -149,6 +149,8 @@ public:
|
|||||||
std::string PGOInstrGen;
|
std::string PGOInstrGen;
|
||||||
/// Path of the profile data file.
|
/// Path of the profile data file.
|
||||||
std::string PGOInstrUse;
|
std::string PGOInstrUse;
|
||||||
|
/// Path of the sample Profile data file.
|
||||||
|
std::string PGOSampleUse;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// ExtensionList - This is list of all of the extensions that are registered.
|
/// ExtensionList - This is list of all of the extensions that are registered.
|
||||||
|
@ -383,6 +383,11 @@ void PassManagerBuilder::addFunctionSimplificationPasses(
|
|||||||
|
|
||||||
void PassManagerBuilder::populateModulePassManager(
|
void PassManagerBuilder::populateModulePassManager(
|
||||||
legacy::PassManagerBase &MPM) {
|
legacy::PassManagerBase &MPM) {
|
||||||
|
if (!PGOSampleUse.empty()) {
|
||||||
|
MPM.add(createPruneEHPass());
|
||||||
|
MPM.add(createSampleProfileLoaderPass(PGOSampleUse));
|
||||||
|
}
|
||||||
|
|
||||||
// Allow forcing function attributes as a debugging and tuning aid.
|
// Allow forcing function attributes as a debugging and tuning aid.
|
||||||
MPM.add(createForceFunctionAttrsLegacyPass());
|
MPM.add(createForceFunctionAttrsLegacyPass());
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user