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