Selecting a reasonable threshold seems a difficult job. I am ok with 1024. LGTM.
> -----Original Message----- > From: Beignet [mailto:[email protected]] On Behalf Of > Yang Rong > Sent: Wednesday, July 01, 2015 11:31 AM > To: [email protected] > Cc: Yang, Rong R > Subject: [Beignet] [PATCH] Set the loop unroll's threshold to 1024. > > LLVM's default threshold is 150, too small. In general, the loop unroll in GEN > can improve the perfomance, so enlarge it to 1024. > > Signed-off-by: Yang Rong <[email protected]> > --- > backend/src/llvm/llvm_to_gen.cpp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/backend/src/llvm/llvm_to_gen.cpp > b/backend/src/llvm/llvm_to_gen.cpp > index e0f6bf2..891f2a1 100644 > --- a/backend/src/llvm/llvm_to_gen.cpp > +++ b/backend/src/llvm/llvm_to_gen.cpp > @@ -160,7 +160,7 @@ namespace gbe > MPM.add(createIndVarSimplifyPass()); // Canonicalize > indvars > MPM.add(createLoopIdiomPass()); // Recognize idioms > like memset. > MPM.add(createLoopDeletionPass()); // Delete dead loops > - MPM.add(createLoopUnrollPass()); //1024, 32, 1024, 512)); //Unroll > loops > + MPM.add(createLoopUnrollPass(1024)); //1024, 32, 1024, 512)); > + //Unroll loops > if(optLevel > 0) { > MPM.add(createSROAPass(/*RequiresDomTree*/ false)); > MPM.add(createGVNPass()); // Remove > redundancies > -- > 1.8.3.2 > > _______________________________________________ > Beignet mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/beignet _______________________________________________ Beignet mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/beignet
