summaryrefslogtreecommitdiff
path: root/backend/src/CMakeLists.txt
diff options
context:
space:
mode:
authorZhigang Gong <zhigang.gong@intel.com>2014-10-08 12:58:59 +0800
committerZhigang Gong <zhigang.gong@intel.com>2014-10-17 15:10:44 +0800
commit0ccfdf53f80782b29835cea867fa1db891bcdcc5 (patch)
treedbcad32f44ffd643dce181a6c3fbb88c7dcfbaef /backend/src/CMakeLists.txt
parent74ea659e2ba624cbb07a6a99f1c7edc5bc144435 (diff)
GBE: Add a customized loop unrolling handling mechanism.
By default, the unrolling threshold is relatively small. Thus some relative large loops which access private array will not be unrolled, thus those private array can't be scalarized latter. And the private array is allocated in stack which is extreme slow for Gen backend currently. To increase the unrolling threshold for all loops is not a good idea, as most of the loops don't need to do unrolling for this purpose and a large unrolling threshold will cause a big code size and unecessary big register pressure which may lead to register spilling. So this patch introduce a trade-off pass to identify those loops which still have private load/store in the outer most of the loop. Then add a metadata to it to indicate aggresive unrolling on those loops. Then do another round loop unrolling. This patch with the previous small patch, can bring significant performance improvement for some cases. I just tested with some opencv test cases, and observed it can bring 2x to 10x improvement. v2: refine the parent loop unroll analysis method. v3: disable this pass for LLVM 3.3/3.4. Signed-off-by: Zhigang Gong <zhigang.gong@intel.com> Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
Diffstat (limited to 'backend/src/CMakeLists.txt')
-rw-r--r--backend/src/CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/backend/src/CMakeLists.txt b/backend/src/CMakeLists.txt
index 8cc7aa4a..dacc3a1a 100644
--- a/backend/src/CMakeLists.txt
+++ b/backend/src/CMakeLists.txt
@@ -85,6 +85,7 @@ set (GBE_SRC
llvm/llvm_loadstore_optimization.cpp
llvm/llvm_gen_backend.hpp
llvm/llvm_gen_ocl_function.hxx
+ llvm/llvm_unroll.cpp
llvm/llvm_to_gen.hpp
backend/gen/gen_mesa_disasm.c
backend/gen_insn_selection.cpp