1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

X86: Consistently declare pass initializers in X86.h; NFC

This avoids declaring them twice: in X86TargetMachine.cpp and the file
implementing the pass.

llvm-svn: 345801
This commit is contained in:
Matthias Braun 2018-11-01 00:38:01 +00:00
parent 17defd68a8
commit dc5f305f29
10 changed files with 13 additions and 55 deletions

View File

@ -31,10 +31,6 @@
using namespace llvm;
namespace llvm {
void initializeShadowCallStackPass(PassRegistry &);
}
namespace {
class ShadowCallStack : public MachineFunctionPass {

View File

@ -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

View File

@ -52,10 +52,6 @@ using namespace llvm;
#define DEBUG_TYPE "x86-avoid-SFB"
namespace llvm {
void initializeX86AvoidSFBPassPass(PassRegistry &);
} // end namespace llvm
static cl::opt<bool> DisableX86AvoidStoreForwardBlocks(
"x86-disable-avoid-SFB", cl::Hidden,
cl::desc("X86: Disable Store Forwarding Blocks fixup."), cl::init(false));

View File

@ -56,10 +56,6 @@ static cl::opt<bool>
cl::desc("Avoid optimizing x86 call frames for size"),
cl::init(false), cl::Hidden);
namespace llvm {
void initializeX86CallFrameOptimizationPass(PassRegistry &);
}
namespace {
class X86CallFrameOptimization : public MachineFunctionPass {

View File

@ -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<bool>
EnableCmovConverter("x86-cmov-converter",

View File

@ -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");

View File

@ -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"

View File

@ -119,12 +119,6 @@ static cl::opt<bool> 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 {

View File

@ -59,21 +59,6 @@ static cl::opt<bool> 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<X86TargetMachine> X(getTheX86_32Target());

View File

@ -34,10 +34,6 @@ using namespace llvm;
#define DEBUG_TYPE "winehstate"
namespace llvm {
void initializeWinEHStatePassPass(PassRegistry &);
}
namespace {
const int OverdefinedState = INT_MIN;