Add callback to allow target to adjust latency of schedule dependency edge.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78910 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Goodwin
2009-08-13 16:05:04 +00:00
parent 524dea4d4c
commit 710461688b
4 changed files with 31 additions and 7 deletions

View File

@@ -145,6 +145,11 @@ namespace llvm {
return Latency;
}
/// setLatency - Set the latency for this edge.
void setLatency(unsigned Lat) {
Latency = Lat;
}
//// getSUnit - Return the SUnit to which this edge points.
SUnit *getSUnit() const {
return Dep.getPointer();

View File

@@ -16,6 +16,8 @@
namespace llvm {
class SDep;
//===----------------------------------------------------------------------===//
///
/// TargetSubtarget - Generic base class for all target subtargets. All
@@ -35,6 +37,10 @@ public:
/// indicating the number of scheduling cycles of backscheduling that
/// should be attempted.
virtual unsigned getSpecialAddressLatency() const { return 0; }
// adjustSchedDependency - Perform target specific adjustments to
// the latency of a schedule dependency.
virtual void adjustSchedDependency(SDep&) const { };
};
} // End llvm namespace