1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
llvm-mirror/lib/Target/Mips/MipsModuleISelDAGToDAG.cpp
Alexander Kornienko f993659b8f Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC)
Apparently, the style needs to be agreed upon first.

llvm-svn: 240390
2015-06-23 09:49:53 +00:00

51 lines
1.4 KiB
C++

//===----------------------------------------------------------------------===//
// Instruction Selector Subtarget Control
//===----------------------------------------------------------------------===//
//===----------------------------------------------------------------------===//
// This file defines a pass used to change the subtarget for the
// Mips Instruction selector.
//
//===----------------------------------------------------------------------===//
#include "Mips.h"
#include "MipsTargetMachine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
using namespace llvm;
#define DEBUG_TYPE "mips-isel"
namespace {
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;
};
char MipsModuleDAGToDAGISel::ID = 0;
}
bool MipsModuleDAGToDAGISel::runOnMachineFunction(MachineFunction &MF) {
DEBUG(errs() << "In MipsModuleDAGToDAGISel::runMachineFunction\n");
TM.resetSubtarget(&MF);
return false;
}
llvm::FunctionPass *llvm::createMipsModuleISelDagPass(MipsTargetMachine &TM) {
return new MipsModuleDAGToDAGISel(TM);
}