[BRIGFE] Improved support for function and module scope group
authorPekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
Wed, 27 Sep 2017 15:40:24 +0000 (15:40 +0000)
committerPekka Jääskeläinen <visit0r@gcc.gnu.org>
Wed, 27 Sep 2017 15:40:24 +0000 (15:40 +0000)
commitd4b7f2ee4bb69d5d3594413d63d077d2f3610141
treeb54b8393b78c2654d94510cf03949efa006d39da
parent6f0e6f0868f02f79a2ee561419393839d974c1f7
[BRIGFE] Improved support for function and module scope group
segment variables.

PRM specs defines function and module scope group segment variables
as an experimental feature. However, PRM test suite uses and
hcc relies on them. In addition, hcc assumes certain group variable
layout in its dynamic group segment allocation code.

We cannot have global group memory offsets if we want to
both have kernel-specific group segment size and multiple kernels
calling the same functions that use function scope group memory
variables.

Now group segment is handled by separate book keeping of module
scope and function (kernel) offsets. Each function has a "frame"
in the group segment offset to which is given as an argument.

From-SVN: r253233
22 files changed:
gcc/brig/ChangeLog
gcc/brig/brig-lang.c
gcc/brig/brigfrontend/brig-branch-inst-handler.cc
gcc/brig/brigfrontend/brig-code-entry-handler.cc
gcc/brig/brigfrontend/brig-fbarrier-handler.cc
gcc/brig/brigfrontend/brig-function-handler.cc
gcc/brig/brigfrontend/brig-function.cc
gcc/brig/brigfrontend/brig-function.h
gcc/brig/brigfrontend/brig-to-generic.cc
gcc/brig/brigfrontend/brig-to-generic.h
gcc/brig/brigfrontend/brig-util.cc
gcc/brig/brigfrontend/brig-util.h
gcc/brig/brigfrontend/brig-variable-handler.cc
gcc/testsuite/ChangeLog
gcc/testsuite/brig.dg/test/gimple/fbarrier.hsail
gcc/testsuite/brig.dg/test/gimple/function_calls.hsail
gcc/testsuite/brig.dg/test/gimple/smoke_test.hsail
gcc/testsuite/brig.dg/test/gimple/variables.hsail
libhsail-rt/ChangeLog
libhsail-rt/include/internal/phsa-rt.h
libhsail-rt/include/internal/workitems.h
libhsail-rt/rt/workitems.c