diff --git a/lib/Target/X86/ShadowCallStack.cpp b/lib/Target/X86/ShadowCallStack.cpp index 9a39455f9dd..ab2cebcb58e 100644 --- a/lib/Target/X86/ShadowCallStack.cpp +++ b/lib/Target/X86/ShadowCallStack.cpp @@ -31,10 +31,6 @@ using namespace llvm; -namespace llvm { -void initializeShadowCallStackPass(PassRegistry &); -} - namespace { class ShadowCallStack : public MachineFunctionPass { diff --git a/lib/Target/X86/X86.h b/lib/Target/X86/X86.h index d5405703fdf..19f8e35ade0 100644 --- a/lib/Target/X86/X86.h +++ b/lib/Target/X86/X86.h @@ -115,8 +115,6 @@ FunctionPass *createX86FixupBWInsts(); /// to another, when profitable. FunctionPass *createX86DomainReassignmentPass(); -void initializeFixupBWInstPassPass(PassRegistry &); - /// This pass replaces EVEX encoded of AVX-512 instructiosn by VEX /// encoding when possible in order to reduce code size. FunctionPass *createX86EvexToVexInsts(); @@ -128,10 +126,21 @@ InstructionSelector *createX86InstructionSelector(const X86TargetMachine &TM, X86Subtarget &, X86RegisterBankInfo &); -void initializeEvexToVexInstPassPass(PassRegistry &); - FunctionPass *createX86SpeculativeLoadHardeningPass(); +void initializeEvexToVexInstPassPass(PassRegistry &); +void initializeFixupBWInstPassPass(PassRegistry &); +void initializeFixupLEAPassPass(PassRegistry &); +void initializeShadowCallStackPass(PassRegistry &); +void initializeWinEHStatePassPass(PassRegistry &); +void initializeX86AvoidSFBPassPass(PassRegistry &); +void initializeX86CallFrameOptimizationPass(PassRegistry &); +void initializeX86CmovConverterPassPass(PassRegistry &); +void initializeX86DomainReassignmentPass(PassRegistry &); +void initializeX86ExecutionDomainFixPass(PassRegistry &); +void initializeX86FlagsCopyLoweringPassPass(PassRegistry &); +void initializeX86SpeculativeLoadHardeningPassPass(PassRegistry &); + } // End llvm namespace #endif diff --git a/lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp b/lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp index ab2cbfc33e1..eb9c4b3e597 100644 --- a/lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp +++ b/lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp @@ -52,10 +52,6 @@ using namespace llvm; #define DEBUG_TYPE "x86-avoid-SFB" -namespace llvm { -void initializeX86AvoidSFBPassPass(PassRegistry &); -} // end namespace llvm - static cl::opt DisableX86AvoidStoreForwardBlocks( "x86-disable-avoid-SFB", cl::Hidden, cl::desc("X86: Disable Store Forwarding Blocks fixup."), cl::init(false)); diff --git a/lib/Target/X86/X86CallFrameOptimization.cpp b/lib/Target/X86/X86CallFrameOptimization.cpp index c73fd6eb144..24d7a219e75 100644 --- a/lib/Target/X86/X86CallFrameOptimization.cpp +++ b/lib/Target/X86/X86CallFrameOptimization.cpp @@ -56,10 +56,6 @@ static cl::opt cl::desc("Avoid optimizing x86 call frames for size"), cl::init(false), cl::Hidden); -namespace llvm { -void initializeX86CallFrameOptimizationPass(PassRegistry &); -} - namespace { class X86CallFrameOptimization : public MachineFunctionPass { diff --git a/lib/Target/X86/X86CmovConversion.cpp b/lib/Target/X86/X86CmovConversion.cpp index 1c5f110d8c6..c3e76fd2a85 100644 --- a/lib/Target/X86/X86CmovConversion.cpp +++ b/lib/Target/X86/X86CmovConversion.cpp @@ -81,12 +81,6 @@ STATISTIC(NumOfCmovGroupCandidate, "Number of CMOV-group candidates"); STATISTIC(NumOfLoopCandidate, "Number of CMOV-conversion profitable loops"); STATISTIC(NumOfOptimizedCmovGroups, "Number of optimized CMOV-groups"); -namespace llvm { - -void initializeX86CmovConverterPassPass(PassRegistry &); - -} // end namespace llvm - // This internal switch can be used to turn off the cmov/branch optimization. static cl::opt EnableCmovConverter("x86-cmov-converter", diff --git a/lib/Target/X86/X86DomainReassignment.cpp b/lib/Target/X86/X86DomainReassignment.cpp index 62588e9509d..7e1f1e7876c 100644 --- a/lib/Target/X86/X86DomainReassignment.cpp +++ b/lib/Target/X86/X86DomainReassignment.cpp @@ -31,10 +31,6 @@ using namespace llvm; -namespace llvm { -void initializeX86DomainReassignmentPass(PassRegistry &); -} - #define DEBUG_TYPE "x86-domain-reassignment" STATISTIC(NumClosuresConverted, "Number of closures converted by the pass"); diff --git a/lib/Target/X86/X86FixupLEAs.cpp b/lib/Target/X86/X86FixupLEAs.cpp index 33a8baac594..ed24d6a8547 100644 --- a/lib/Target/X86/X86FixupLEAs.cpp +++ b/lib/Target/X86/X86FixupLEAs.cpp @@ -25,10 +25,6 @@ #include "llvm/Support/raw_ostream.h" using namespace llvm; -namespace llvm { -void initializeFixupLEAPassPass(PassRegistry &); -} - #define FIXUPLEA_DESC "X86 LEA Fixup" #define FIXUPLEA_NAME "x86-fixup-LEAs" diff --git a/lib/Target/X86/X86SpeculativeLoadHardening.cpp b/lib/Target/X86/X86SpeculativeLoadHardening.cpp index 14e4c455a08..b8cb11fb862 100644 --- a/lib/Target/X86/X86SpeculativeLoadHardening.cpp +++ b/lib/Target/X86/X86SpeculativeLoadHardening.cpp @@ -119,12 +119,6 @@ static cl::opt HardenIndirectCallsAndJumps( "mitigate Spectre v1.2 style attacks."), cl::init(true), cl::Hidden); -namespace llvm { - -void initializeX86SpeculativeLoadHardeningPassPass(PassRegistry &); - -} // end namespace llvm - namespace { class X86SpeculativeLoadHardeningPass : public MachineFunctionPass { diff --git a/lib/Target/X86/X86TargetMachine.cpp b/lib/Target/X86/X86TargetMachine.cpp index 3583a9cfb8d..6426e5b076c 100644 --- a/lib/Target/X86/X86TargetMachine.cpp +++ b/lib/Target/X86/X86TargetMachine.cpp @@ -59,21 +59,6 @@ static cl::opt EnableCondBrFoldingPass("x86-condbr-folding", "folding pass"), cl::init(true), cl::Hidden); -namespace llvm { - -void initializeWinEHStatePassPass(PassRegistry &); -void initializeFixupLEAPassPass(PassRegistry &); -void initializeShadowCallStackPass(PassRegistry &); -void initializeX86CallFrameOptimizationPass(PassRegistry &); -void initializeX86CmovConverterPassPass(PassRegistry &); -void initializeX86ExecutionDomainFixPass(PassRegistry &); -void initializeX86DomainReassignmentPass(PassRegistry &); -void initializeX86AvoidSFBPassPass(PassRegistry &); -void initializeX86SpeculativeLoadHardeningPassPass(PassRegistry &); -void initializeX86FlagsCopyLoweringPassPass(PassRegistry &); - -} // end namespace llvm - extern "C" void LLVMInitializeX86Target() { // Register the target. RegisterTargetMachine X(getTheX86_32Target()); diff --git a/lib/Target/X86/X86WinEHState.cpp b/lib/Target/X86/X86WinEHState.cpp index c11e7e365a1..185deda97c1 100644 --- a/lib/Target/X86/X86WinEHState.cpp +++ b/lib/Target/X86/X86WinEHState.cpp @@ -34,10 +34,6 @@ using namespace llvm; #define DEBUG_TYPE "winehstate" -namespace llvm { -void initializeWinEHStatePassPass(PassRegistry &); -} - namespace { const int OverdefinedState = INT_MIN;