[Beignet] [PATCH] Fix instruction scheduler ScheduleDAGNode

Homer Hsing homer.xing at intel.com
Mon May 13 00:05:29 PDT 2013


When we add dependency for ScheduleDAGNode, we use
ScheduleDAGNode(node1)->children.push_back(node0) to express
node0 depends on node1.

To check this dependency, we should check whether node0 is inside
node1->children.

Original code checks whether node1 is inside node0->children.

So we fix this.

Signed-off-by: Homer Hsing <homer.xing at intel.com>
---
 backend/src/backend/gen_insn_scheduling.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/backend/src/backend/gen_insn_scheduling.cpp b/backend/src/backend/gen_insn_scheduling.cpp
index 01c525e..95eedfe 100644
--- a/backend/src/backend/gen_insn_scheduling.cpp
+++ b/backend/src/backend/gen_insn_scheduling.cpp
@@ -109,7 +109,7 @@ namespace gbe
       insn(insn), refNum(0), retiredCycle(0) {}
     bool dependsOn(ScheduleDAGNode *node) const {
       GBE_ASSERT(node != NULL);
-      for (auto child : children)
+      for (auto child : node->children)
         if (child.node == this)
           return true;
       return false;
-- 
1.8.1.2



More information about the Beignet mailing list