Skip to content
Snippets Groups Projects
Commit 28bb1469 authored by Stanislav Mekhanoshin's avatar Stanislav Mekhanoshin
Browse files

Use TargetMachine adjustPassManager hook

Differential Revision: https://reviews.llvm.org/D28340

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@293190 91177308-0d34-0410-b5e6-96231b3b80d8
parent ebb2227d
No related branches found
No related tags found
No related merge requests found
......@@ -334,13 +334,8 @@ void EmitAssemblyHelper::CreatePasses(legacy::PassManager &MPM,
MPM.add(new TargetLibraryInfoWrapperPass(*TLII));
// Add target-specific passes that need to run as early as possible.
if (TM)
PMBuilder.addExtension(
PassManagerBuilder::EP_EarlyAsPossible,
[&](const PassManagerBuilder &, legacy::PassManagerBase &PM) {
TM->addEarlyAsPossiblePasses(PM);
});
TM->adjustPassManager(PMBuilder);
PMBuilder.addExtension(PassManagerBuilder::EP_EarlyAsPossible,
addAddDiscriminatorsPass);
......
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