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,
36 const std::string &FS);
38 virtual const TargetInstrInfo *getInstrInfo() const { return &instrInfo; }
39 virtual const TargetSchedInfo *getSchedInfo() const { return &schedInfo; }
40 virtual const SparcV9RegInfo *getRegInfo() const { return ®Info; }
41 virtual const TargetFrameInfo *getFrameInfo() const { return &frameInfo; }
42 virtual TargetJITInfo *getJITInfo() { return &jitInfo; }
43 virtual const MRegisterInfo *getRegisterInfo() const {
44 return &instrInfo.getRegisterInfo();
47 virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
48 CodeGenFileType FileType, bool Fast);
49 virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM,
50 MachineCodeEmitter &MCE);
52 static unsigned getModuleMatchQuality(const Module &M);
53 static unsigned getJITMatchQuality();
56 } // End llvm namespace