blob: 278d31a267c85ed93e9cb149270bc7bcfb39d4ac [file] [log] [blame]
Misha Brukmanf2ccb772004-08-17 04:55:41 +00001//===-- PPC32TargetMachine.h - Define TargetMachine for PowerPC -*- C++ -*-=//
Misha Brukman3d9a6c22004-08-11 00:09:42 +00002//
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//
Misha Brukmanf2ccb772004-08-17 04:55:41 +000010// This file declares the PowerPC specific subclass of TargetMachine.
Misha Brukman3d9a6c22004-08-11 00:09:42 +000011//
12//===----------------------------------------------------------------------===//
13
Misha Brukmanf2ccb772004-08-17 04:55:41 +000014#ifndef POWERPC32_TARGETMACHINE_H
15#define POWERPC32_TARGETMACHINE_H
Misha Brukman3d9a6c22004-08-11 00:09:42 +000016
Misha Brukman3d9a6c22004-08-11 00:09:42 +000017#include "PowerPCTargetMachine.h"
Chris Lattnere4fce6f2004-11-23 05:56:40 +000018#include "PPC32JITInfo.h"
Misha Brukmanf2ccb772004-08-17 04:55:41 +000019#include "PPC32InstrInfo.h"
20#include "llvm/PassManager.h"
Misha Brukman3d9a6c22004-08-11 00:09:42 +000021
22namespace llvm {
23
Misha Brukman3d9a6c22004-08-11 00:09:42 +000024class IntrinsicLowering;
25
26class PPC32TargetMachine : public PowerPCTargetMachine {
Misha Brukmanf2ccb772004-08-17 04:55:41 +000027 PPC32InstrInfo InstrInfo;
Chris Lattnere4fce6f2004-11-23 05:56:40 +000028 PPC32JITInfo JITInfo;
Misha Brukmanf2ccb772004-08-17 04:55:41 +000029
Misha Brukman3d9a6c22004-08-11 00:09:42 +000030public:
31 PPC32TargetMachine(const Module &M, IntrinsicLowering *IL);
Misha Brukmanf2ccb772004-08-17 04:55:41 +000032 virtual const PPC32InstrInfo *getInstrInfo() const { return &InstrInfo; }
33 virtual const MRegisterInfo *getRegisterInfo() const {
34 return &InstrInfo.getRegisterInfo();
35 }
Misha Brukman3d9a6c22004-08-11 00:09:42 +000036
Chris Lattnere4fce6f2004-11-23 05:56:40 +000037 virtual TargetJITInfo *getJITInfo() {
38 return &JITInfo;
39 }
40
41 static unsigned getJITMatchQuality();
42
Misha Brukman3d9a6c22004-08-11 00:09:42 +000043 static unsigned getModuleMatchQuality(const Module &M);
Misha Brukmanf2ccb772004-08-17 04:55:41 +000044
45 bool addPassesToEmitMachineCode(FunctionPassManager &PM,
46 MachineCodeEmitter &MCE);
Misha Brukman3d9a6c22004-08-11 00:09:42 +000047};
48
49} // end namespace llvm
50
51#endif