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 "llvm/Target/TargetFrameInfo.h"
12 #include "llvm/PassManager.h"
13 #include "X86InstrInfo.h"
15 class X86TargetMachine : public TargetMachine {
16 X86InstrInfo InstrInfo;
17 TargetFrameInfo FrameInfo;
19 X86TargetMachine(unsigned Configuration);
21 virtual const X86InstrInfo &getInstrInfo() const { return InstrInfo; }
22 virtual const TargetFrameInfo &getFrameInfo() const { return FrameInfo; }
23 virtual const MRegisterInfo *getRegisterInfo() const {
24 return &InstrInfo.getRegisterInfo();
27 virtual const TargetSchedInfo &getSchedInfo() const { abort(); }
28 virtual const TargetRegInfo &getRegInfo() const { abort(); }
29 virtual const TargetCacheInfo &getCacheInfo() const { abort(); }
30 virtual const TargetOptInfo &getOptInfo() const { abort(); }
32 /// addPassesToJITCompile - Add passes to the specified pass manager to
33 /// implement a fast dynamic compiler for this target. Return true if this is
34 /// not supported for this target.
36 virtual bool addPassesToJITCompile(FunctionPassManager &PM);
38 /// addPassesToEmitMachineCode - Add passes to the specified pass manager to
39 /// get machine code emitted. This uses a MachineCodeEmitter object to handle
40 /// actually outputting the machine code and resolving things like the address
41 /// of functions. This method should returns true if machine code emission is
44 virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM,
45 MachineCodeEmitter &MCE);
47 virtual bool addPassesToEmitAssembly(PassManager &PM, std::ostream &Out);