diff options
| author | Stephen Hines <srhines@google.com> | 2012-09-10 16:47:31 -0700 |
|---|---|---|
| committer | Stephen Hines <srhines@google.com> | 2012-09-10 16:47:31 -0700 |
| commit | 1c4ad5ef4fab105f0c8af7edd026e00502fb6279 (patch) | |
| tree | cb5bdfd58f776d00be450d0a5585f8f0186585da /include/llvm/CodeGen/ScheduleDAG.h | |
| parent | d62cdbe700ab288e9ad447824066edb7d17167d9 (diff) | |
| parent | 1dc2591e9ef0730612902f94976ce85bed6859de (diff) | |
| download | external_llvm-1c4ad5ef4fab105f0c8af7edd026e00502fb6279.zip external_llvm-1c4ad5ef4fab105f0c8af7edd026e00502fb6279.tar.gz external_llvm-1c4ad5ef4fab105f0c8af7edd026e00502fb6279.tar.bz2 | |
Merge branch 'upstream' into merge-2012_09_10
Conflicts:
lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
lib/Support/DynamicLibrary.cpp
lib/Support/LockFileManager.cpp
Change-Id: I91e94c3a7a76e19c688307c5a480a640a3bd2b7e
Diffstat (limited to 'include/llvm/CodeGen/ScheduleDAG.h')
| -rw-r--r-- | include/llvm/CodeGen/ScheduleDAG.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/ScheduleDAG.h b/include/llvm/CodeGen/ScheduleDAG.h index 85ab47b..2567a65 100644 --- a/include/llvm/CodeGen/ScheduleDAG.h +++ b/include/llvm/CodeGen/ScheduleDAG.h @@ -85,6 +85,8 @@ namespace llvm { /// the value of the Latency field of the predecessor, however advanced /// models may provide additional information about specific edges. unsigned Latency; + /// Record MinLatency seperately from "expected" Latency. + unsigned MinLatency; public: /// SDep - Construct a null SDep. This is only for use by container @@ -96,7 +98,7 @@ namespace llvm { SDep(SUnit *S, Kind kind, unsigned latency = 1, unsigned Reg = 0, bool isNormalMemory = false, bool isMustAlias = false, bool isArtificial = false) - : Dep(S, kind), Contents(), Latency(latency) { + : Dep(S, kind), Contents(), Latency(latency), MinLatency(latency) { switch (kind) { case Anti: case Output: @@ -135,7 +137,8 @@ namespace llvm { } bool operator==(const SDep &Other) const { - return overlaps(Other) && Latency == Other.Latency; + return overlaps(Other) + && Latency == Other.Latency && MinLatency == Other.MinLatency; } bool operator!=(const SDep &Other) const { @@ -155,6 +158,18 @@ namespace llvm { Latency = Lat; } + /// getMinLatency - Return the minimum latency for this edge. Minimum + /// latency is used for scheduling groups, while normal (expected) latency + /// is for instruction cost and critical path. + unsigned getMinLatency() const { + return MinLatency; + } + + /// setMinLatency - Set the minimum latency for this edge. + void setMinLatency(unsigned Lat) { + MinLatency = Lat; + } + //// getSUnit - Return the SUnit to which this edge points. SUnit *getSUnit() const { return Dep.getPointer(); |
