Nate Begeman | 8c00f8c | 2005-08-04 07:12:09 +0000 | [diff] [blame^] | 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 | namespace llvm { |
| 20 | class Module; |
| 21 | |
| 22 | class PPCSubtarget : public TargetSubtarget { |
| 23 | protected: |
| 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. |
| 26 | unsigned stackAlignment; |
| 27 | |
| 28 | /// Used by the ISel to turn in optimizations for POWER4-derived architectures |
| 29 | bool isGigaProcessor; |
| 30 | bool isAIX; |
| 31 | bool isDarwin; |
| 32 | public: |
| 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. |
| 41 | unsigned getStackAlignment() const { return stackAlignment; } |
| 42 | |
| 43 | bool IsAIX() const { return isAIX; } |
| 44 | bool IsDarwin() const { return isDarwin; } |
| 45 | }; |
| 46 | } // End llvm namespace |
| 47 | |
| 48 | #endif |