pass machinemoduleinfo down into getSymbolForDwarfGlobalReference,
[llvm/avr.git] / lib / Target / Alpha / AlphaTargetMachine.h
blobf03e9388f7def7e2f53c185ce6116dc0b447636d
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 public:
38 AlphaTargetMachine(const Target &T, const std::string &TT,
39 const std::string &FS);
41 virtual const AlphaInstrInfo *getInstrInfo() const { return &InstrInfo; }
42 virtual const TargetFrameInfo *getFrameInfo() const { return &FrameInfo; }
43 virtual const AlphaSubtarget *getSubtargetImpl() const{ return &Subtarget; }
44 virtual const AlphaRegisterInfo *getRegisterInfo() const {
45 return &InstrInfo.getRegisterInfo();
47 virtual AlphaTargetLowering* getTargetLowering() const {
48 return const_cast<AlphaTargetLowering*>(&TLInfo);
50 virtual const TargetData *getTargetData() const { return &DataLayout; }
51 virtual AlphaJITInfo* getJITInfo() {
52 return &JITInfo;
55 // Pass Pipeline Configuration
56 virtual bool addInstSelector(PassManagerBase &PM, CodeGenOpt::Level OptLevel);
57 virtual bool addPreEmitPass(PassManagerBase &PM, CodeGenOpt::Level OptLevel);
58 virtual bool addCodeEmitter(PassManagerBase &PM, CodeGenOpt::Level OptLevel,
59 MachineCodeEmitter &MCE);
60 virtual bool addCodeEmitter(PassManagerBase &PM, CodeGenOpt::Level OptLevel,
61 JITCodeEmitter &JCE);
62 virtual bool addCodeEmitter(PassManagerBase &PM, CodeGenOpt::Level OptLevel,
63 ObjectCodeEmitter &JCE);
64 virtual bool addSimpleCodeEmitter(PassManagerBase &PM,
65 CodeGenOpt::Level OptLevel,
66 MachineCodeEmitter &MCE);
67 virtual bool addSimpleCodeEmitter(PassManagerBase &PM,
68 CodeGenOpt::Level OptLevel,
69 JITCodeEmitter &JCE);
70 virtual bool addSimpleCodeEmitter(PassManagerBase &PM,
71 CodeGenOpt::Level OptLevel,
72 ObjectCodeEmitter &OCE);
75 } // end namespace llvm
77 #endif