aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-01-25 09:09:02 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-01-25 09:09:02 +0000
commitd854b62afa9a9c3ee8c968199af0d94ed215e19e (patch)
treeb41f4955a6905fb04a24a82ab476ef6c9bae2fa0
parent0993f1d8338ccf8552a1dbc3fb19461a5e6165d9 (diff)
Add a enum to specify target scheduling preference: SchedulingForLatency or
SchedulingForRegPressure. Added corresponding methods to set / get the value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25598 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Target/TargetLowering.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h
index f596ea93ab..2a99962a2f 100644
--- a/include/llvm/Target/TargetLowering.h
+++ b/include/llvm/Target/TargetLowering.h
@@ -70,6 +70,11 @@ public:
ZeroOrNegativeOneSetCCResult, // SetCC returns a sign extended result.
};
+ enum SchedPreference {
+ SchedulingForLatency, // Scheduling for shortest total latency.
+ SchedulingForRegPressure, // Scheduling for lowest register pressure.
+ };
+
TargetLowering(TargetMachine &TM);
virtual ~TargetLowering();
@@ -102,6 +107,11 @@ public:
/// result register.
SetCCResultValue getSetCCResultContents() const { return SetCCResultContents;}
+ /// getSchedulingPreference - Return target scheduling preference.
+ SchedPreference getSchedulingPreference() const {
+ return SchedPreferenceInfo;
+ }
+
/// getRegClassFor - Return the register class that should be used for the
/// specified value type. This may only be called on legal types.
TargetRegisterClass *getRegClassFor(MVT::ValueType VT) const {
@@ -261,6 +271,11 @@ protected:
/// setcc operation in a register.
void setSetCCResultContents(SetCCResultValue Ty) { SetCCResultContents = Ty; }
+ /// setSchedulingPreference - Specify the target scheduling preference.
+ void setSchedulingPreference(SchedPreference Pref) {
+ SchedPreferenceInfo = Pref;
+ }
+
/// setShiftAmountFlavor - Describe how the target handles out of range shift
/// amounts.
void setShiftAmountFlavor(OutOfRangeShiftAmount OORSA) {
@@ -453,6 +468,10 @@ private:
/// SetCCResultContents - Information about the contents of the high-bits in
/// the result of a setcc comparison operation.
SetCCResultValue SetCCResultContents;
+
+ /// SchedPreferenceInfo - The target scheduling preference: shortest possible
+ /// total cycles or lowest register usage.
+ SchedPreference SchedPreferenceInfo;
/// UseUnderscoreSetJmpLongJmp - This target prefers to use _setjmp and
/// _longjmp to implement llvm.setjmp/llvm.longjmp. Defaults to false.