[llvm-commits] CVS: llvm/include/llvm/Target/TargetLowering.h
Evan Cheng
evan.cheng at apple.com
Wed Jan 25 01:09:15 PST 2006
Changes in directory llvm/include/llvm/Target:
TargetLowering.h updated: 1.34 -> 1.35
---
Log message:
Add a enum to specify target scheduling preference: SchedulingForLatency or
SchedulingForRegPressure. Added corresponding methods to set / get the value.
---
Diffs of the changes: (+19 -0)
TargetLowering.h | 19 +++++++++++++++++++
1 files changed, 19 insertions(+)
Index: llvm/include/llvm/Target/TargetLowering.h
diff -u llvm/include/llvm/Target/TargetLowering.h:1.34 llvm/include/llvm/Target/TargetLowering.h:1.35
--- llvm/include/llvm/Target/TargetLowering.h:1.34 Fri Jan 13 11:47:52 2006
+++ llvm/include/llvm/Target/TargetLowering.h Wed Jan 25 03:09:02 2006
@@ -70,6 +70,11 @@
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 @@
/// 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 @@
/// 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 @@
/// 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.
More information about the llvm-commits
mailing list