gcc/libhsail-rt
Pekka Jääskeläinen 080dc24383 [BRIGFE] phsa-specific optimizations
Add flag -fassume-phsa that is on by default. If -fno-assume-phsa
is given, these optimizations are disabled.

With this flag, gccbrig can generate GENERIC that assumes we are
targeting a phsa-runtime based implementation, which allows us
to expose the work-item context accesses to retrieve WI IDs etc.
which helps optimizers.

First optimization that takes advantage of this is to get rid of
the setworkitemid calls whenever we have non-inlined calls that
use IDs internally.

Other optimizations added in this commit:

- expand absoluteid to similar level of simplicity as workitemid.
At the moment absoluteid is the best indexing ID to end up with
WG vectorization.
- propagate ID variables closer to their uses. This is mainly
to avoid known useless casts, which confuse at least scalar
evolution analysis.
- use signed long long for storing IDs. Unsigned integers have
defined wraparound semantics, which confuse at least scalar
evolution analysis, leading to unvectorizable WI loops.
- also refactor some BRIG function generation helpers to brig_function.
- no point in having the wi-loop as a for-loop. It's really
a do...while and SCEV can analyze it just fine still.
- add consts to ptrs etc. in BRIG builtin defs.
Improves optimization opportunities.
- add qualifiers to generated function parameters.
Const and restrict on the hidden local/private pointers,
the arg buffer and the context pointer help some optimizations.

From-SVN: r259957
2018-05-04 19:43:57 +00:00
..
include/internal [BRIGFE] phsa-specific optimizations 2018-05-04 19:43:57 +00:00
rt [BRIGFE] phsa-specific optimizations 2018-05-04 19:43:57 +00:00
aclocal.m4
ChangeLog [BRIGFE] phsa-specific optimizations 2018-05-04 19:43:57 +00:00
configure re PR jit/85384 (libgccjit does not work if --with-gcc-major-version is used) 2018-04-18 11:46:58 +02:00
configure.ac
configure.tgt Update copyright years. 2018-01-03 11:03:58 +01:00
Makefile.am
Makefile.in
README [brigfe] Small fixes 2017-01-27 15:35:07 +01:00
target-config.h.in

This library implements the agent-side runtime functionality required
to run HSA finalized programs produced by the BRIG frontend.

The library contains both the code required to run kernels on the agent
and also functions implementing more complex HSAIL instructions.

rt/workitems.c contains the runtime entry function that manages multiple
work-item execution using fibers or simple for-loops (in case of work groups
without barriers).  Otherwise, the rest of the source files mostly contain
functions that typically map directly to HSAIL instructions.