[Beignet] [PATCH 00/22 V2] Using bit code ocl lib to replace the huge header file.
Zhigang Gong
zhigang.gong at linux.intel.com
Thu Sep 4 00:53:54 PDT 2014
Just pushed the whole patchset. Thayour nks for great
contribution. We can finally get rid of the huge PCH file
and the huge header file which includes everything.
On Mon, Sep 01, 2014 at 10:05:13AM +0800, junyan.he at inbox.com wrote:
> From: Junyan He <junyan.he at linux.intel.com>
>
> The PCH file is growing too big. It contains too many defines and macros, which
> need a lot of time to parse and may cause some conflicts with the user defined
> macros. This patch set will extract the function protocols from its definition
> into the header files and compile all the functions' definition into a llvm bitcode
> file as a cl library. This manner is also compatible with libclc and we can switch
> to libclc if libclc is stable and extensive enough.
> This patch set may cause the compiling time slower than the PCH version, because
> the header file's parsing and bitcode's linking are not optimized yet, and we will
> continue to improve it.
>
> V2 improvement:
> 1. Optimizatiion at the bitcode link. Analyse and materialize the functions needed by
> CL kernel before do the Call Graph Analyse and Global Var killing.
> 2. Use PCH to accelerate the header file's parsing.
> 3. Use CMake to replace the Makefile for libocl, which make the project consistency
> better.
>
> TODO:
> Math functions' fast and standard switch in the lib.
>
> Signed-off-by: Junyan He <junyan.he at linux.intel.com>
> ---
> backend/CMakeLists.txt | 8 +-
> backend/src/CMakeLists.txt | 135 +-
> backend/src/GBEConfig.h.in | 5 +-
> backend/src/backend/program.cpp | 289 +-
> backend/src/builtin_vector_proto.def | 295 -
> backend/src/gen_as.sh | 101 -
> backend/src/gen_builtin_vector.py | 417 -
> backend/src/gen_convert.sh | 553 -
> backend/src/genconfig.sh | 11 -
> backend/src/libocl/CMakeLists.txt | 209 +
> backend/src/libocl/include/ocl.h | 23 +
> backend/src/libocl/include/ocl_async.h | 49 +
> backend/src/libocl/include/ocl_atom.h | 84 +
> backend/src/libocl/include/ocl_float.h | 79 +
> backend/src/libocl/include/ocl_geometric.h | 39 +
> backend/src/libocl/include/ocl_image.h | 161 +
> backend/src/libocl/include/ocl_misc.h | 122 +
> backend/src/libocl/include/ocl_printf.h | 15 +
> backend/src/libocl/include/ocl_sync.h | 18 +
> backend/src/libocl/include/ocl_types.h | 104 +
> backend/src/libocl/include/ocl_vload.h | 143 +
> backend/src/libocl/include/ocl_workitem.h | 15 +
> backend/src/libocl/script/gen_vector.py | 382 +
> backend/src/libocl/script/ocl_as.sh | 127 +
> backend/src/libocl/script/ocl_common.def | 22 +
> backend/src/libocl/script/ocl_convert.sh | 656 +
> backend/src/libocl/script/ocl_integer.def | 31 +
> backend/src/libocl/script/ocl_math.def | 166 +
> backend/src/libocl/script/ocl_relational.def | 34 +
> backend/src/libocl/src/ocl_async.cl | 69 +
> backend/src/libocl/src/ocl_atom.cl | 122 +
> backend/src/libocl/src/ocl_barrier.ll | 39 +
> backend/src/libocl/src/ocl_geometric.cl | 96 +
> backend/src/libocl/src/ocl_image.cl | 412 +
> backend/src/libocl/src/ocl_memcpy.ll | 336 +
> backend/src/libocl/src/ocl_memset.ll | 127 +
> backend/src/libocl/src/ocl_misc.cl | 201 +
> backend/src/libocl/src/ocl_sync.cl | 14 +
> backend/src/libocl/src/ocl_vload.cl | 257 +
> backend/src/libocl/src/ocl_workitem.cl | 40 +
> backend/src/libocl/tmpl/ocl_common.tmpl.cl | 49 +
> backend/src/libocl/tmpl/ocl_common.tmpl.h | 21 +
> backend/src/libocl/tmpl/ocl_defines.tmpl.h | 23 +
> backend/src/libocl/tmpl/ocl_integer.tmpl.cl | 352 +
> backend/src/libocl/tmpl/ocl_integer.tmpl.h | 160 +
> backend/src/libocl/tmpl/ocl_math.tmpl.cl | 3316 +++++
> backend/src/libocl/tmpl/ocl_math.tmpl.h | 103 +
> backend/src/libocl/tmpl/ocl_relational.tmpl.cl | 151 +
> backend/src/libocl/tmpl/ocl_relational.tmpl.h | 78 +
> backend/src/llvm/llvm_bitcode_link.cpp | 203 +
> backend/src/llvm/llvm_gen_backend.hpp | 3 +
> backend/src/llvm/llvm_to_gen.cpp | 70 +-
> backend/src/ocl_as.h | 3086 -----
> backend/src/ocl_barrier.ll | 39 -
> backend/src/ocl_convert.h |17415 ------------------------
> backend/src/ocl_memcpy.ll | 336 -
> backend/src/ocl_memset.ll | 127 -
> backend/src/ocl_stdlib.tmpl.h | 5149 -------
> backend/src/update.sh | 3 -
> backend/src/update_as.sh | 11 -
> backend/src/update_blob_ocl_header.py | 65 -
> backend/src/update_convert.sh | 12 -
> utests/setenv.sh.in | 5 +-
> 63 files changed, 8808 insertions(+), 27975 deletions(-)
>
>
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list