summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2013-03-01 00:19:12 +0000
committerAndrew Trick <atrick@apple.com>2013-03-01 00:19:12 +0000
commit8e897ca393372e288b41314f274cedcb38c82a31 (patch)
tree61f5bfff44caee5509e09c58e34b4c6285a58730
parent2a8edef70b17f2736cbf4bf6f4cd676d1739b0e8 (diff)
downloadbcm5719-llvm-8e897ca393372e288b41314f274cedcb38c82a31.tar.gz
bcm5719-llvm-8e897ca393372e288b41314f274cedcb38c82a31.zip
Fix incorrect ScheduleDAG comment and formalize Weak edges.
llvm-svn: 176315
-rw-r--r--llvm/include/llvm/CodeGen/ScheduleDAG.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/llvm/include/llvm/CodeGen/ScheduleDAG.h b/llvm/include/llvm/CodeGen/ScheduleDAG.h
index d80bdf8e281..8c959da696d 100644
--- a/llvm/include/llvm/CodeGen/ScheduleDAG.h
+++ b/llvm/include/llvm/CodeGen/ScheduleDAG.h
@@ -52,11 +52,21 @@ namespace llvm {
Order ///< Any other ordering dependency.
};
+ // Strong dependencies must be respected by the scheduler. Artificial
+ // dependencies may be removed only if they are redundant with another
+ // strong depedence.
+ //
+ // Weak dependencies may be violated by the scheduling strategy, but only if
+ // the strategy can prove it is correct to do so.
+ //
+ // Strong OrderKinds must occur before "Weak".
+ // Weak OrderKinds must occur after "Weak".
enum OrderKind {
Barrier, ///< An unknown scheduling barrier.
MayAliasMem, ///< Nonvolatile load/Store instructions that may alias.
MustAliasMem, ///< Nonvolatile load/Store instructions that must alias.
- Artificial, ///< Arbitrary weak DAG edge (no actual dependence).
+ Artificial, ///< Arbitrary strong DAG edge (no real dependence).
+ Weak, ///< Arbitrary weak DAG edge.
Cluster ///< Weak DAG edge linking a chain of clustered instrs.
};
@@ -205,7 +215,7 @@ namespace llvm {
/// not force ordering. Breaking a weak edge may require the scheduler to
/// compensate, for example by inserting a copy.
bool isWeak() const {
- return getKind() == Order && Contents.OrdKind == Cluster;
+ return getKind() == Order && Contents.OrdKind >= Weak;
}
/// isArtificial - Test if this is an Order dependence that is marked
OpenPOWER on IntegriCloud