forked from OSchip/llvm-project
GlobalISel: Remove redundant pass initialization
Summary: All the GlobalISel passes are initialized when the target calls initializeGlobalISel(), so we don't need to call the initializers from the pass constructors. Reviewers: qcolombet, t.p.northover, paquette, dsanders, aemerson, aditya_nandakumar Reviewed By: aemerson Subscribers: rovka, kristof.beyls, hiraditya, volkan, Petar.Avramovic, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63235 llvm-svn: 363642
This commit is contained in:
parent
9216358c21
commit
1f7f64665c
|
@ -106,9 +106,7 @@ static void reportTranslationError(MachineFunction &MF,
|
|||
ORE.emit(R);
|
||||
}
|
||||
|
||||
IRTranslator::IRTranslator() : MachineFunctionPass(ID) {
|
||||
initializeIRTranslatorPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
IRTranslator::IRTranslator() : MachineFunctionPass(ID) { }
|
||||
|
||||
#ifndef NDEBUG
|
||||
namespace {
|
||||
|
|
|
@ -49,9 +49,7 @@ INITIALIZE_PASS_END(InstructionSelect, DEBUG_TYPE,
|
|||
"Select target instructions out of generic instructions",
|
||||
false, false)
|
||||
|
||||
InstructionSelect::InstructionSelect() : MachineFunctionPass(ID) {
|
||||
initializeInstructionSelectPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
InstructionSelect::InstructionSelect() : MachineFunctionPass(ID) { }
|
||||
|
||||
void InstructionSelect::getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.addRequired<TargetPassConfig>();
|
||||
|
|
|
@ -50,9 +50,7 @@ INITIALIZE_PASS_END(Legalizer, DEBUG_TYPE,
|
|||
"Legalize the Machine IR a function's Machine IR", false,
|
||||
false)
|
||||
|
||||
Legalizer::Legalizer() : MachineFunctionPass(ID) {
|
||||
initializeLegalizerPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
Legalizer::Legalizer() : MachineFunctionPass(ID) { }
|
||||
|
||||
void Legalizer::getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.addRequired<TargetPassConfig>();
|
||||
|
|
|
@ -29,9 +29,7 @@ INITIALIZE_PASS_END(Localizer, DEBUG_TYPE,
|
|||
"Move/duplicate certain instructions close to their use",
|
||||
false, false)
|
||||
|
||||
Localizer::Localizer() : MachineFunctionPass(ID) {
|
||||
initializeLocalizerPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
Localizer::Localizer() : MachineFunctionPass(ID) { }
|
||||
|
||||
void Localizer::init(MachineFunction &MF) {
|
||||
MRI = &MF.getRegInfo();
|
||||
|
|
|
@ -71,7 +71,6 @@ INITIALIZE_PASS_END(RegBankSelect, DEBUG_TYPE,
|
|||
|
||||
RegBankSelect::RegBankSelect(Mode RunningMode)
|
||||
: MachineFunctionPass(ID), OptMode(RunningMode) {
|
||||
initializeRegBankSelectPass(*PassRegistry::getPassRegistry());
|
||||
if (RegBankSelectMode.getNumOccurrences() != 0) {
|
||||
OptMode = RegBankSelectMode;
|
||||
if (RegBankSelectMode != RunningMode)
|
||||
|
|
Loading…
Reference in New Issue