1 //===----------------------------------------------------------------------===//
2 // Instruction Selector Subtarget Control
3 //===----------------------------------------------------------------------===//
5 //===----------------------------------------------------------------------===//
6 // This file defines a pass used to change the subtarget for the
7 // Mips Instruction selector.
9 //===----------------------------------------------------------------------===//
11 #include "MipsISelDAGToDAG.h"
12 #include "MipsModuleISelDAGToDAG.h"
13 #include "llvm/Support/Casting.h"
14 #include "llvm/Support/Debug.h"
15 #include "llvm/Support/raw_ostream.h"
17 #define DEBUG_TYPE "mips-isel"
21 bool MipsModuleDAGToDAGISel::runOnMachineFunction(MachineFunction &MF) {
22 DEBUG(errs() << "In MipsModuleDAGToDAGISel::runMachineFunction\n");
23 TM.resetSubtarget(&MF);
27 char MipsModuleDAGToDAGISel::ID = 0;
32 llvm::FunctionPass *llvm::createMipsModuleISelDag(MipsTargetMachine &TM) {
33 return new MipsModuleDAGToDAGISel(TM);