blob: 4de729acd273edae31b5cf7b5e8b06ea28d16c3a [file] [log] [blame]
Misha Brukman076b9f42005-02-04 20:25:52 +00001//===-- AlphaTargetMachine.h - Define TargetMachine for Alpha ---*- C++ -*-===//
Misha Brukman89b8c8d2005-04-21 23:13:11 +00002//
Andrew Lenhartha1b5ca22005-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 Brukman89b8c8d2005-04-21 23:13:11 +00007//
Andrew Lenhartha1b5ca22005-01-22 23:41:55 +00008//===----------------------------------------------------------------------===//
Misha Brukman89b8c8d2005-04-21 23:13:11 +00009//
Andrew Lenhartha1b5ca22005-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 Lenharth55d04512005-07-22 20:52:16 +000021#include "AlphaJITInfo.h"
Andrew Lenhartha1b5ca22005-01-22 23:41:55 +000022
23namespace llvm {
24
25class GlobalValue;
26class IntrinsicLowering;
27
28class AlphaTargetMachine : public TargetMachine {
29 AlphaInstrInfo InstrInfo;
30 TargetFrameInfo FrameInfo;
Andrew Lenharth55d04512005-07-22 20:52:16 +000031 AlphaJITInfo JITInfo;
Andrew Lenhartha1b5ca22005-01-22 23:41:55 +000032
33public:
Jim Laskey19058c32005-09-01 21:38:21 +000034 AlphaTargetMachine(const Module &M, IntrinsicLowering *IL,
35 const std::string &FS);
Misha Brukman89b8c8d2005-04-21 23:13:11 +000036
37 virtual const AlphaInstrInfo *getInstrInfo() const { return &InstrInfo; }
Andrew Lenhartha1b5ca22005-01-22 23:41:55 +000038 virtual const TargetFrameInfo *getFrameInfo() const { return &FrameInfo; }
39 virtual const MRegisterInfo *getRegisterInfo() const {
40 return &InstrInfo.getRegisterInfo();
41 }
Andrew Lenharth55d04512005-07-22 20:52:16 +000042 virtual TargetJITInfo* getJITInfo() {
43 return &JITInfo;
44 }
45
46 static unsigned getJITMatchQuality();
47
48 /// addPassesToEmitMachineCode - Add passes to the specified pass manager to
49 /// get machine code emitted. This uses a MachineCodeEmitter object to handle
50 /// actually outputting the machine code and resolving things like the address
51 /// of functions. This method should returns true if machine code emission is
52 /// not supported.
53 ///
54 virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM,
55 MachineCodeEmitter &MCE);
Misha Brukman89b8c8d2005-04-21 23:13:11 +000056
Chris Lattnerf11f48b2005-06-25 02:48:37 +000057 virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
58 CodeGenFileType FileType);
Andrew Lenharth8fb0d502005-02-01 20:35:11 +000059
60 static unsigned getModuleMatchQuality(const Module &M);
Andrew Lenhartha1b5ca22005-01-22 23:41:55 +000061};
62
63} // end namespace llvm
64
65#endif