blob: 0cad652f71daa1b287abeb6672e8f5d681e6ddeb [file] [log] [blame]
Chris Lattner158e1f52006-02-05 05:50:24 +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 Sparc specific subclass of TargetMachine.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef SPARCTARGETMACHINE_H
15#define SPARCTARGETMACHINE_H
16
17#include "llvm/Target/TargetMachine.h"
18#include "llvm/Target/TargetFrameInfo.h"
19#include "llvm/PassManager.h"
20#include "SparcInstrInfo.h"
21#include "SparcSubtarget.h"
22
23namespace llvm {
24
Chris Lattner158e1f52006-02-05 05:50:24 +000025class Module;
26
27class SparcTargetMachine : public TargetMachine {
28 SparcSubtarget Subtarget;
29 SparcInstrInfo InstrInfo;
30 TargetFrameInfo FrameInfo;
31public:
Chris Lattner6f95ab72006-03-23 05:43:16 +000032 SparcTargetMachine(const Module &M, const std::string &FS);
Chris Lattner158e1f52006-02-05 05:50:24 +000033
34 virtual const SparcInstrInfo *getInstrInfo() const { return &InstrInfo; }
35 virtual const TargetFrameInfo *getFrameInfo() const { return &FrameInfo; }
36 virtual const TargetSubtarget *getSubtargetImpl() const{ return &Subtarget; }
37 virtual const MRegisterInfo *getRegisterInfo() const {
38 return &InstrInfo.getRegisterInfo();
39 }
40
41 static unsigned getModuleMatchQuality(const Module &M);
42
43 virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
44 CodeGenFileType FileType, bool Fast);
45};
46
47} // end namespace llvm
48
49#endif