revert r289670 which breaks bot.

llvm-svn: 289675
This commit is contained in:
Dehao Chen 2016-12-14 17:22:53 +00:00
parent 07d659bc76
commit a85a8f9c2a
1 changed files with 4 additions and 2 deletions

View File

@ -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);