Add initial version of C++17 <memory_resource> header
[official-gcc.git] / gcc / brig / ChangeLog
blobf8749b46e617c15d1658abb6ad526c38667337d0
1 2018-07-20  Martin Sebor  <msebor@redhat.com>
3         PR middle-end/82063
4         * brig/brig-lang.c (brig_langhook_handle_option): Change function
5         argument to HOST_WIDE_INT.
7 2018-07-04  Martin Jambor  <mjambor@suse.cz>
9         PR hsa/86371
10         * Make-lang.in (BRIGINCLUDES): Remove erroneous include path in $HOME.
12 2018-06-28  Martin Liska  <mliska@suse.cz>
14         * brigspec.c: Add missing header file inclusion.
16 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
18         * brigfrontend/brig-to-generic.cc
19         (brig_to_generic::write_globals): Use TDF_NONE rather than 0.
20         (dump_function): Likewise.
22 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
24         * brigfrontend/brig-function.cc
25         (brig_function::get_builtin_for_hsa_opcode): Use BUILT_IN_FMA
26         for BRIG_OPCODE_FMA.
27         (brig_function::get_tree_code_for_hsa_opcode): Treat BUILT_IN_FMA
28         as a call.
30 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
32         * brig/brigfrontend/brig-basic-inst-handler.cc:  Fix handling of NOPs.
34 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
36         Add flag -fassume-phsa that is on by default. If -fno-assume-phsa
37         is given, these optimizations are disabled.  With this flag, gccbrig
38         can generate GENERIC that assumes we are targeting a phsa-runtime
39         based implementation, which allows us to expose the work-item context
40         accesses to retrieve WI IDs etc.  which helps optimizers.
41         First optimization that takes advantage of this is to get rid of
42         the setworkitemid calls whenever we have non-inlined calls that
43         use IDs internally.  Other optimizations added in this commit:
44         - expand absoluteid to similar level of simplicity as workitemid.
45         At the moment absoluteid is the best indexing ID to end up with
46         WG vectorization.
47         - propagate ID variables closer to their uses. This is mainly
48         to avoid known useless casts, which confuse at least scalar
49         evolution analysis.
50         - use signed long long for storing IDs. Unsigned integers have
51         defined wraparound semantics, which confuse at least scalar
52         evolution analysis, leading to unvectorizable WI loops.
53         - also refactor some BRIG function generation helpers to brig_function.
54         - no point in having the wi-loop as a for-loop. It's really
55         a do...while and SCEV can analyze it just fine still.
56         - add consts to ptrs etc. in BRIG builtin defs.
57         Improves optimization opportunities.
58         - add qualifiers to generated function parameters.
59         Const and restrict on the hidden local/private pointers,
60         the arg buffer and the context pointer help some optimizations.
61         * brig/brigfrontend/brig-basic-inst-handler.cc: See above.
62         * brig/brigfrontend/brig-branch-inst-handler.cc: See above.
63         * brig/brigfrontend/brig-cmp-inst-handler.cc: See above.
64         * brig/brigfrontend/brig-code-entry-handler.cc: See above.
65         * brig/brigfrontend/brig-code-entry-handler.h: See above.
66         * brig/brigfrontend/brig-control-handler.cc: See above.
67         * brig/brigfrontend/brig-cvt-inst-handler.cc: See above.
68         * brig/brigfrontend/brig-function-handler.cc: See above.
69         * brig/brigfrontend/brig-function.cc: See above.
70         * brig/brigfrontend/brig-function.h: See above.
71         * brig/brigfrontend/brig-label-handler.cc: See above.
72         * brig/brigfrontend/brig-lane-inst-handler.cc: See above.
73         * brig/brigfrontend/brig-mem-inst-handler.cc: See above.
74         * brig/brigfrontend/phsa.h: See above.
75         * brig/lang.opt: See above.
77 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
79         * brig/brigfrontend/brig-function-handler.cc: Skip multiple forward
80         declarations of the same function.
82 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
84         * brig/brig-lang.c: Do not allow optimizations based on known C
85         builtins.
87 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
89         * brig/brig-lang.c: Allow controlling strict aliasing from
90         cmd line.
92 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
94         * brig/brigfrontend/brig-code-entry-handler.cc: The modulo in
95         ID computation should not be needed.
97 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
99         * brig/brig-lang.c: Add support for whole program
100         optimizations by marking the kernels externally visible.
101         * brig/brigfrontend/brig-branch-inst-handler.cc: See above.
102         * brig/brigfrontend/brig-function-handler.cc: See above.
103         * brig/brigfrontend/brig-function.cc: See above.
104         * brig/brigfrontend/brig-to-generic.cc: See above.
105         * brig/brigfrontend/brig-to-generic.h: See above.
106         * brig/brigfrontend/brig-variable-handler.h: See above.
108 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
109             Alan Hayward  <alan.hayward@arm.com>
110             David Sherwood  <david.sherwood@arm.com>
112         * brigfrontend/brig-to-generic.cc (get_unsigned_int_type): Handle
113         polynomial TYPE_VECTOR_SUBPARTS.
114         * brigfrontend/brig-util.h (gccbrig_type_vector_subparts): Likewise.
116 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
118         Update copyright years.
120 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
121             Alan Hayward  <alan.hayward@arm.com>
122             David Sherwood  <david.sherwood@arm.com>
124         * brigfrontend/brig-util.h (gccbrig_type_vector_subparts): New
125         function.
126         * brigfrontend/brig-basic-inst-handler.cc
127         (brig_basic_inst_handler::build_shuffle): Use it instead of
128         TYPE_VECTOR_SUBPARTS.
129         (brig_basic_inst_handler::build_unpack): Likewise.
130         (brig_basic_inst_handler::build_pack): Likewise.
131         (brig_basic_inst_handler::build_unpack_lo_or_hi): Likewise.
132         (brig_basic_inst_handler::operator ()): Likewise.
133         (brig_basic_inst_handler::build_lower_element_broadcast): Likewise.
134         * brigfrontend/brig-code-entry-handler.cc
135         (brig_code_entry_handler::get_tree_cst_for_hsa_operand): Likewise.
136         (brig_code_entry_handler::get_comparison_result_type): Likewise.
137         (brig_code_entry_handler::expand_or_call_builtin): Likewise.
139 2017-12-15  Jakub Jelinek  <jakub@redhat.com>
141         * brig-lang.c (brig_attribute_table): Swap affects_type_identity
142         and handler fields, adjust comments.
144 2017-12-08  Jakub Jelinek  <jakub@redhat.com>
146         * brig-lang.c (brig_attribute_table): Fix up comment.
148 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
150         * brigfrontend/brig-branch-inst-handler.cc
151         (brig_branch_inst_handler::operator): Build SWITCH_EXPR using build2
152         instead of build3.
154 2017-11-17  Henry Linjamäki  <henry.linjamaki@parmance.com>
156         * brigfrontend/brig-util.cc: Fix sprintf format string type mismatch
157         on 32b machines.
159 2017-11-16  Henry Linjamäki  <henry.linjamaki@parmance.com>
161         Change internal representation of HSA registers. Instead
162         representing HSA's untyped registers as unsigned int the gccbrig
163         analyzes brig code and builds the register variables as a type
164         used in tree expressions at most. This gives better chance to
165         optimize CONVERT_VIEW_EXPRs away.
166         * brigfrontend/brig-code-entry-handler.cc: Add analysis method for
167         register type usage. Handle any-typed register variables.
168         * brigfrontend/brig-code-entry-handler.h: New declarations for the
169         above.
170         * brigfrontend/brig-copy-move-inst-handler.cc: Handle any-typed
171         register variables.
172         * brigfrontend/brig-cvt-inst-handler.cc: Likewise.
173         * brigfrontend/brig-function.cc: Build register variables as a
174         type based on results of analysis phase.
175         * brigfrontend/brig-function.h: Move HSA register count defines to
176         brig-utils.h.
177         * brigfrontend/brig-to-generic.cc: New analysis handler. Analyze
178         HSA register usage.
179         * brigfrontend/brig-to-generic.h: New declarations.
180         * brigfrontend/brig-util.cc: New utility functions.
181         * brigfrontend/brig-util.h: New declarations for the above.
183 2017-11-16  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
185         * gccbrig.texi: Added some documentation.
187 2017-10-31  Henry Linjamäki  <henry.linjamaki@parmance.com>
189         * brig-lang.c (brig_langhook_type_for_mode): Fix PR 82771.
191 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
193         * brig-lang.c (brig_langhook_type_for_mode): Use scalar_int_mode
194         and scalar_float_mode.
196 2017-10-09  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
198         * brigfrontend/brig-to-generic.cc: Support BRIG_KIND_NONE
199         directives.  These directives are legal everywhere.  They
200         can be used to patch away BRIG entries at the binary level.
201         Also add extra error detection for zeroed regions: make sure
202         the byteCount field is never zero.
203         * brig/brigfrontend/phsa.h: Added a new error prefix for
204         errors which are due to corrupted BRIG modules.
206 2017-10-09  Henry Linjamäki  <henry.linjamaki@parmance.com>
208         * brigfrontend/brig-branch-inst-handler.cc: The call code
209         still failed a few test cases. Now all PRM cases pass again.
211 2017-10-03  Henry Linjamäki  <henry.linjamaki@parmance.com>
213         * brigfrontend/brig-branch-inst-handler.cc: Fix (more) crash with
214         calls with more than 4 args.  It missed a reference which is required
215         because vector expansion can move the object to another location.
217 2017-09-29  Henry Linjamäki  <henry.linjamaki@parmance.com>
219         * brigfrontend/brig-branch-inst-handler.cc: Fix crash with
220         calls with more than 4 args. Also fix a misexecution issue
221         with kernels that have both unexpanded ID functions and
222         calls to subfunctions.
224 2017-09-28  Henry Linjamäki  <henry.linjamaki@parmance.com>
226         * brig-lang.c: Added function attributes and their handlers.
227         Make BRIGFE 3-level optimize by default.
229 2017-09-27  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
231         * brig-lang.c: Improved support for function and module scope
232         group segment variables.  PRM specs defines function and module
233         scope group segment variables as an experimental feature. However,
234         PRM test suite uses and hcc relies on them. In addition, hcc
235         assumes certain group variable layout in its dynamic group segment
236         allocation code.  We cannot have global group memory offsets if we
237         want to both have kernel-specific group segment size and multiple
238         kernels calling the same functions that use function scope group memory
239         variables.  Now group segment is handled by separate book keeping of
240         module scope and function (kernel) offsets. Each function has a "frame"
241         in the group segment offset to which is given as an argument.
242         * brigfrontend/brig-branch-inst-handler.cc: See above.
243         * brigfrontend/brig-code-entry-handler.cc: See above.
244         * brigfrontend/brig-fbarrier-handler.cc: See above.
245         * brigfrontend/brig-function-handler.cc: See above.
246         * brigfrontend/brig-function.cc: See above.
247         * brigfrontend/brig-function.h: See above.
248         * brigfrontend/brig-to-generic.cc: See above.
249         * brigfrontend/brig-to-generic.h: See above.
250         * brigfrontend/brig-util.cc: See above.
251         * brigfrontend/brig-util.h: See above.
252         * brigfrontend/brig-variable-handler.cc: See above.
254 2017-09-25  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
256         * brigfrontend/brig-to-generic.cc: Ensure per WI copies of
257         private variables are aligned too.
259 2017-09-17  Thomas Schwinge  <thomas@codesourcery.com>
261         * Make-lang.in (GO_TEXI_FILES): Rename to...
262         (BRIG_TEXI_FILES): ... this.
263         (doc/gccbrig.info, doc/gccbrig.dvi, doc/gccbrig.pdf, brig.info)
264         (brig.srcinfo, brig.man, brig.srcman, brig.install-man)
265         ($(DESTDIR)$(man1dir)/$(GCCBRIG_INSTALL_NAME)$(man1ext)):
266         Uncomment/enable targets.
267         (gccbrig.pod): New target.
268         * gccbrig.texi: New file.
270 2017-08-04  Henry Linjamäki  <henry.linjamaki@parmance.com>
272         Fix PR 81713
273         * brigfrontend/brig-basic-inst-handler.cc: replace build_int_cst with
274         bitsize_int in building BIT_FIELD_REF.
275         * brigfrontend/brig-code-entry-handler.cc: likewise.
277 2017-07-05  Richard Sandiford  <richard.sandiford@linaro.org>
278             Alan Hayward  <alan.hayward@arm.com>
279             David Sherwood  <david.sherwood@arm.com>
281         * brig-c.h (brig_type_for_mode): Remove "enum" before "machine_mode".
282         * brig-lang.c (brig_langhook_type_for_mode): Likewise.
284 2017-07-04  Jakub Jelinek  <jakub@redhat.com>
286         * brigfrontend/brig-function.cc: Include profile-count.h.
287         * brigfrontend/brig-to-generic.cc: Likewise.
289 2017-05-18  Thomas Schwinge  <thomas@codesourcery.com>
291         * brigfrontend/brig-to-generic.h (class brig_to_generic): Use
292         "dump_flags_t" for "m_dump_flags" member.
294 2017-05-13  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
296         * brigfrontend/brig-code-entry-handler.cc
297         (brig_code_entry_handler::build_address_operand): Fix
298         an assertion when doing an 'lda' of a private array
299         offset.
301 2017-05-03  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
303         * brigfrontend/brig-code-entry-handler.cc
304         (brig_code_entry_handler::build_address_operand): Fix a bug
305         with reg+offset addressing on 32b segments. In large mode,
306         the offset is treated as 32bits unless it's global, readonly or
307         kernarg address space.
309 2016-02-01  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
311         * brigfrontend/brig-code-entry-handler.cc: fix address
312         expressions which refer only to offset 0, but nothing else.
313         * brigfrontend/brig-lane-inst-handler.cc: fix
314         activelanepermute_b64 HSAIL instruction.
315         * brigfrontend/brig-to-generic.cc: remove useless c_str()
316         call. Add missing va_end (). Fix PR79250.
318 2017-01-30  Jakub Jelinek  <jakub@redhat.com>
320         * brigfrontend/brig-code-entry-handler.cc
321         (brig_code_entry_handler::get_tree_cst_for_hsa_operand): For %lu
322         cast size_t arguments to unsigned long.
324 2017-01-27  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
326         * config-lang.in: Removed stale target-libbrig reference.
328 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
330         Update copyright years.
332 2017-01-24  Pekka Jääskeläinen  <pekka@parmance.com>
333             Martin Jambor  <mjambor@suse.cz>
335         * Make-lang.in: New file.
336         * brig-builtins.h: Likewise.
337         * brig-c.h: Likewise.
338         * brig-lang.c: Likewise.
339         * brigspec.c: Likewise.
340         * config-lang.in: Likewise.
341         * lang-specs.h: Likewise.
342         * lang.opt: Likewise.
343         * brigfrontend/brig-arg-block-handler.cc: Likewise.
344         * brigfrontend/brig-atomic-inst-handler.cc: Likewise.
345         * brigfrontend/brig-basic-inst-handler.cc: Likewise.
346         * brigfrontend/brig-branch-inst-handler.cc: Likewise.
347         * brigfrontend/brig-cmp-inst-handler.cc: Likewise.
348         * brigfrontend/brig-code-entry-handler.cc: Likewise.
349         * brigfrontend/brig-code-entry-handler.h: Likewise.
350         * brigfrontend/brig-comment-handler.cc: Likewise.
351         * brigfrontend/brig-control-handler.cc: Likewise.
352         * brigfrontend/brig-copy-move-inst-handler.cc: Likewise.
353         * brigfrontend/brig-cvt-inst-handler.cc: Likewise.
354         * brigfrontend/brig-fbarrier-handler.cc: Likewise.
355         * brigfrontend/brig-function-handler.cc: Likewise.
356         * brigfrontend/brig-function.cc: Likewise.
357         * brigfrontend/brig-function.h: Likewise.
358         * brigfrontend/brig-inst-mod-handler.cc: Likewise.
359         * brigfrontend/brig-label-handler.cc: Likewise.
360         * brigfrontend/brig-lane-inst-handler.cc: Likewise.
361         * brigfrontend/brig-machine.c: Likewise.
362         * brigfrontend/brig-machine.h: Likewise.
363         * brigfrontend/brig-mem-inst-handler.cc: Likewise.
364         * brigfrontend/brig-module-handler.cc: Likewise.
365         * brigfrontend/brig-queue-inst-handler.cc: Likewise.
366         * brigfrontend/brig-seg-inst-handler.cc: Likewise.
367         * brigfrontend/brig-signal-inst-handler.cc: Likewise.
368         * brigfrontend/brig-to-generic.cc: Likewise.
369         * brigfrontend/brig-to-generic.h: Likewise.
370         * brigfrontend/brig-util.cc: Likewise.
371         * brigfrontend/brig-util.h: Likewise.
372         * brigfrontend/brig-variable-handler.cc: Likewise.
373         * brigfrontend/phsa.h: Likewise.