blob: 567dc958d91ca58048626fcd2367713e7056bb5a [file] [log] [blame]
Chris Lattnered855422004-07-16 07:11:15 +00001//===-- SkeletonTargetMachine.h - TargetMachine for Skeleton ----*- C++ -*-===//
Misha Brukmanb4402432005-04-21 23:30:14 +00002//
Chris Lattnered855422004-07-16 07:11:15 +00003// The LLVM Compiler Infrastructure
4//
5// This file was developed by the LLVM research group and is distributed under
6// the University of Illinois Open Source License. See LICENSE.TXT for details.
Misha Brukmanb4402432005-04-21 23:30:14 +00007//
Chris Lattnered855422004-07-16 07:11:15 +00008//===----------------------------------------------------------------------===//
Misha Brukmanb4402432005-04-21 23:30:14 +00009//
Chris Lattnered855422004-07-16 07:11:15 +000010// This file declares the Skeleton specific subclass of TargetMachine.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef SKELETONTARGETMACHINE_H
15#define SKELETONTARGETMACHINE_H
16
17#include "llvm/Target/TargetMachine.h"
18#include "llvm/Target/TargetFrameInfo.h"
19#include "llvm/PassManager.h"
20#include "SkeletonInstrInfo.h"
21#include "SkeletonJITInfo.h"
22
23namespace llvm {
24 class IntrinsicLowering;
25
26 class SkeletonTargetMachine : public TargetMachine {
27 SkeletonInstrInfo InstrInfo;
28 TargetFrameInfo FrameInfo;
29 SkeletonJITInfo JITInfo;
30 public:
Jim Laskey19058c32005-09-01 21:38:21 +000031 SkeletonTargetMachine(const Module &M, IntrinsicLowering *IL,
32 const std::string &FS);
Chris Lattnered855422004-07-16 07:11:15 +000033
34 virtual const SkeletonInstrInfo *getInstrInfo() const { return &InstrInfo; }
35 virtual const TargetFrameInfo *getFrameInfo() const { return &FrameInfo; }
36 virtual const MRegisterInfo *getRegisterInfo() const {
37 return &InstrInfo.getRegisterInfo();
38 }
39 virtual TargetJITInfo *getJITInfo() {
40 return &JITInfo;
41 }
42
43 virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM,
44 MachineCodeEmitter &MCE);
Misha Brukmanb4402432005-04-21 23:30:14 +000045
Chris Lattnerf11f48b2005-06-25 02:48:37 +000046 virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
Chris Lattnerb28f2142005-11-08 02:11:51 +000047 CodeGenFileType FileType, bool Fast);
Chris Lattnered855422004-07-16 07:11:15 +000048 };
49
50} // end namespace llvm
51
52#endif