blob: f26009a120e2851bee39014c25f3015b122b4cdf [file] [log] [blame]
Misha Brukman116f9272004-08-17 04:55:41 +00001//===-- PPC32TargetMachine.h - Define TargetMachine for PowerPC -*- C++ -*-=//
Misha Brukmand022a5a2004-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 Brukman116f9272004-08-17 04:55:41 +000010// This file declares the PowerPC specific subclass of TargetMachine.
Misha Brukmand022a5a2004-08-11 00:09:42 +000011//
12//===----------------------------------------------------------------------===//
13
Misha Brukman116f9272004-08-17 04:55:41 +000014#ifndef POWERPC32_TARGETMACHINE_H
15#define POWERPC32_TARGETMACHINE_H
Misha Brukmand022a5a2004-08-11 00:09:42 +000016
Misha Brukmand022a5a2004-08-11 00:09:42 +000017#include "PowerPCTargetMachine.h"
Misha Brukman116f9272004-08-17 04:55:41 +000018#include "PPC32InstrInfo.h"
19#include "llvm/PassManager.h"
Misha Brukmand022a5a2004-08-11 00:09:42 +000020
21namespace llvm {
22
Misha Brukmand022a5a2004-08-11 00:09:42 +000023class IntrinsicLowering;
24
25class PPC32TargetMachine : public PowerPCTargetMachine {
Misha Brukman116f9272004-08-17 04:55:41 +000026 PPC32InstrInfo InstrInfo;
27
Misha Brukmand022a5a2004-08-11 00:09:42 +000028public:
29 PPC32TargetMachine(const Module &M, IntrinsicLowering *IL);
Misha Brukman116f9272004-08-17 04:55:41 +000030 virtual const PPC32InstrInfo *getInstrInfo() const { return &InstrInfo; }
31 virtual const MRegisterInfo *getRegisterInfo() const {
32 return &InstrInfo.getRegisterInfo();
33 }
Misha Brukmand022a5a2004-08-11 00:09:42 +000034
Misha Brukmand022a5a2004-08-11 00:09:42 +000035 static unsigned getModuleMatchQuality(const Module &M);
Misha Brukman116f9272004-08-17 04:55:41 +000036
37 bool addPassesToEmitMachineCode(FunctionPassManager &PM,
38 MachineCodeEmitter &MCE);
Misha Brukmand022a5a2004-08-11 00:09:42 +000039};
40
41} // end namespace llvm
42
43#endif