1 //===-- X86TargetMachine.h - Define TargetMachine for the X86 ---*- C++ -*-===//
3 // This file declares the X86 specific subclass of TargetMachine.
5 //===----------------------------------------------------------------------===//
7 #ifndef X86TARGETMACHINE_H
8 #define X86TARGETMACHINE_H
10 #include "llvm/Target/TargetMachine.h"
11 #include "X86InstrInfo.h"
13 class X86TargetMachine : public TargetMachine {
14 X86InstrInfo instrInfo;
18 virtual const X86InstrInfo &getInstrInfo() const { return instrInfo; }
19 virtual const MachineSchedInfo &getSchedInfo() const { abort(); }
20 virtual const MachineRegInfo &getRegInfo() const { abort(); }
21 virtual const MachineFrameInfo &getFrameInfo() const { abort(); }
22 virtual const MachineCacheInfo &getCacheInfo() const { abort(); }
23 virtual const MachineOptInfo &getOptInfo() const { abort(); }
24 virtual const MRegisterInfo *getRegisterInfo() const {
25 return &instrInfo.getRegisterInfo();
28 /// addPassesToJITCompile - Add passes to the specified pass manager to
29 /// implement a fast dynamic compiler for this target. Return true if this is
30 /// not supported for this target.
32 virtual bool addPassesToJITCompile(PassManager &PM);
34 /// addPassesToEmitMachineCode - Add passes to the specified pass manager to
35 /// get machine code emitted. This uses a MAchineCodeEmitter object to handle
36 /// actually outputting the machine code and resolving things like the address
37 /// of functions. This method should returns true if machine code emission is
40 virtual bool addPassesToEmitMachineCode(PassManager &PM,
41 MachineCodeEmitter &MCE);