Add a getSDep() access function to SUnitIterator to return the
authorDan Gohman <gohman@apple.com>
Tue, 16 Dec 2008 00:51:33 +0000 (00:51 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 16 Dec 2008 00:51:33 +0000 (00:51 +0000)
current SDep.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61064 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/ScheduleDAG.h

index 8ffe7f74389d16243dd45f6e1ef367c21c87a4ff..0f82ae91fdefd7c6331acece23a6d1a98e4133c1 100644 (file)
@@ -549,10 +549,13 @@ namespace llvm {
     const SUnit *getNode() const { return Node; }
     /// isCtrlDep - Test if this is not an SDep::Data dependence.
     bool isCtrlDep() const {
-      return Node->Preds[Operand].isCtrl();
+      return getSDep().isCtrl();
     }
     bool isArtificialDep() const {
-      return Node->Preds[Operand].isArtificial();
+      return getSDep().isArtificial();
+    }
+    const SDep &getSDep() const {
+      return Node->Preds[Operand];
     }
   };