Rename MachineOptInfo to TargetoptInfo
[oota-llvm.git] / lib / Target / X86 / X86TargetMachine.h
1 //===-- X86TargetMachine.h - Define TargetMachine for the X86 ---*- C++ -*-===//
2 // 
3 // This file declares the X86 specific subclass of TargetMachine.
4 //
5 //===----------------------------------------------------------------------===//
6
7 #ifndef X86TARGETMACHINE_H
8 #define X86TARGETMACHINE_H
9
10 #include "llvm/Target/TargetMachine.h"
11 #include "llvm/Target/TargetFrameInfo.h"
12 #include "X86InstrInfo.h"
13
14 class X86TargetMachine : public TargetMachine {
15   X86InstrInfo InstrInfo;
16   TargetFrameInfo FrameInfo;
17 public:
18   X86TargetMachine(unsigned Configuration);
19
20   virtual const X86InstrInfo     &getInstrInfo() const { return InstrInfo; }
21   virtual const TargetFrameInfo  &getFrameInfo() const { return FrameInfo; }
22   virtual const MRegisterInfo *getRegisterInfo() const {
23     return &InstrInfo.getRegisterInfo();
24   }
25
26   virtual const MachineSchedInfo &getSchedInfo() const { abort(); }
27   virtual const MachineRegInfo   &getRegInfo()   const { abort(); }
28   virtual const TargetCacheInfo  &getCacheInfo() const { abort(); }
29   virtual const TargetOptInfo    &getOptInfo()   const { abort(); }
30
31   /// addPassesToJITCompile - Add passes to the specified pass manager to
32   /// implement a fast dynamic compiler for this target.  Return true if this is
33   /// not supported for this target.
34   ///
35   virtual bool addPassesToJITCompile(PassManager &PM);
36
37   /// addPassesToEmitMachineCode - Add passes to the specified pass manager to
38   /// get machine code emitted.  This uses a MAchineCodeEmitter object to handle
39   /// actually outputting the machine code and resolving things like the address
40   /// of functions.  This method should returns true if machine code emission is
41   /// not supported.
42   ///
43   virtual bool addPassesToEmitMachineCode(PassManager &PM,
44                                           MachineCodeEmitter &MCE);
45 };
46
47 #endif