blob: aaf07f91299e99e58fe74ab5b05dc8a8c0a0dc4f [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
Jim Laskeyb1e11802005-09-01 21:38:21 +000019#include <string>
20
Nate Begeman8c00f8c2005-08-04 07:12:09 +000021namespace llvm {
22class Module;
23
24class PPCSubtarget : public TargetSubtarget {
25protected:
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.
Chris Lattner3c304a32005-08-05 22:05:03 +000028 unsigned StackAlignment;
Nate Begeman8c00f8c2005-08-04 07:12:09 +000029
30 /// Used by the ISel to turn in optimizations for POWER4-derived architectures
Chris Lattner3c304a32005-08-05 22:05:03 +000031 bool IsGigaProcessor;
32 bool IsAIX;
33 bool IsDarwin;
Nate Begeman8c00f8c2005-08-04 07:12:09 +000034public:
35 /// This constructor initializes the data members to match that
36 /// of the specified module.
37 ///
Jim Laskeyb1e11802005-09-01 21:38:21 +000038 PPCSubtarget(const Module &M, const std::string &FS);
Nate Begeman8c00f8c2005-08-04 07:12:09 +000039
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.
Chris Lattner3c304a32005-08-05 22:05:03 +000043 unsigned getStackAlignment() const { return StackAlignment; }
Nate Begeman8c00f8c2005-08-04 07:12:09 +000044
Chris Lattner3c304a32005-08-05 22:05:03 +000045 bool isAIX() const { return IsAIX; }
46 bool isDarwin() const { return IsDarwin; }
47
48 bool isGigaProcessor() const { return IsGigaProcessor; }
Nate Begeman8c00f8c2005-08-04 07:12:09 +000049};
50} // End llvm namespace
51
52#endif