LGTM, pushed, thanks.

> -----Original Message-----
> From: Beignet [mailto:[email protected]] On Behalf Of
> [email protected]
> Sent: Monday, July 6, 2015 14:52
> To: [email protected]
> Cc: Luo, Xionghu
> Subject: [Beignet] [PATCH] structuralize bug fix: check the loop successor
> before merge.
> 
> From: Luo Xionghu <[email protected]>
> 
> self loop header should have a successor to itself, check this before merge.
> this could fix Opencv case
> opencv_perf_imgproc/OCL_CvtColorFixture_CvtColor causes GPU hang.
> 
> Signed-off-by: Luo Xionghu <[email protected]>
> ---
>  backend/src/ir/structurizer.cpp | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/backend/src/ir/structurizer.cpp b/backend/src/ir/structurizer.cpp
> index 82bb56b..6c4e455 100644
> --- a/backend/src/ir/structurizer.cpp
> +++ b/backend/src/ir/structurizer.cpp
> @@ -812,6 +812,13 @@ namespace ir {
>      if(loopBBs.empty())
>        return 0;
> 
> +    if(loopSets.size() == 1) {
> +    //self loop header should have a successor to itself, check this before
> merged.
> +      Block* lblock = *loopSets.begin();
> +      if(lblock->successors().find(lblock) == lblock->successors().end())
> +        return 0;
> +    }
> +
>      Block* mergedBB = mergeLoopBlock(loopBBs);
>      if(mergedBB == NULL)
>        return 0;
> --
> 1.9.1
> 
> _______________________________________________
> Beignet mailing list
> [email protected]
> http://lists.freedesktop.org/mailman/listinfo/beignet
_______________________________________________
Beignet mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/beignet

Reply via email to