[Beignet] [PATCH 00/31 V2] Add long type support for BDW.

junyan.he at inbox.com junyan.he at inbox.com
Sun Jan 18 23:31:08 PST 2015


From: Junyan He <junyan.he at linux.intel.com>

This patch set will fully enable the native long type
support for BDW. Most the I64 functions in the backend
will be rewritten.
Notice there are 2 biggest limitations:
1. The untyped read and write for I64 can just support
   stateless surface. This is unaccepitable for us because
   it can cause overwrite problems. We need to fallback to
   use the old manner which read and  write the long as the
   vec2 of int into/from top and bottom  halves, and then
   assemble the data.
   This limitation seems not exist in later platform.
2. The DIV and REM instruction, which will need to use MATH
   shared function do not support I64. So we fallback to
   old manner.
   This limitation may be overcomed by handling the DIV and
   REM instructions in LLVM level.

V2:
1. Fix one Assert in insn_selection, because we append a vector
   before generate the instruction.
2. Fix bitcast logic for i64.
3. Add the upsample_long logic.
------
 backend/src/backend/gen/gen_mesa_disasm.c          |   25 +-
 backend/src/backend/gen8_context.cpp               |  680 ++++++++++++++++++++
 backend/src/backend/gen8_context.hpp               |   25 +
 backend/src/backend/gen8_encoder.cpp               |   23 +-
 backend/src/backend/gen8_encoder.hpp               |    3 +
 backend/src/backend/gen8_instruction.hpp           |    2 +
 backend/src/backend/gen_context.cpp                |   10 +-
 backend/src/backend/gen_context.hpp                |   38 +-
 backend/src/backend/gen_encoder.cpp                |   87 ++-
 backend/src/backend/gen_encoder.hpp                |    6 +-
 .../src/backend/gen_insn_gen7_schedule_info.hxx    |    2 +
 backend/src/backend/gen_insn_scheduling.cpp        |    6 +-
 backend/src/backend/gen_insn_selection.cpp         |  662 ++++++++++++++-----
 backend/src/backend/gen_insn_selection.hxx         |    2 +
 backend/src/backend/gen_reg_allocation.cpp         |    5 +-
 backend/src/backend/gen_register.hpp               |  115 +++-
 kernels/compiler_long_bitcast.cl                   |   47 ++
 kernels/compiler_long_div.cl                       |   12 +
 kernels/compiler_long_hi_sat.cl                    |   19 +
 kernels/compiler_long_not.cl                       |    6 +
 utests/CMakeLists.txt                              |    4 +
 utests/compiler_long_bitcast.cpp                   |  227 +++++++
 utests/compiler_long_div.cpp                       |   88 +++
 utests/compiler_long_hi_sat.cpp                    |  188 ++++++
 utests/compiler_long_not.cpp                       |   52 ++
 25 files changed, 2117 insertions(+), 217 deletions(-)
-- 
1.7.9.5


More information about the Beignet mailing list