blob: 0dc109dcf42c001935cfbee3244798e6be48846e [file] [log] [blame]
Misha Brukmand71295a2003-12-17 22:04:00 +00001//===-- SparcTargetMachine.h - Define TargetMachine for Sparc ---*- 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 primary interface to machine description for the
11// UltraSPARC.
12//
13//===----------------------------------------------------------------------===//
14
15#ifndef SPARC_TARGETMACHINE_H
16#define SPARC_TARGETMACHINE_H
17
18#include "llvm/PassManager.h"
19#include "llvm/Target/TargetFrameInfo.h"
20#include "llvm/Target/TargetMachine.h"
21#include "SparcInstrInfo.h"
22#include "SparcInternals.h"
23#include "SparcRegInfo.h"
24#include "SparcFrameInfo.h"
Chris Lattner1e60a912003-12-20 01:22:19 +000025#include "SparcJITInfo.h"
Misha Brukmand71295a2003-12-17 22:04:00 +000026
27namespace llvm {
28
29class SparcTargetMachine : public TargetMachine {
30 SparcInstrInfo instrInfo;
31 SparcSchedInfo schedInfo;
32 SparcRegInfo regInfo;
33 SparcFrameInfo frameInfo;
34 SparcCacheInfo cacheInfo;
Chris Lattner1e60a912003-12-20 01:22:19 +000035 SparcJITInfo jitInfo;
Misha Brukmand71295a2003-12-17 22:04:00 +000036public:
37 SparcTargetMachine();
38
39 virtual const TargetInstrInfo &getInstrInfo() const { return instrInfo; }
40 virtual const TargetSchedInfo &getSchedInfo() const { return schedInfo; }
41 virtual const TargetRegInfo &getRegInfo() const { return regInfo; }
42 virtual const TargetFrameInfo &getFrameInfo() const { return frameInfo; }
43 virtual const TargetCacheInfo &getCacheInfo() const { return cacheInfo; }
Chris Lattner1e60a912003-12-20 01:22:19 +000044 virtual TargetJITInfo *getJITInfo() { return &jitInfo; }
Misha Brukmand71295a2003-12-17 22:04:00 +000045
46 virtual bool addPassesToEmitAssembly(PassManager &PM, std::ostream &Out);
Misha Brukmand71295a2003-12-17 22:04:00 +000047 virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM,
48 MachineCodeEmitter &MCE);
Misha Brukmand71295a2003-12-17 22:04:00 +000049};
50
51} // End llvm namespace
52
53#endif