Skip to content
Snippets Groups Projects
Commit ebfbe408 authored by Dehao Chen's avatar Dehao Chen
Browse files

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289715 91177308-0d34-0410-b5e6-96231b3b80d8
parent e9976eea
No related branches found
No related tags found
No related merge requests found
...@@ -464,10 +464,8 @@ void EmitAssemblyHelper::CreatePasses(legacy::PassManager &MPM, ...@@ -464,10 +464,8 @@ void EmitAssemblyHelper::CreatePasses(legacy::PassManager &MPM,
if (CodeGenOpts.hasProfileIRUse()) if (CodeGenOpts.hasProfileIRUse())
PMBuilder.PGOInstrUse = CodeGenOpts.ProfileInstrumentUsePath; PMBuilder.PGOInstrUse = CodeGenOpts.ProfileInstrumentUsePath;
if (!CodeGenOpts.SampleProfileFile.empty()) { if (!CodeGenOpts.SampleProfileFile.empty())
MPM.add(createPruneEHPass()); PMBuilder.PGOSampleUse = CodeGenOpts.SampleProfileFile;
MPM.add(createSampleProfileLoaderPass(CodeGenOpts.SampleProfileFile));
}
PMBuilder.populateFunctionPassManager(FPM); PMBuilder.populateFunctionPassManager(FPM);
PMBuilder.populateModulePassManager(MPM); PMBuilder.populateModulePassManager(MPM);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment