From 1f7f64665c2b7c1b36c6a6e74c349a4d9f854f0d Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 18 Jun 2019 02:05:06 +0000 Subject: 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 --- llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp | 4 +--- llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp | 4 +--- llvm/lib/CodeGen/GlobalISel/Legalizer.cpp | 4 +--- llvm/lib/CodeGen/GlobalISel/Localizer.cpp | 4 +--- llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp | 1 - 5 files changed, 4 insertions(+), 13 deletions(-) diff --git a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp index 3458479b7cd..3c7eeffbbd5 100644 --- a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp +++ b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp @@ -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 { diff --git a/llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp b/llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp index bbba28e5d6d..70694fe6b6c 100644 --- a/llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp +++ b/llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp @@ -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(); diff --git a/llvm/lib/CodeGen/GlobalISel/Legalizer.cpp b/llvm/lib/CodeGen/GlobalISel/Legalizer.cpp index 9efeeb4c5a3..b5b26bff34b 100644 --- a/llvm/lib/CodeGen/GlobalISel/Legalizer.cpp +++ b/llvm/lib/CodeGen/GlobalISel/Legalizer.cpp @@ -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(); diff --git a/llvm/lib/CodeGen/GlobalISel/Localizer.cpp b/llvm/lib/CodeGen/GlobalISel/Localizer.cpp index 9b99ec12b82..88c8d091723 100644 --- a/llvm/lib/CodeGen/GlobalISel/Localizer.cpp +++ b/llvm/lib/CodeGen/GlobalISel/Localizer.cpp @@ -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(); diff --git a/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp b/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp index c6e496dcb23..6a561392d8b 100644 --- a/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp +++ b/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp @@ -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) -- cgit v1.2.1