forked from OSchip/llvm-project
parent
07d659bc76
commit
a85a8f9c2a
|
@ -464,8 +464,10 @@ void EmitAssemblyHelper::CreatePasses(legacy::PassManager &MPM,
|
|||
if (CodeGenOpts.hasProfileIRUse())
|
||||
PMBuilder.PGOInstrUse = CodeGenOpts.ProfileInstrumentUsePath;
|
||||
|
||||
if (!CodeGenOpts.SampleProfileFile.empty())
|
||||
PMBuilder.PGOSampleUse = CodeGenOpts.SampleProfileFile;
|
||||
if (!CodeGenOpts.SampleProfileFile.empty()) {
|
||||
MPM.add(createPruneEHPass());
|
||||
MPM.add(createSampleProfileLoaderPass(CodeGenOpts.SampleProfileFile));
|
||||
}
|
||||
|
||||
PMBuilder.populateFunctionPassManager(FPM);
|
||||
PMBuilder.populateModulePassManager(MPM);
|
||||
|
|
Loading…
Reference in New Issue