blob: 0c12f30ba1f1ae1418b62c28a63371c2feba58f9 [file] [log] [blame]
Misha Brukman5dfe3a92004-06-21 16:55:25 +00001//===-- PowerPCTargetMachine.h - Define TargetMachine for PowerPC -*- C++ -*-=//
Misha Brukmanb5f662f2005-04-21 23:30:14 +00002//
Misha Brukman5dfe3a92004-06-21 16:55:25 +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 Brukmanb5f662f2005-04-21 23:30:14 +00007//
Misha Brukman5dfe3a92004-06-21 16:55:25 +00008//===----------------------------------------------------------------------===//
Misha Brukmanb5f662f2005-04-21 23:30:14 +00009//
Misha Brukmanf2f8cfb2004-08-17 05:08:44 +000010// This file declares the PowerPC-specific subclass of TargetMachine.
Misha Brukman5dfe3a92004-06-21 16:55:25 +000011//
12//===----------------------------------------------------------------------===//
13
Misha Brukman01458812004-08-11 00:11:25 +000014#ifndef POWERPC_TARGETMACHINE_H
15#define POWERPC_TARGETMACHINE_H
Misha Brukman5dfe3a92004-06-21 16:55:25 +000016
17#include "llvm/Target/TargetMachine.h"
Nate Begeman8c00f8c2005-08-04 07:12:09 +000018#include "llvm/Target/TargetFrameInfo.h"
Misha Brukman5dfe3a92004-06-21 16:55:25 +000019#include "llvm/PassManager.h"
Nate Begeman8c00f8c2005-08-04 07:12:09 +000020#include "PowerPCFrameInfo.h"
21#include "PowerPCSubtarget.h"
Misha Brukman5dfe3a92004-06-21 16:55:25 +000022
23namespace llvm {
24
Misha Brukmane2eceb52004-07-23 16:08:20 +000025class GlobalValue;
Misha Brukman5dfe3a92004-06-21 16:55:25 +000026class IntrinsicLowering;
27
28class PowerPCTargetMachine : public TargetMachine {
Nate Begeman8c00f8c2005-08-04 07:12:09 +000029 PowerPCFrameInfo FrameInfo;
30 PPCSubtarget Subtarget;
Misha Brukman01458812004-08-11 00:11:25 +000031protected:
32 PowerPCTargetMachine(const std::string &name, IntrinsicLowering *IL,
Jim Laskeyb1e11802005-09-01 21:38:21 +000033 const Module &M, const std::string &FS,
34 const TargetData &TD,
Nate Begeman8c00f8c2005-08-04 07:12:09 +000035 const PowerPCFrameInfo &TFI);
Misha Brukman5dfe3a92004-06-21 16:55:25 +000036public:
Misha Brukman5dfe3a92004-06-21 16:55:25 +000037 virtual const TargetFrameInfo *getFrameInfo() const { return &FrameInfo; }
Nate Begeman8c00f8c2005-08-04 07:12:09 +000038 virtual const TargetSubtarget *getSubtargetImpl() const{ return &Subtarget; }
Nate Begeman7a4fe9b2004-08-11 07:40:04 +000039
Chris Lattner0431c962005-06-25 02:48:37 +000040 virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
41 CodeGenFileType FileType);
Misha Brukman5dfe3a92004-06-21 16:55:25 +000042};
43
44} // end namespace llvm
45
46#endif