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