LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MipsModuleISelDAGToDAG.h
Go to the documentation of this file.
1 //===---- MipsModuleISelDAGToDAG.h - Change Subtarget --------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines a pass used to change the subtarget for the
11 // Mips Instruction selector.
12 //
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef MIPSMODULEISELDAGTODAG_H
16 #define MIPSMODULEISELDAGTODAG_H
17 
18 #include "Mips.h"
19 #include "MipsSubtarget.h"
20 #include "MipsTargetMachine.h"
22 
23 
24 //===----------------------------------------------------------------------===//
25 // Instruction Selector Implementation
26 //===----------------------------------------------------------------------===//
27 
28 //===----------------------------------------------------------------------===//
29 // MipsModuleDAGToDAGISel - MIPS specific code to select MIPS machine
30 // instructions for SelectionDAG operations.
31 //===----------------------------------------------------------------------===//
32 namespace llvm {
33 
35 public:
36 
37  static char ID;
38 
41  TM(TM_), Subtarget(TM.getSubtarget<MipsSubtarget>()) {}
42 
43  // Pass Name
44  virtual const char *getPassName() const {
45  return "MIPS DAG->DAG Pattern Instruction Selection";
46  }
47 
48  virtual bool runOnMachineFunction(MachineFunction &MF);
49 
50  virtual SDNode *Select(SDNode *N) {
51  llvm_unreachable("unexpected");
52  }
53 
54 protected:
55  /// Keep a pointer to the MipsSubtarget around so that we can make the right
56  /// decision when generating code for different targets.
57  const TargetMachine &TM;
59 };
60 
61 /// createMipsISelDag - This pass converts a legalized DAG into a
62 /// MIPS-specific DAG, ready for instruction scheduling.
64 }
65 
66 #endif
virtual const char * getPassName() const
virtual SDNode * Select(SDNode *N)
#define llvm_unreachable(msg)
virtual bool runOnMachineFunction(MachineFunction &MF)
FunctionPass * createMipsModuleISelDag(MipsTargetMachine &TM)
MipsModuleDAGToDAGISel(MipsTargetMachine &TM_)
#define N