Mercurial > hg > CbC > CbC_llvm
view lib/Target/Mips/MipsModuleISelDAGToDAG.cpp @ 120:1172e4bd9c6f
update 4.0.0
author | mir3636 |
---|---|
date | Fri, 25 Nov 2016 19:14:25 +0900 |
parents | afa8332a0e37 |
children | 803732b1fca8 |
line wrap: on
line source
//===----------------------------------------------------------------------===// // 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 StringRef 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); }