aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/PPCSubtarget.h
diff options
context:
space:
mode:
authorJim Laskey <jlaskey@mac.com>2006-12-12 20:57:08 +0000
committerJim Laskey <jlaskey@mac.com>2006-12-12 20:57:08 +0000
commitc35010d3a44397dd04ed3bff5287f9c718dacd4a (patch)
treec93ba8d6f9a3d4fd23e58efcd68e16f6c22dd6e7 /lib/Target/PowerPC/PPCSubtarget.h
parentdbe4006cf3cf0802dc318a5f2070c04c326e170b (diff)
Honor cpu directive, take two.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32492 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCSubtarget.h')
-rw-r--r--lib/Target/PowerPC/PPCSubtarget.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/PPCSubtarget.h b/lib/Target/PowerPC/PPCSubtarget.h
index e8ad25f3eb..65d07d8952 100644
--- a/lib/Target/PowerPC/PPCSubtarget.h
+++ b/lib/Target/PowerPC/PPCSubtarget.h
@@ -20,6 +20,21 @@
#include <string>
namespace llvm {
+
+namespace PPC {
+ // -m directive values.
+ enum {
+ DIR_32,
+ DIR_601,
+ DIR_602,
+ DIR_603,
+ DIR_7400,
+ DIR_750,
+ DIR_970,
+ DIR_64
+ };
+}
+
class Module;
class GlobalValue;
class TargetMachine;
@@ -34,6 +49,9 @@ protected:
/// Selected instruction itineraries (one entry per itinerary class.)
InstrItineraryData InstrItins;
+
+ /// Which cpu directive was used.
+ unsigned DarwinDirective;
/// Used by the ISel to turn in optimizations for POWER4-derived architectures
bool IsGigaProcessor;
@@ -65,6 +83,10 @@ public:
/// function for this subtarget.
unsigned getStackAlignment() const { return StackAlignment; }
+ /// getDarwinDirective - Returns the -m directive specified for the cpu.
+ ///
+ unsigned getDarwinDirective() const { return DarwinDirective; }
+
/// getInstrItins - Return the instruction itineraies based on subtarget
/// selection.
const InstrItineraryData &getInstrItineraryData() const { return InstrItins; }