[Beignet] [PATCH] Set the loop unroll's threshold to 1024.
Song, Ruiling
ruiling.song at intel.com
Wed Jul 1 00:32:41 PDT 2015
Selecting a reasonable threshold seems a difficult job. I am ok with 1024.
LGTM.
> -----Original Message-----
> From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of
> Yang Rong
> Sent: Wednesday, July 01, 2015 11:31 AM
> To: beignet at lists.freedesktop.org
> 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 <rong.r.yang at intel.com>
> ---
> 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
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list