blob: 029f834027b0526a343247031c5aa248a5ef1648 [file] [log] [blame]
Chris Lattnerb4f68ed2002-10-29 22:37:54 +00001//===-- 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 "X86InstrInfo.h"
12
13class X86TargetMachine : public TargetMachine {
14 X86InstrInfo instrInfo;
15public:
16 X86TargetMachine();
17
Chris Lattnerb0f99b92002-12-02 21:50:41 +000018 virtual const X86InstrInfo &getInstrInfo() const { return instrInfo; }
Chris Lattnerb4f68ed2002-10-29 22:37:54 +000019 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(); }
Chris Lattnere5f52212002-10-30 00:56:18 +000024 virtual const MRegisterInfo *getRegisterInfo() const {
25 return &instrInfo.getRegisterInfo();
26 }
Chris Lattnerb4f68ed2002-10-29 22:37:54 +000027
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.
31 ///
32 virtual bool addPassesToJITCompile(PassManager &PM);
Chris Lattner40ead952002-12-02 21:24:12 +000033
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
38 /// not supported.
39 ///
40 virtual bool addPassesToEmitMachineCode(PassManager &PM,
41 MachineCodeEmitter &MCE);
Chris Lattnerb4f68ed2002-10-29 22:37:54 +000042};
43
44#endif