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