summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2016-06-03 10:13:31 +0000
committerChandler Carruth <chandlerc@gmail.com>2016-06-03 10:13:31 +0000
commit9ac86efd4ddc82762cc543d93185fae808d0d4a4 (patch)
tree4a0d28459261a6eead4fd46dfb1cbc594b267d52 /llvm/lib
parentd474144a7a523fc8a00624a5d8312a015635d4de (diff)
downloadbcm5719-llvm-9ac86efd4ddc82762cc543d93185fae808d0d4a4.tar.gz
bcm5719-llvm-9ac86efd4ddc82762cc543d93185fae808d0d4a4.zip
Remove bogus initialization of the PPC and Hexagon SelectionDAGISel
subclasses. These are not passes proper. We don't support registering them, they can't be constructed with default arguments, and the ID is actually in a base class. Only these two targets even had any boiler plate to try to do this, and it had to be munged out of the INITIALIZE_PASS macros to work. What's worse, the boiler plate has rotted and the "name" of the pass is actually the description string now!!! =/ All of this is completely unnecessary. No other target bothers, and nothing breaks if you don't initialize them because CodeGen has an entirely separate initialization path that is somewhat more durable than relying on the implicit initialization the way the 'opt' tool does for registered passes. llvm-svn: 271650
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp20
-rw-r--r--llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp19
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);
-}
OpenPOWER on IntegriCloud