don't merge serial blocks with barrier.

Submitted by Luo, Xionghu on June 24, 2015, 8:11 a.m.

Details

Message ID 1435133493-28439-1-git-send-email-xionghu.luo@intel.com
State New
Headers show

Not browsing as part of any series.

Commit Message

Luo, Xionghu June 24, 2015, 8:11 a.m.
From: Luo Xionghu <xionghu.luo@intel.com>

this could fix the piglit and opencv fail on IVB_x86 platform.
1) opencv_test_core/OCL_Arithm/CountNonZero
2) opencv_test_core/OCL_Arithm/MeanStdDev
3) piglit case program/execute/atomic_cmpxchg-local.

Signed-off-by: Luo Xionghu <xionghu.luo@intel.com>
---
 backend/src/ir/structurizer.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/backend/src/ir/structurizer.cpp b/backend/src/ir/structurizer.cpp
index cb8e11b..10faeb6 100644
--- a/backend/src/ir/structurizer.cpp
+++ b/backend/src/ir/structurizer.cpp
@@ -738,7 +738,7 @@  namespace ir {
       return 0;
 
     Block *childBlk = *block->succ_begin();
-    if (childBlk->pred_size() != 1 )
+    if (childBlk->pred_size() != 1 || childBlk->hasBarrier() )
       return 0;
 
     BlockList serialBBs;//childBBs

Comments

> -----Original Message-----

> From: Beignet [mailto:beignet-bounces@lists.freedesktop.org] On Behalf Of

> xionghu.luo@intel.com

> Sent: Wednesday, June 24, 2015 4:12 PM

> To: beignet@lists.freedesktop.org

> Cc: Luo, Xionghu

> Subject: [Beignet] [PATCH] don't merge serial blocks with barrier.

> 

> From: Luo Xionghu <xionghu.luo@intel.com>

> 

> this could fix the piglit and opencv fail on IVB_x86 platform.

> 1) opencv_test_core/OCL_Arithm/CountNonZero

> 2) opencv_test_core/OCL_Arithm/MeanStdDev

> 3) piglit case program/execute/atomic_cmpxchg-local.

> 

> Signed-off-by: Luo Xionghu <xionghu.luo@intel.com>

> ---

>  backend/src/ir/structurizer.cpp | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/backend/src/ir/structurizer.cpp b/backend/src/ir/structurizer.cpp

> index cb8e11b..10faeb6 100644

> --- a/backend/src/ir/structurizer.cpp

> +++ b/backend/src/ir/structurizer.cpp

> @@ -738,7 +738,7 @@ namespace ir {

>        return 0;

> 

>      Block *childBlk = *block->succ_begin();

> -    if (childBlk->pred_size() != 1 )

> +    if (childBlk->pred_size() != 1 || childBlk->hasBarrier() )

>        return 0;

> 

>      BlockList serialBBs;//childBBs


Why barrier have conflict with serial blocks?
> --

> 1.9.1

> 

> _______________________________________________

> Beignet mailing list

> Beignet@lists.freedesktop.org

> http://lists.freedesktop.org/mailman/listinfo/beignet
Luo Xionghu
Best Regards

-----Original Message-----
From: Song, Ruiling 

Sent: Thursday, June 25, 2015 10:37 AM
To: Luo, Xionghu; beignet@lists.freedesktop.org
Cc: Luo, Xionghu
Subject: RE: [Beignet] [PATCH] don't merge serial blocks with barrier.



> -----Original Message-----

> From: Beignet [mailto:beignet-bounces@lists.freedesktop.org] On Behalf 

> Of xionghu.luo@intel.com

> Sent: Wednesday, June 24, 2015 4:12 PM

> To: beignet@lists.freedesktop.org

> Cc: Luo, Xionghu

> Subject: [Beignet] [PATCH] don't merge serial blocks with barrier.

> 

> From: Luo Xionghu <xionghu.luo@intel.com>

> 

> this could fix the piglit and opencv fail on IVB_x86 platform.

> 1) opencv_test_core/OCL_Arithm/CountNonZero

> 2) opencv_test_core/OCL_Arithm/MeanStdDev

> 3) piglit case program/execute/atomic_cmpxchg-local.

> 

> Signed-off-by: Luo Xionghu <xionghu.luo@intel.com>

> ---

>  backend/src/ir/structurizer.cpp | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/backend/src/ir/structurizer.cpp 

> b/backend/src/ir/structurizer.cpp index cb8e11b..10faeb6 100644

> --- a/backend/src/ir/structurizer.cpp

> +++ b/backend/src/ir/structurizer.cpp

> @@ -738,7 +738,7 @@ namespace ir {

>        return 0;

> 

>      Block *childBlk = *block->succ_begin();

> -    if (childBlk->pred_size() != 1 )

> +    if (childBlk->pred_size() != 1 || childBlk->hasBarrier() )

>        return 0;

> 

>      BlockList serialBBs;//childBBs


Why barrier have conflict with serial blocks?
>>>Considering below situation: B is the successor is A, and B has a backage to A, if B has a barrier, this A and B shouldn't be merged to a self loop block, so filter it out to avoid wrong match. 

> --

> 1.9.1

> 

> _______________________________________________

> Beignet mailing list

> Beignet@lists.freedesktop.org

> http://lists.freedesktop.org/mailman/listinfo/beignet