blob: 2cf7b11f104309ba7d820721ae953d1202532a3b [file] [log] [blame]
Chris Lattner5ad021c2004-07-16 07:11:15 +00001//===-- SkeletonTargetMachine.h - TargetMachine for Skeleton ----*- C++ -*-===//
2//
3// 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.
7//
8//===----------------------------------------------------------------------===//
9//
10// 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:
31 SkeletonTargetMachine(const Module &M, IntrinsicLowering *IL);
32
33 virtual const SkeletonInstrInfo *getInstrInfo() const { return &InstrInfo; }
34 virtual const TargetFrameInfo *getFrameInfo() const { return &FrameInfo; }
35 virtual const MRegisterInfo *getRegisterInfo() const {
36 return &InstrInfo.getRegisterInfo();
37 }
38 virtual TargetJITInfo *getJITInfo() {
39 return &JITInfo;
40 }
41
42 virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM,
43 MachineCodeEmitter &MCE);
44
45 virtual bool addPassesToEmitAssembly(PassManager &PM, std::ostream &Out);
46 };
47
48} // end namespace llvm
49
50#endif