Pushed, and add ruiling's comment to the commit log.
On Wed, Jan 28, 2015 at 02:02:56AM +0000, Song, Ruiling wrote: > LGTM, For dead loop, it has an unconditional branch at its end. Simply do not > treat it as a loop is also acceptable. > I ran into this problem when I execute ./opencv_test_imgproc > --gtest_filter=OCL_Imgproc/HoughLines.RealImage/0 > And it fix the problem. > > > > -----Original Message----- > > From: Beignet [mailto:[email protected]] On Behalf Of > > [email protected] > > Sent: Wednesday, January 28, 2015 9:24 AM > > To: [email protected] > > Cc: Luo, Xionghu > > Subject: [Beignet] [PATCH] check the predication in case of endless loop. > > > > From: Luo <[email protected]> > > > > Signed-off-by: Luo <[email protected]> > > --- > > backend/src/ir/structural_analysis.cpp | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/backend/src/ir/structural_analysis.cpp > > b/backend/src/ir/structural_analysis.cpp > > index 4c7e3d2..101570a 100644 > > --- a/backend/src/ir/structural_analysis.cpp > > +++ b/backend/src/ir/structural_analysis.cpp > > @@ -67,6 +67,11 @@ namespace analysis > > if (pbb->hasExtraBra) > > it--; > > ir::BranchInstruction* pinsn = static_cast<ir::BranchInstruction > > *>(&*it); > > + > > + if(!pinsn->isPredicated()){ > > + std::cout << "WARNING:" << "endless loop detected!" << std::endl; > > + return; > > + } > > ir::Register reg = pinsn->getPredicateIndex(); > > /* since this node is an while node, so we remove the BRA instruction > > at the bottom of the exit BB of 'node', > > * and insert WHILE instead > > -- > > 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 _______________________________________________ Beignet mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/beignet
