[Beignet] [PATCH] Fix instruction scheduler ScheduleDAGNode

Zhigang Gong zhigang.gong at linux.intel.com
Thu May 16 19:41:23 PDT 2013


I just tested this patch and it doesn't break anything.
Pushed, thanks.

On Mon, May 13, 2013 at 03:05:29PM +0800, Homer Hsing wrote:
> 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
> 
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list