2002-10-29 22:37:54 +00:00
|
|
|
//===-- X86TargetMachine.h - Define TargetMachine for the X86 ---*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// This file declares the X86 specific subclass of TargetMachine.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef X86TARGETMACHINE_H
|
|
|
|
#define X86TARGETMACHINE_H
|
|
|
|
|
|
|
|
#include "llvm/Target/TargetMachine.h"
|
2002-12-28 21:00:25 +00:00
|
|
|
#include "llvm/Target/TargetFrameInfo.h"
|
2003-08-13 18:17:27 +00:00
|
|
|
#include "llvm/PassManager.h"
|
2002-10-29 22:37:54 +00:00
|
|
|
#include "X86InstrInfo.h"
|
|
|
|
|
|
|
|
class X86TargetMachine : public TargetMachine {
|
2002-12-28 20:33:52 +00:00
|
|
|
X86InstrInfo InstrInfo;
|
|
|
|
TargetFrameInfo FrameInfo;
|
2002-10-29 22:37:54 +00:00
|
|
|
public:
|
2003-08-24 19:49:48 +00:00
|
|
|
X86TargetMachine(const Module &M);
|
2002-10-29 22:37:54 +00:00
|
|
|
|
2002-12-28 20:33:52 +00:00
|
|
|
virtual const X86InstrInfo &getInstrInfo() const { return InstrInfo; }
|
|
|
|
virtual const TargetFrameInfo &getFrameInfo() const { return FrameInfo; }
|
|
|
|
virtual const MRegisterInfo *getRegisterInfo() const {
|
|
|
|
return &InstrInfo.getRegisterInfo();
|
|
|
|
}
|
|
|
|
|
2002-12-29 03:13:05 +00:00
|
|
|
virtual const TargetSchedInfo &getSchedInfo() const { abort(); }
|
|
|
|
virtual const TargetRegInfo &getRegInfo() const { abort(); }
|
2002-12-29 02:50:35 +00:00
|
|
|
virtual const TargetCacheInfo &getCacheInfo() const { abort(); }
|
2002-10-29 22:37:54 +00:00
|
|
|
|
|
|
|
/// addPassesToJITCompile - Add passes to the specified pass manager to
|
|
|
|
/// implement a fast dynamic compiler for this target. Return true if this is
|
|
|
|
/// not supported for this target.
|
|
|
|
///
|
2003-08-13 18:17:27 +00:00
|
|
|
virtual bool addPassesToJITCompile(FunctionPassManager &PM);
|
2002-12-02 21:24:12 +00:00
|
|
|
|
|
|
|
/// addPassesToEmitMachineCode - Add passes to the specified pass manager to
|
2003-08-13 18:17:27 +00:00
|
|
|
/// get machine code emitted. This uses a MachineCodeEmitter object to handle
|
2002-12-02 21:24:12 +00:00
|
|
|
/// actually outputting the machine code and resolving things like the address
|
|
|
|
/// of functions. This method should returns true if machine code emission is
|
|
|
|
/// not supported.
|
|
|
|
///
|
2003-08-13 18:17:27 +00:00
|
|
|
virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM,
|
2002-12-02 21:24:12 +00:00
|
|
|
MachineCodeEmitter &MCE);
|
2003-06-18 21:43:21 +00:00
|
|
|
|
|
|
|
virtual bool addPassesToEmitAssembly(PassManager &PM, std::ostream &Out);
|
2002-10-29 22:37:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|