Use TargetMachine adjustPassManager hook
Differential Revision: https://reviews.llvm.org/D28340 llvm-svn: 293190
This commit is contained in:
parent
81598117b6
commit
61da067393
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue