7c5893f904ff42f381bfcf9098e8ac52ca7dc811
[oota-llvm.git] / lib / Target / PowerPC / PowerPCTargetMachine.h
1 //===-- 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 // 
10 // This file declares the PowerPC-specific subclass of TargetMachine.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef POWERPC_TARGETMACHINE_H
15 #define POWERPC_TARGETMACHINE_H
16
17 #include "PowerPCFrameInfo.h"
18 #include "llvm/Target/TargetMachine.h"
19 #include "llvm/PassManager.h"
20 #include <set>
21
22 namespace llvm {
23
24 class GlobalValue;
25 class IntrinsicLowering;
26
27 class PowerPCTargetMachine : public TargetMachine {
28   PowerPCFrameInfo FrameInfo;
29
30 protected:
31   PowerPCTargetMachine(const std::string &name, IntrinsicLowering *IL,
32                        const TargetData &TD, const PowerPCFrameInfo &TFI);
33 public:
34   virtual const TargetFrameInfo  *getFrameInfo() const { return &FrameInfo; }
35
36   virtual bool addPassesToEmitAssembly(PassManager &PM, std::ostream &Out);
37
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;
42 };
43
44 } // end namespace llvm
45
46 #endif