1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Add a enum to specify target scheduling preference: SchedulingForLatency or

SchedulingForRegPressure. Added corresponding methods to set / get the value.

llvm-svn: 25598
This commit is contained in:
Evan Cheng 2006-01-25 09:09:02 +00:00
parent 27e82023a4
commit f4b53efbb2

View File

@ -70,6 +70,11 @@ public:
ZeroOrNegativeOneSetCCResult, // SetCC returns a sign extended result. ZeroOrNegativeOneSetCCResult, // SetCC returns a sign extended result.
}; };
enum SchedPreference {
SchedulingForLatency, // Scheduling for shortest total latency.
SchedulingForRegPressure, // Scheduling for lowest register pressure.
};
TargetLowering(TargetMachine &TM); TargetLowering(TargetMachine &TM);
virtual ~TargetLowering(); virtual ~TargetLowering();
@ -102,6 +107,11 @@ public:
/// result register. /// result register.
SetCCResultValue getSetCCResultContents() const { return SetCCResultContents;} 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 /// getRegClassFor - Return the register class that should be used for the
/// specified value type. This may only be called on legal types. /// specified value type. This may only be called on legal types.
TargetRegisterClass *getRegClassFor(MVT::ValueType VT) const { TargetRegisterClass *getRegClassFor(MVT::ValueType VT) const {
@ -261,6 +271,11 @@ protected:
/// setcc operation in a register. /// setcc operation in a register.
void setSetCCResultContents(SetCCResultValue Ty) { SetCCResultContents = Ty; } 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 /// setShiftAmountFlavor - Describe how the target handles out of range shift
/// amounts. /// amounts.
void setShiftAmountFlavor(OutOfRangeShiftAmount OORSA) { void setShiftAmountFlavor(OutOfRangeShiftAmount OORSA) {
@ -454,6 +469,10 @@ private:
/// the result of a setcc comparison operation. /// the result of a setcc comparison operation.
SetCCResultValue SetCCResultContents; 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 /// UseUnderscoreSetJmpLongJmp - This target prefers to use _setjmp and
/// _longjmp to implement llvm.setjmp/llvm.longjmp. Defaults to false. /// _longjmp to implement llvm.setjmp/llvm.longjmp. Defaults to false.
bool UseUnderscoreSetJmpLongJmp; bool UseUnderscoreSetJmpLongJmp;