blob: 7c5893f904ff42f381bfcf9098e8ac52ca7dc811 [file] [log] [blame]
Misha Brukman5dfe3a92004-06-21 16:55:25 +00001//===-- PowerPCTargetMachine.h - Define TargetMachine for PowerPC -*- C++ -*-=//
2//
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 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
Nate Begemanca068e82004-08-14 22:16:36 +000017#include "PowerPCFrameInfo.h"
Misha Brukman5dfe3a92004-06-21 16:55:25 +000018#include "llvm/Target/TargetMachine.h"
Misha Brukman5dfe3a92004-06-21 16:55:25 +000019#include "llvm/PassManager.h"
Nate Begemaned428532004-09-04 05:00:00 +000020#include <set>
Misha Brukman5dfe3a92004-06-21 16:55:25 +000021
22namespace llvm {
23
Misha Brukmane2eceb52004-07-23 16:08:20 +000024class GlobalValue;
Misha Brukman5dfe3a92004-06-21 16:55:25 +000025class IntrinsicLowering;
26
27class PowerPCTargetMachine : public TargetMachine {
Nate Begemanca068e82004-08-14 22:16:36 +000028 PowerPCFrameInfo FrameInfo;
Misha Brukmane2eceb52004-07-23 16:08:20 +000029
Misha Brukman01458812004-08-11 00:11:25 +000030protected:
31 PowerPCTargetMachine(const std::string &name, IntrinsicLowering *IL,
Chris Lattner942d7b52004-11-23 05:55:38 +000032 const TargetData &TD, const PowerPCFrameInfo &TFI);
Misha Brukman5dfe3a92004-06-21 16:55:25 +000033public:
Misha Brukman5dfe3a92004-06-21 16:55:25 +000034 virtual const TargetFrameInfo *getFrameInfo() const { return &FrameInfo; }
Nate Begeman7a4fe9b2004-08-11 07:40:04 +000035
36 virtual bool addPassesToEmitAssembly(PassManager &PM, std::ostream &Out);
Nate Begemaned428532004-09-04 05:00:00 +000037
38 // Two shared sets between the instruction selector and the printer allow for
39 // correct linkage on Darwin
40 std::set<GlobalValue*> CalledFunctions;
41 std::set<GlobalValue*> AddressTaken;
Misha Brukman5dfe3a92004-06-21 16:55:25 +000042};
43
44} // end namespace llvm
45
46#endif