[Beignet] [PATCH] Set the loop unroll's threshold to 1024.
Yang Rong
rong.r.yang at intel.com
Tue Jun 30 20:31:17 PDT 2015
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
More information about the Beignet
mailing list