aaf07f91299e99e58fe74ab5b05dc8a8c0a0dc4f
[oota-llvm.git] / lib / Target / PowerPC / PPCSubtarget.h
1 //=====-- PowerPCSubtarget.h - Define Subtarget for the PPC ---*- C++ -*--====//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file was developed by Nate Begeman and is distributed under the
6 // University of Illinois Open Source License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file declares the X86 specific subclass of TargetSubtarget.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef POWERPCSUBTARGET_H
15 #define POWERPCSUBTARGET_H
16
17 #include "llvm/Target/TargetSubtarget.h"
18
19 #include <string>
20
21 namespace llvm {
22 class Module;
23
24 class PPCSubtarget : public TargetSubtarget {
25 protected:
26   /// stackAlignment - The minimum alignment known to hold of the stack frame on
27   /// entry to the function and which must be maintained by every function.
28   unsigned StackAlignment;
29
30   /// Used by the ISel to turn in optimizations for POWER4-derived architectures
31   bool IsGigaProcessor;
32   bool IsAIX;
33   bool IsDarwin;
34 public:
35   /// This constructor initializes the data members to match that
36   /// of the specified module.
37   ///
38   PPCSubtarget(const Module &M, const std::string &FS);
39
40   /// getStackAlignment - Returns the minimum alignment known to hold of the
41   /// stack frame on entry to the function and which must be maintained by every
42   /// function for this subtarget.
43   unsigned getStackAlignment() const { return StackAlignment; }
44
45   bool isAIX() const { return IsAIX; }
46   bool isDarwin() const { return IsDarwin; }
47   
48   bool isGigaProcessor() const { return IsGigaProcessor; }
49 };
50 } // End llvm namespace
51
52 #endif