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