blob: 20ae44c7e156258bddfd35f09f7020a93d0c0983 [file] [log] [blame]
Misha Brukmanbc9ccf62005-02-04 20:25:52 +00001//===-- AlphaTargetMachine.h - Define TargetMachine for Alpha ---*- C++ -*-===//
Misha Brukman4633f1c2005-04-21 23:13:11 +00002//
Andrew Lenharth304d0f32005-01-22 23:41:55 +00003// 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.
Misha Brukman4633f1c2005-04-21 23:13:11 +00007//
Andrew Lenharth304d0f32005-01-22 23:41:55 +00008//===----------------------------------------------------------------------===//
Misha Brukman4633f1c2005-04-21 23:13:11 +00009//
Andrew Lenharth304d0f32005-01-22 23:41:55 +000010// This file declares the Alpha-specific subclass of TargetMachine.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef ALPHA_TARGETMACHINE_H
15#define ALPHA_TARGETMACHINE_H
16
17#include "llvm/Target/TargetMachine.h"
18#include "llvm/Target/TargetFrameInfo.h"
19#include "llvm/PassManager.h"
20#include "AlphaInstrInfo.h"
Andrew Lenharth0934ae02005-07-22 20:52:16 +000021#include "AlphaJITInfo.h"
Andrew Lenharth120ab482005-09-29 22:54:56 +000022#include "AlphaSubtarget.h"
Andrew Lenharth304d0f32005-01-22 23:41:55 +000023
24namespace llvm {
25
26class GlobalValue;
27class IntrinsicLowering;
28
29class AlphaTargetMachine : public TargetMachine {
30 AlphaInstrInfo InstrInfo;
31 TargetFrameInfo FrameInfo;
Andrew Lenharth0934ae02005-07-22 20:52:16 +000032 AlphaJITInfo JITInfo;
Andrew Lenharth120ab482005-09-29 22:54:56 +000033 AlphaSubtarget Subtarget;
Andrew Lenharth304d0f32005-01-22 23:41:55 +000034
35public:
Jim Laskeyb1e11802005-09-01 21:38:21 +000036 AlphaTargetMachine(const Module &M, IntrinsicLowering *IL,
37 const std::string &FS);
Misha Brukman4633f1c2005-04-21 23:13:11 +000038
39 virtual const AlphaInstrInfo *getInstrInfo() const { return &InstrInfo; }
Andrew Lenharth304d0f32005-01-22 23:41:55 +000040 virtual const TargetFrameInfo *getFrameInfo() const { return &FrameInfo; }
Andrew Lenharth120ab482005-09-29 22:54:56 +000041 virtual const TargetSubtarget *getSubtargetImpl() const{ return &Subtarget; }
Andrew Lenharth304d0f32005-01-22 23:41:55 +000042 virtual const MRegisterInfo *getRegisterInfo() const {
43 return &InstrInfo.getRegisterInfo();
44 }
Andrew Lenharth0934ae02005-07-22 20:52:16 +000045 virtual TargetJITInfo* getJITInfo() {
46 return &JITInfo;
47 }
48
49 static unsigned getJITMatchQuality();
50
Andrew Lenharth0934ae02005-07-22 20:52:16 +000051 virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM,
52 MachineCodeEmitter &MCE);
Misha Brukman4633f1c2005-04-21 23:13:11 +000053
Chris Lattner0431c962005-06-25 02:48:37 +000054 virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
Chris Lattnerce8eb0c2005-11-08 02:11:51 +000055 CodeGenFileType FileType, bool Fast);
Andrew Lenharth2f401632005-02-01 20:35:11 +000056
57 static unsigned getModuleMatchQuality(const Module &M);
Andrew Lenharth304d0f32005-01-22 23:41:55 +000058};
59
60} // end namespace llvm
61
62#endif