1 2019-10-04 Joseph Myers <joseph@codesourcery.com>
3 * brig-lang.c (flag_isoc2x): New variable.
5 2019-08-23 Jakub Jelinek <jakub@redhat.com>
8 * brig-lang.c (brig_langhook_post_options): Set flag_excess_precision
9 instead of flag_excess_precision_cmdline.
11 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
13 * brig-lang.c (brig_build_c_type_nodes): Accept "__intN__"
14 format of "__intN" types for SIZE_TYPE.
16 2019-05-16 Martin Sebor <msebor@redhat.com>
18 * brigfrontend/brig-control-handler.cc
19 (brig_directive_control_handler::operator): Remove trailing newline
21 * brigfrontend/brig-module-handler.cc
22 (brig_directive_module_handler::operator): Remove a duplicated space
25 2019-01-01 Jakub Jelinek <jakub@redhat.com>
27 Update copyright years.
29 2018-10-17 David Malcolm <dmalcolm@redhat.com>
31 * Make-lang.in (selftest-brig): New.
33 2018-07-20 Martin Sebor <msebor@redhat.com>
36 * brig-lang.c (brig_langhook_handle_option): Change function
37 argument to HOST_WIDE_INT.
39 2018-07-04 Martin Jambor <mjambor@suse.cz>
42 * Make-lang.in (BRIGINCLUDES): Remove erroneous include path in $HOME.
44 2018-06-28 Martin Liska <mliska@suse.cz>
46 * brigspec.c: Add missing header file inclusion.
48 2018-06-08 David Malcolm <dmalcolm@redhat.com>
50 * brigfrontend/brig-to-generic.cc
51 (brig_to_generic::write_globals): Use TDF_NONE rather than 0.
52 (dump_function): Likewise.
54 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
56 * brigfrontend/brig-function.cc
57 (brig_function::get_builtin_for_hsa_opcode): Use BUILT_IN_FMA
59 (brig_function::get_tree_code_for_hsa_opcode): Treat BUILT_IN_FMA
62 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
64 * brigfrontend/brig-basic-inst-handler.cc: Fix handling of NOPs.
66 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
68 Add flag -fassume-phsa that is on by default. If -fno-assume-phsa
69 is given, these optimizations are disabled. With this flag, gccbrig
70 can generate GENERIC that assumes we are targeting a phsa-runtime
71 based implementation, which allows us to expose the work-item context
72 accesses to retrieve WI IDs etc. which helps optimizers.
73 First optimization that takes advantage of this is to get rid of
74 the setworkitemid calls whenever we have non-inlined calls that
75 use IDs internally. Other optimizations added in this commit:
76 - expand absoluteid to similar level of simplicity as workitemid.
77 At the moment absoluteid is the best indexing ID to end up with
79 - propagate ID variables closer to their uses. This is mainly
80 to avoid known useless casts, which confuse at least scalar
82 - use signed long long for storing IDs. Unsigned integers have
83 defined wraparound semantics, which confuse at least scalar
84 evolution analysis, leading to unvectorizable WI loops.
85 - also refactor some BRIG function generation helpers to brig_function.
86 - no point in having the wi-loop as a for-loop. It's really
87 a do...while and SCEV can analyze it just fine still.
88 - add consts to ptrs etc. in BRIG builtin defs.
89 Improves optimization opportunities.
90 - add qualifiers to generated function parameters.
91 Const and restrict on the hidden local/private pointers,
92 the arg buffer and the context pointer help some optimizations.
93 * brigfrontend/brig-basic-inst-handler.cc: See above.
94 * brigfrontend/brig-branch-inst-handler.cc: See above.
95 * brigfrontend/brig-cmp-inst-handler.cc: See above.
96 * brigfrontend/brig-code-entry-handler.cc: See above.
97 * brigfrontend/brig-code-entry-handler.h: See above.
98 * brigfrontend/brig-control-handler.cc: See above.
99 * brigfrontend/brig-cvt-inst-handler.cc: See above.
100 * brigfrontend/brig-function-handler.cc: See above.
101 * brigfrontend/brig-function.cc: See above.
102 * brigfrontend/brig-function.h: See above.
103 * brigfrontend/brig-label-handler.cc: See above.
104 * brigfrontend/brig-lane-inst-handler.cc: See above.
105 * brigfrontend/brig-mem-inst-handler.cc: See above.
106 * brigfrontend/phsa.h: See above.
107 * lang.opt: See above.
109 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
111 * brigfrontend/brig-function-handler.cc: Skip multiple forward
112 declarations of the same function.
114 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
116 * brig-lang.c: Do not allow optimizations based on known C
119 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
121 * brig-lang.c: Allow controlling strict aliasing from
124 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
126 * brigfrontend/brig-code-entry-handler.cc: The modulo in
127 ID computation should not be needed.
129 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
131 * brig-lang.c: Add support for whole program
132 optimizations by marking the kernels externally visible.
133 * brigfrontend/brig-branch-inst-handler.cc: See above.
134 * brigfrontend/brig-function-handler.cc: See above.
135 * brigfrontend/brig-function.cc: See above.
136 * brigfrontend/brig-to-generic.cc: See above.
137 * brigfrontend/brig-to-generic.h: See above.
138 * brigfrontend/brig-variable-handler.h: See above.
140 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
141 Alan Hayward <alan.hayward@arm.com>
142 David Sherwood <david.sherwood@arm.com>
144 * brigfrontend/brig-to-generic.cc (get_unsigned_int_type): Handle
145 polynomial TYPE_VECTOR_SUBPARTS.
146 * brigfrontend/brig-util.h (gccbrig_type_vector_subparts): Likewise.
148 2018-01-03 Jakub Jelinek <jakub@redhat.com>
150 Update copyright years.
152 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
153 Alan Hayward <alan.hayward@arm.com>
154 David Sherwood <david.sherwood@arm.com>
156 * brigfrontend/brig-util.h (gccbrig_type_vector_subparts): New
158 * brigfrontend/brig-basic-inst-handler.cc
159 (brig_basic_inst_handler::build_shuffle): Use it instead of
160 TYPE_VECTOR_SUBPARTS.
161 (brig_basic_inst_handler::build_unpack): Likewise.
162 (brig_basic_inst_handler::build_pack): Likewise.
163 (brig_basic_inst_handler::build_unpack_lo_or_hi): Likewise.
164 (brig_basic_inst_handler::operator ()): Likewise.
165 (brig_basic_inst_handler::build_lower_element_broadcast): Likewise.
166 * brigfrontend/brig-code-entry-handler.cc
167 (brig_code_entry_handler::get_tree_cst_for_hsa_operand): Likewise.
168 (brig_code_entry_handler::get_comparison_result_type): Likewise.
169 (brig_code_entry_handler::expand_or_call_builtin): Likewise.
171 2017-12-15 Jakub Jelinek <jakub@redhat.com>
173 * brig-lang.c (brig_attribute_table): Swap affects_type_identity
174 and handler fields, adjust comments.
176 2017-12-08 Jakub Jelinek <jakub@redhat.com>
178 * brig-lang.c (brig_attribute_table): Fix up comment.
180 2017-11-28 Jakub Jelinek <jakub@redhat.com>
182 * brigfrontend/brig-branch-inst-handler.cc
183 (brig_branch_inst_handler::operator): Build SWITCH_EXPR using build2
186 2017-11-17 Henry Linjamäki <henry.linjamaki@parmance.com>
188 * brigfrontend/brig-util.cc: Fix sprintf format string type mismatch
191 2017-11-16 Henry Linjamäki <henry.linjamaki@parmance.com>
193 Change internal representation of HSA registers. Instead
194 representing HSA's untyped registers as unsigned int the gccbrig
195 analyzes brig code and builds the register variables as a type
196 used in tree expressions at most. This gives better chance to
197 optimize CONVERT_VIEW_EXPRs away.
198 * brigfrontend/brig-code-entry-handler.cc: Add analysis method for
199 register type usage. Handle any-typed register variables.
200 * brigfrontend/brig-code-entry-handler.h: New declarations for the
202 * brigfrontend/brig-copy-move-inst-handler.cc: Handle any-typed
204 * brigfrontend/brig-cvt-inst-handler.cc: Likewise.
205 * brigfrontend/brig-function.cc: Build register variables as a
206 type based on results of analysis phase.
207 * brigfrontend/brig-function.h: Move HSA register count defines to
209 * brigfrontend/brig-to-generic.cc: New analysis handler. Analyze
211 * brigfrontend/brig-to-generic.h: New declarations.
212 * brigfrontend/brig-util.cc: New utility functions.
213 * brigfrontend/brig-util.h: New declarations for the above.
215 2017-11-16 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
217 * gccbrig.texi: Added some documentation.
219 2017-10-31 Henry Linjamäki <henry.linjamaki@parmance.com>
221 * brig-lang.c (brig_langhook_type_for_mode): Fix PR 82771.
223 2017-10-23 Richard Sandiford <richard.sandiford@linaro.org>
225 * brig-lang.c (brig_langhook_type_for_mode): Use scalar_int_mode
226 and scalar_float_mode.
228 2017-10-09 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
230 * brigfrontend/brig-to-generic.cc: Support BRIG_KIND_NONE
231 directives. These directives are legal everywhere. They
232 can be used to patch away BRIG entries at the binary level.
233 Also add extra error detection for zeroed regions: make sure
234 the byteCount field is never zero.
235 * brigfrontend/phsa.h: Added a new error prefix for
236 errors which are due to corrupted BRIG modules.
238 2017-10-09 Henry Linjamäki <henry.linjamaki@parmance.com>
240 * brigfrontend/brig-branch-inst-handler.cc: The call code
241 still failed a few test cases. Now all PRM cases pass again.
243 2017-10-03 Henry Linjamäki <henry.linjamaki@parmance.com>
245 * brigfrontend/brig-branch-inst-handler.cc: Fix (more) crash with
246 calls with more than 4 args. It missed a reference which is required
247 because vector expansion can move the object to another location.
249 2017-09-29 Henry Linjamäki <henry.linjamaki@parmance.com>
251 * brigfrontend/brig-branch-inst-handler.cc: Fix crash with
252 calls with more than 4 args. Also fix a misexecution issue
253 with kernels that have both unexpanded ID functions and
254 calls to subfunctions.
256 2017-09-28 Henry Linjamäki <henry.linjamaki@parmance.com>
258 * brig-lang.c: Added function attributes and their handlers.
259 Make BRIGFE 3-level optimize by default.
261 2017-09-27 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
263 * brig-lang.c: Improved support for function and module scope
264 group segment variables. PRM specs defines function and module
265 scope group segment variables as an experimental feature. However,
266 PRM test suite uses and hcc relies on them. In addition, hcc
267 assumes certain group variable layout in its dynamic group segment
268 allocation code. We cannot have global group memory offsets if we
269 want to both have kernel-specific group segment size and multiple
270 kernels calling the same functions that use function scope group memory
271 variables. Now group segment is handled by separate book keeping of
272 module scope and function (kernel) offsets. Each function has a "frame"
273 in the group segment offset to which is given as an argument.
274 * brigfrontend/brig-branch-inst-handler.cc: See above.
275 * brigfrontend/brig-code-entry-handler.cc: See above.
276 * brigfrontend/brig-fbarrier-handler.cc: See above.
277 * brigfrontend/brig-function-handler.cc: See above.
278 * brigfrontend/brig-function.cc: See above.
279 * brigfrontend/brig-function.h: See above.
280 * brigfrontend/brig-to-generic.cc: See above.
281 * brigfrontend/brig-to-generic.h: See above.
282 * brigfrontend/brig-util.cc: See above.
283 * brigfrontend/brig-util.h: See above.
284 * brigfrontend/brig-variable-handler.cc: See above.
286 2017-09-25 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
288 * brigfrontend/brig-to-generic.cc: Ensure per WI copies of
289 private variables are aligned too.
291 2017-09-17 Thomas Schwinge <thomas@codesourcery.com>
293 * Make-lang.in (GO_TEXI_FILES): Rename to...
294 (BRIG_TEXI_FILES): ... this.
295 (doc/gccbrig.info, doc/gccbrig.dvi, doc/gccbrig.pdf, brig.info)
296 (brig.srcinfo, brig.man, brig.srcman, brig.install-man)
297 ($(DESTDIR)$(man1dir)/$(GCCBRIG_INSTALL_NAME)$(man1ext)):
298 Uncomment/enable targets.
299 (gccbrig.pod): New target.
300 * gccbrig.texi: New file.
302 2017-08-04 Henry Linjamäki <henry.linjamaki@parmance.com>
305 * brigfrontend/brig-basic-inst-handler.cc: replace build_int_cst with
306 bitsize_int in building BIT_FIELD_REF.
307 * brigfrontend/brig-code-entry-handler.cc: likewise.
309 2017-07-05 Richard Sandiford <richard.sandiford@linaro.org>
310 Alan Hayward <alan.hayward@arm.com>
311 David Sherwood <david.sherwood@arm.com>
313 * brig-c.h (brig_type_for_mode): Remove "enum" before "machine_mode".
314 * brig-lang.c (brig_langhook_type_for_mode): Likewise.
316 2017-07-04 Jakub Jelinek <jakub@redhat.com>
318 * brigfrontend/brig-function.cc: Include profile-count.h.
319 * brigfrontend/brig-to-generic.cc: Likewise.
321 2017-05-18 Thomas Schwinge <thomas@codesourcery.com>
323 * brigfrontend/brig-to-generic.h (class brig_to_generic): Use
324 "dump_flags_t" for "m_dump_flags" member.
326 2017-05-13 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
328 * brigfrontend/brig-code-entry-handler.cc
329 (brig_code_entry_handler::build_address_operand): Fix
330 an assertion when doing an 'lda' of a private array
333 2017-05-03 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
335 * brigfrontend/brig-code-entry-handler.cc
336 (brig_code_entry_handler::build_address_operand): Fix a bug
337 with reg+offset addressing on 32b segments. In large mode,
338 the offset is treated as 32bits unless it's global, readonly or
339 kernarg address space.
341 2016-02-01 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
343 * brigfrontend/brig-code-entry-handler.cc: fix address
344 expressions which refer only to offset 0, but nothing else.
345 * brigfrontend/brig-lane-inst-handler.cc: fix
346 activelanepermute_b64 HSAIL instruction.
347 * brigfrontend/brig-to-generic.cc: remove useless c_str()
348 call. Add missing va_end (). Fix PR79250.
350 2017-01-30 Jakub Jelinek <jakub@redhat.com>
352 * brigfrontend/brig-code-entry-handler.cc
353 (brig_code_entry_handler::get_tree_cst_for_hsa_operand): For %lu
354 cast size_t arguments to unsigned long.
356 2017-01-27 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
358 * config-lang.in: Removed stale target-libbrig reference.
360 2017-01-26 Jakub Jelinek <jakub@redhat.com>
362 Update copyright years.
364 2017-01-24 Pekka Jääskeläinen <pekka@parmance.com>
365 Martin Jambor <mjambor@suse.cz>
367 * Make-lang.in: New file.
368 * brig-builtins.h: Likewise.
369 * brig-c.h: Likewise.
370 * brig-lang.c: Likewise.
371 * brigspec.c: Likewise.
372 * config-lang.in: Likewise.
373 * lang-specs.h: Likewise.
374 * lang.opt: Likewise.
375 * brigfrontend/brig-arg-block-handler.cc: Likewise.
376 * brigfrontend/brig-atomic-inst-handler.cc: Likewise.
377 * brigfrontend/brig-basic-inst-handler.cc: Likewise.
378 * brigfrontend/brig-branch-inst-handler.cc: Likewise.
379 * brigfrontend/brig-cmp-inst-handler.cc: Likewise.
380 * brigfrontend/brig-code-entry-handler.cc: Likewise.
381 * brigfrontend/brig-code-entry-handler.h: Likewise.
382 * brigfrontend/brig-comment-handler.cc: Likewise.
383 * brigfrontend/brig-control-handler.cc: Likewise.
384 * brigfrontend/brig-copy-move-inst-handler.cc: Likewise.
385 * brigfrontend/brig-cvt-inst-handler.cc: Likewise.
386 * brigfrontend/brig-fbarrier-handler.cc: Likewise.
387 * brigfrontend/brig-function-handler.cc: Likewise.
388 * brigfrontend/brig-function.cc: Likewise.
389 * brigfrontend/brig-function.h: Likewise.
390 * brigfrontend/brig-inst-mod-handler.cc: Likewise.
391 * brigfrontend/brig-label-handler.cc: Likewise.
392 * brigfrontend/brig-lane-inst-handler.cc: Likewise.
393 * brigfrontend/brig-machine.c: Likewise.
394 * brigfrontend/brig-machine.h: Likewise.
395 * brigfrontend/brig-mem-inst-handler.cc: Likewise.
396 * brigfrontend/brig-module-handler.cc: Likewise.
397 * brigfrontend/brig-queue-inst-handler.cc: Likewise.
398 * brigfrontend/brig-seg-inst-handler.cc: Likewise.
399 * brigfrontend/brig-signal-inst-handler.cc: Likewise.
400 * brigfrontend/brig-to-generic.cc: Likewise.
401 * brigfrontend/brig-to-generic.h: Likewise.
402 * brigfrontend/brig-util.cc: Likewise.
403 * brigfrontend/brig-util.h: Likewise.
404 * brigfrontend/brig-variable-handler.cc: Likewise.
405 * brigfrontend/phsa.h: Likewise.