diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp | 20 | ||||
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp | 19 |
2 files changed, 2 insertions, 37 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp b/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp index f22e17c296d..a88f5f4a75a 100644 --- a/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp +++ b/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp @@ -36,10 +36,6 @@ MaxNumOfUsesForConstExtenders("ga-max-num-uses-for-constant-extenders", // Instruction Selector Implementation //===----------------------------------------------------------------------===// -namespace llvm { - void initializeHexagonDAGToDAGISelPass(PassRegistry&); -} - //===--------------------------------------------------------------------===// /// HexagonDAGToDAGISel - Hexagon specific code to select Hexagon machine /// instructions for SelectionDAG operations. @@ -54,9 +50,7 @@ public: explicit HexagonDAGToDAGISel(HexagonTargetMachine &tm, CodeGenOpt::Level OptLevel) : SelectionDAGISel(tm, OptLevel), HTM(tm), HST(nullptr), HII(nullptr), - HRI(nullptr) { - initializeHexagonDAGToDAGISelPass(*PassRegistry::getPassRegistry()); - } + HRI(nullptr) {} bool runOnMachineFunction(MachineFunction &MF) override { // Reset the subtarget each time through. @@ -200,18 +194,6 @@ FunctionPass *createHexagonISelDag(HexagonTargetMachine &TM, } } -static void initializePassOnce(PassRegistry &Registry) { - const char *Name = "Hexagon DAG->DAG Pattern Instruction Selection"; - PassInfo *PI = new PassInfo(Name, "hexagon-isel", - &SelectionDAGISel::ID, nullptr, false, false); - Registry.registerPass(*PI, true); -} - -void llvm::initializeHexagonDAGToDAGISelPass(PassRegistry &Registry) { - CALL_ONCE_INITIALIZATION(initializePassOnce) -} - - // Intrinsics that return a a predicate. static bool doesIntrinsicReturnPredicate(unsigned ID) { switch (ID) { diff --git a/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp b/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp index f68674b5bf8..47b5b58ff3b 100644 --- a/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp +++ b/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp @@ -59,10 +59,6 @@ static cl::opt<bool> EnableBranchHint( cl::desc("Enable static hinting of branches on ppc"), cl::Hidden); -namespace llvm { - void initializePPCDAGToDAGISelPass(PassRegistry&); -} - namespace { //===--------------------------------------------------------------------===// /// PPCDAGToDAGISel - PPC specific code to select PPC machine @@ -75,9 +71,7 @@ namespace { unsigned GlobalBaseReg; public: explicit PPCDAGToDAGISel(PPCTargetMachine &tm) - : SelectionDAGISel(tm), TM(tm) { - initializePPCDAGToDAGISelPass(*PassRegistry::getPassRegistry()); - } + : SelectionDAGISel(tm), TM(tm) {} bool runOnMachineFunction(MachineFunction &MF) override { // Make sure we re-emit a set of the global base reg if necessary @@ -4431,14 +4425,3 @@ void PPCDAGToDAGISel::PeepholePPC64() { FunctionPass *llvm::createPPCISelDag(PPCTargetMachine &TM) { return new PPCDAGToDAGISel(TM); } - -static void initializePassOnce(PassRegistry &Registry) { - const char *Name = "PowerPC DAG->DAG Pattern Instruction Selection"; - PassInfo *PI = new PassInfo(Name, "ppc-codegen", &SelectionDAGISel::ID, - nullptr, false, false); - Registry.registerPass(*PI, true); -} - -void llvm::initializePPCDAGToDAGISelPass(PassRegistry &Registry) { - CALL_ONCE_INITIALIZATION(initializePassOnce); -} |