[v2] don't merge serial blocks with barrier.

Submitted by Luo, Xionghu on June 30, 2015, 2:37 a.m.

Details

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

Not browsing as part of any series.

Commit Message

Luo, Xionghu June 30, 2015, 2:37 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.
v2: update comments: As our barrier implementation doen't support
structured barrier operation, exclude all the barrier blocks from
serialPatternMatch.

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

Patch hide | download patch | download mbox

diff --git a/backend/src/ir/structurizer.cpp b/backend/src/ir/structurizer.cpp
index cb8e11b..82bb56b 100644
--- a/backend/src/ir/structurizer.cpp
+++ b/backend/src/ir/structurizer.cpp
@@ -738,7 +738,9 @@  namespace ir {
       return 0;
 
     Block *childBlk = *block->succ_begin();
-    if (childBlk->pred_size() != 1 )
+    //FIXME, As our barrier implementation doen't support structured barrier
+    //operation, exclude all the barrier blocks from serialPatternMatch.
+    if (childBlk->pred_size() != 1 || childBlk->hasBarrier() )
       return 0;
 
     BlockList serialBBs;//childBBs

Comments

LGTM
We need to remove the limitation that barrier block could not be enclosed in structured block.

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

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

> xionghu.luo@intel.com

> Sent: Tuesday, June 30, 2015 10:37 AM

> To: beignet@lists.freedesktop.org

> Cc: Luo, Xionghu

> Subject: [Beignet] [patch v2] 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.

> v2: update comments: As our barrier implementation doen't support

> structured barrier operation, exclude all the barrier blocks from

> serialPatternMatch.

> 

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

> ---

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

>  1 file changed, 3 insertions(+), 1 deletion(-)

> 

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

> index cb8e11b..82bb56b 100644

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

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

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

>        return 0;

> 

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

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

> +    //FIXME, As our barrier implementation doen't support structured

> barrier

> +    //operation, exclude all the barrier blocks from serialPatternMatch.

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

>        return 0;

> 

>      BlockList serialBBs;//childBBs

> --

> 1.9.1

> 

> _______________________________________________

> Beignet mailing list

> Beignet@lists.freedesktop.org

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

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

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

> Song, Ruiling

> Sent: Tuesday, June 30, 2015 13:39

> To: Luo, Xionghu; beignet@lists.freedesktop.org

> Cc: Luo, Xionghu

> Subject: Re: [Beignet] [patch v2] don't merge serial blocks with barrier.

> 

> LGTM

> We need to remove the limitation that barrier block could not be enclosed in

> structured block.

> 

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

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

> > Of xionghu.luo@intel.com

> > Sent: Tuesday, June 30, 2015 10:37 AM

> > To: beignet@lists.freedesktop.org

> > Cc: Luo, Xionghu

> > Subject: [Beignet] [patch v2] 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.

> > v2: update comments: As our barrier implementation doen't support

> > structured barrier operation, exclude all the barrier blocks from

> > serialPatternMatch.

> >

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

> > ---

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

> >  1 file changed, 3 insertions(+), 1 deletion(-)

> >

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

> > b/backend/src/ir/structurizer.cpp index cb8e11b..82bb56b 100644

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

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

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

> >        return 0;

> >

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

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

> > +    //FIXME, As our barrier implementation doen't support structured

> > barrier

> > +    //operation, exclude all the barrier blocks from serialPatternMatch.

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

> >        return 0;

> >

> >      BlockList serialBBs;//childBBs

> > --

> > 1.9.1

> >

> > _______________________________________________

> > Beignet mailing list

> > Beignet@lists.freedesktop.org

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

> _______________________________________________

> Beignet mailing list

> Beignet@lists.freedesktop.org

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