forked from OSchip/llvm-project
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: mehdi_amini, cfe-commits Differential Revision: https://reviews.llvm.org/D27744 llvm-svn: 289715
This commit is contained in:
parent
a99e082e15
commit
5717aff105
|
@ -464,10 +464,8 @@ void EmitAssemblyHelper::CreatePasses(legacy::PassManager &MPM,
|
|||
if (CodeGenOpts.hasProfileIRUse())
|
||||
PMBuilder.PGOInstrUse = CodeGenOpts.ProfileInstrumentUsePath;
|
||||
|
||||
if (!CodeGenOpts.SampleProfileFile.empty()) {
|
||||
MPM.add(createPruneEHPass());
|
||||
MPM.add(createSampleProfileLoaderPass(CodeGenOpts.SampleProfileFile));
|
||||
}
|
||||
if (!CodeGenOpts.SampleProfileFile.empty())
|
||||
PMBuilder.PGOSampleUse = CodeGenOpts.SampleProfileFile;
|
||||
|
||||
PMBuilder.populateFunctionPassManager(FPM);
|
||||
PMBuilder.populateModulePassManager(MPM);
|
||||
|
|
Loading…
Reference in New Issue