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