1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 05:23:45 +02:00
llvm-mirror/lib/Target/Mips/MipsModuleISelDAGToDAG.cpp
Benjamin Kramer 915259b254 Move unreferenced passes into the cpp file
NFC.

llvm-svn: 231661
2015-03-09 15:50:58 +00:00

59 lines
1.7 KiB
C++

//===----------------------------------------------------------------------===//
// Instruction Selector Subtarget Control
//===----------------------------------------------------------------------===//
//===----------------------------------------------------------------------===//
// This file defines a pass used to change the subtarget for the
// Mips Instruction selector.
//
//===----------------------------------------------------------------------===//
#include "MipsISelDAGToDAG.h"
#include "MipsModuleISelDAGToDAG.h"
#include "MipsTargetMachine.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
using namespace llvm;
#define DEBUG_TYPE "mips-isel"
namespace {
//===----------------------------------------------------------------------===//
// MipsModuleDAGToDAGISel - MIPS specific code to select MIPS machine
// instructions for SelectionDAG operations.
//===----------------------------------------------------------------------===//
class MipsModuleDAGToDAGISel : public MachineFunctionPass {
public:
static char ID;
explicit MipsModuleDAGToDAGISel(MipsTargetMachine &TM_)
: MachineFunctionPass(ID), TM(TM_) {}
// Pass Name
const char *getPassName() const override {
return "MIPS DAG->DAG Pattern Instruction Selection";
}
bool runOnMachineFunction(MachineFunction &MF) override;
protected:
MipsTargetMachine &TM;
};
} // namespace
bool MipsModuleDAGToDAGISel::runOnMachineFunction(MachineFunction &MF) {
DEBUG(errs() << "In MipsModuleDAGToDAGISel::runMachineFunction\n");
TM.resetSubtarget(&MF);
return false;
}
char MipsModuleDAGToDAGISel::ID = 0;
llvm::FunctionPass *llvm::createMipsModuleISelDag(MipsTargetMachine &TM) {
return new MipsModuleDAGToDAGISel(TM);
}