Update comments.
[llvm/msp430.git] / lib / Target / Alpha / AlphaTargetMachine.h
blob9a03baef3fac502938e443f4923e6a06a1656f99
1 //===-- AlphaTargetMachine.h - Define TargetMachine for Alpha ---*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file declares the Alpha-specific subclass of TargetMachine.
12 //===----------------------------------------------------------------------===//
14 #ifndef ALPHA_TARGETMACHINE_H
15 #define ALPHA_TARGETMACHINE_H
17 #include "llvm/Target/TargetMachine.h"
18 #include "llvm/Target/TargetData.h"
19 #include "llvm/Target/TargetFrameInfo.h"
20 #include "AlphaInstrInfo.h"
21 #include "AlphaJITInfo.h"
22 #include "AlphaISelLowering.h"
23 #include "AlphaSubtarget.h"
25 namespace llvm {
27 class GlobalValue;
29 class AlphaTargetMachine : public LLVMTargetMachine {
30 const TargetData DataLayout; // Calculates type size & alignment
31 AlphaInstrInfo InstrInfo;
32 TargetFrameInfo FrameInfo;
33 AlphaJITInfo JITInfo;
34 AlphaSubtarget Subtarget;
35 AlphaTargetLowering TLInfo;
37 protected:
38 virtual const TargetAsmInfo *createTargetAsmInfo() const;
40 public:
41 AlphaTargetMachine(const Module &M, const std::string &FS);
43 virtual const AlphaInstrInfo *getInstrInfo() const { return &InstrInfo; }
44 virtual const TargetFrameInfo *getFrameInfo() const { return &FrameInfo; }
45 virtual const AlphaSubtarget *getSubtargetImpl() const{ return &Subtarget; }
46 virtual const AlphaRegisterInfo *getRegisterInfo() const {
47 return &InstrInfo.getRegisterInfo();
49 virtual AlphaTargetLowering* getTargetLowering() const {
50 return const_cast<AlphaTargetLowering*>(&TLInfo);
52 virtual const TargetData *getTargetData() const { return &DataLayout; }
53 virtual AlphaJITInfo* getJITInfo() {
54 return &JITInfo;
57 static unsigned getJITMatchQuality();
58 static unsigned getModuleMatchQuality(const Module &M);
60 // Pass Pipeline Configuration
61 virtual bool addInstSelector(PassManagerBase &PM, bool Fast);
62 virtual bool addPreEmitPass(PassManagerBase &PM, bool Fast);
63 virtual bool addAssemblyEmitter(PassManagerBase &PM, bool Fast,
64 bool Verbose, raw_ostream &Out);
65 virtual bool addCodeEmitter(PassManagerBase &PM, bool Fast,
66 bool DumpAsm, MachineCodeEmitter &MCE);
67 virtual bool addSimpleCodeEmitter(PassManagerBase &PM, bool Fast,
68 bool DumpAsm, MachineCodeEmitter &MCE);
71 } // end namespace llvm
73 #endif