1 //===-- SparcV9TargetMachine.h - Define TargetMachine for SparcV9 -*- C++ -*-=//
3 // The LLVM Compiler Infrastructure
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.
8 //===----------------------------------------------------------------------===//
10 // This file declares the top-level SparcV9 target machine.
12 //===----------------------------------------------------------------------===//
14 #ifndef SPARCV9TARGETMACHINE_H
15 #define SPARCV9TARGETMACHINE_H
17 #include "llvm/Target/TargetFrameInfo.h"
18 #include "llvm/Target/TargetMachine.h"
19 #include "SparcV9InstrInfo.h"
20 #include "SparcV9Internals.h"
21 #include "SparcV9RegInfo.h"
22 #include "SparcV9FrameInfo.h"
23 #include "SparcV9JITInfo.h"
28 class SparcV9TargetMachine : public TargetMachine {
29 SparcV9InstrInfo instrInfo;
30 SparcV9SchedInfo schedInfo;
31 SparcV9RegInfo regInfo;
32 SparcV9FrameInfo frameInfo;
33 SparcV9JITInfo jitInfo;
35 SparcV9TargetMachine(const Module &M, IntrinsicLowering *IL);
37 virtual const TargetInstrInfo *getInstrInfo() const { return &instrInfo; }
38 virtual const TargetSchedInfo *getSchedInfo() const { return &schedInfo; }
39 virtual const SparcV9RegInfo *getRegInfo() const { return ®Info; }
40 virtual const TargetFrameInfo *getFrameInfo() const { return &frameInfo; }
41 virtual TargetJITInfo *getJITInfo() { return &jitInfo; }
42 virtual const MRegisterInfo *getRegisterInfo() const {
43 return &instrInfo.getRegisterInfo();
46 virtual bool addPassesToEmitAssembly(PassManager &PM, std::ostream &Out);
47 virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM,
48 MachineCodeEmitter &MCE);
50 static unsigned getModuleMatchQuality(const Module &M);
51 static unsigned getJITMatchQuality();
54 } // End llvm namespace