aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/PowerPC/PPCSubtarget.h
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2005-08-04 07:12:09 +0000
committerNate Begeman <natebegeman@mac.com>2005-08-04 07:12:09 +0000
commit8c00f8cdc7ae0cdd18d91b3a31a70da0f78aa04f (patch)
treea9f7fccc3fbb3bc12c1be6158d0e0d4e0710fc0f /lib/Target/PowerPC/PPCSubtarget.h
parent49f72e68cf6eb77b5791310513d94dc64dc6ea7d (diff)
downloadexternal_llvm-8c00f8cdc7ae0cdd18d91b3a31a70da0f78aa04f.zip
external_llvm-8c00f8cdc7ae0cdd18d91b3a31a70da0f78aa04f.tar.gz
external_llvm-8c00f8cdc7ae0cdd18d91b3a31a70da0f78aa04f.tar.bz2
Add Subtarget support to PowerPC. Next up, using it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22644 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCSubtarget.h')
-rw-r--r--lib/Target/PowerPC/PPCSubtarget.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/PPCSubtarget.h b/lib/Target/PowerPC/PPCSubtarget.h
new file mode 100644
index 0000000..c114351
--- /dev/null
+++ b/lib/Target/PowerPC/PPCSubtarget.h
@@ -0,0 +1,48 @@
+//=====-- PowerPCSubtarget.h - Define Subtarget for the PPC ---*- C++ -*--====//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file was developed by Nate Begeman and is distributed under the
+// University of Illinois Open Source License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file declares the X86 specific subclass of TargetSubtarget.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef POWERPCSUBTARGET_H
+#define POWERPCSUBTARGET_H
+
+#include "llvm/Target/TargetSubtarget.h"
+
+namespace llvm {
+class Module;
+
+class PPCSubtarget : public TargetSubtarget {
+protected:
+ /// stackAlignment - The minimum alignment known to hold of the stack frame on
+ /// entry to the function and which must be maintained by every function.
+ unsigned stackAlignment;
+
+ /// Used by the ISel to turn in optimizations for POWER4-derived architectures
+ bool isGigaProcessor;
+ bool isAIX;
+ bool isDarwin;
+public:
+ /// This constructor initializes the data members to match that
+ /// of the specified module.
+ ///
+ PPCSubtarget(const Module &M);
+
+ /// getStackAlignment - Returns the minimum alignment known to hold of the
+ /// stack frame on entry to the function and which must be maintained by every
+ /// function for this subtarget.
+ unsigned getStackAlignment() const { return stackAlignment; }
+
+ bool IsAIX() const { return isAIX; }
+ bool IsDarwin() const { return isDarwin; }
+};
+} // End llvm namespace
+
+#endif