blob: 60308f0c634b8fe8f70fa198b2df2d8316899009 [file] [log] [blame]
Nate Begeman8c00f8c2005-08-04 07:12:09 +00001//=====-- 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
19namespace llvm {
20class Module;
21
22class PPCSubtarget : public TargetSubtarget {
23protected:
24 /// stackAlignment - The minimum alignment known to hold of the stack frame on
25 /// entry to the function and which must be maintained by every function.
Chris Lattner3c304a32005-08-05 22:05:03 +000026 unsigned StackAlignment;
Nate Begeman8c00f8c2005-08-04 07:12:09 +000027
28 /// Used by the ISel to turn in optimizations for POWER4-derived architectures
Chris Lattner3c304a32005-08-05 22:05:03 +000029 bool IsGigaProcessor;
30 bool IsAIX;
31 bool IsDarwin;
Nate Begeman8c00f8c2005-08-04 07:12:09 +000032public:
33 /// This constructor initializes the data members to match that
34 /// of the specified module.
35 ///
36 PPCSubtarget(const Module &M);
37
38 /// getStackAlignment - Returns the minimum alignment known to hold of the
39 /// stack frame on entry to the function and which must be maintained by every
40 /// function for this subtarget.
Chris Lattner3c304a32005-08-05 22:05:03 +000041 unsigned getStackAlignment() const { return StackAlignment; }
Nate Begeman8c00f8c2005-08-04 07:12:09 +000042
Chris Lattner3c304a32005-08-05 22:05:03 +000043 bool isAIX() const { return IsAIX; }
44 bool isDarwin() const { return IsDarwin; }
45
46 bool isGigaProcessor() const { return IsGigaProcessor; }
Nate Begeman8c00f8c2005-08-04 07:12:09 +000047};
48} // End llvm namespace
49
50#endif