]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/jit/ChangeLog
go: don't crash if __atomic_fetch_add functions are used
[thirdparty/gcc.git] / gcc / jit / ChangeLog
CommitLineData
d0fc05e8
GA
12022-09-15 Richard Biener <rguenther@suse.de>
2
3 * dummy-frontend.cc (jit_langhook_init): Do not initialize
4 void_list_node.
5
6d001ec1
GA
62022-08-09 Vibhav Pant <vibhavp@gmail.com>
7
8 * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_context_new_bitcast): Move
9 definition out of comment.
10
af086d19
GA
112022-07-28 David Malcolm <dmalcolm@redhat.com>
12
13 * docs/internals/index.rst: Remove reference to ".c" extensions
14 of source files.
15
162022-07-28 Martin Liška <mliska@suse.cz>
17
18 * docs/cp/intro/tutorial02.rst:
19 Shorten the assembly example so that there is not slider.
20 * docs/cp/intro/tutorial04.rst: Likewise.
21 * docs/intro/tutorial02.rst: Likewise.
22 * docs/intro/tutorial04.rst: Likewise.
23 * docs/topics/contexts.rst: Likewise.
24
252022-07-28 marxin <mliska@suse.cz>
26
27 * docs/index.rst: Remove reference to module index
28 as we don't emit any.
29
302022-07-28 marxin <mliska@suse.cz>
31
32 * docs/cp/intro/tutorial02.rst: Use :expr:`type *` for pointers to a type
33 * docs/cp/topics/asm.rst: Likewise.
34 * docs/cp/topics/contexts.rst: Likewise.
35 * docs/cp/topics/expressions.rst: Likewise.
36 * docs/cp/topics/functions.rst: Likewise.
37 * docs/cp/topics/objects.rst: Likewise.
38 * docs/intro/tutorial02.rst: Likewise.
39 * docs/intro/tutorial03.rst: Likewise.
40 * docs/intro/tutorial04.rst: Likewise.
41 * docs/intro/tutorial05.rst: Likewise.
42 * docs/topics/compilation.rst: Likewise.
43 * docs/topics/contexts.rst: Likewise.
44 * docs/topics/objects.rst: Likewise.
45
462022-07-28 marxin <mliska@suse.cz>
47
48 * docs/cp/intro/tutorial04.rst: Use list-table.
49 * docs/intro/tutorial04.rst: Likewise.
50 * docs/intro/tutorial05.rst: Likewise.
51 * docs/topics/compilation.rst: Likewise.
52 * docs/topics/expressions.rst: Likewise.
53 * docs/topics/types.rst: Likewise.
54
552022-07-28 marxin <mliska@suse.cz>
56
57 * docs/cp/topics/expressions.rst: Compact so that the generated
58 output is also more compact.
59
602022-07-28 marxin <mliska@suse.cz>
61
62 * docs/cp/intro/tutorial02.rst: Use proper reference.
63 * docs/cp/topics/contexts.rst: Likewise.
64 * docs/cp/topics/functions.rst: Put `class` directive before a
65 function as it is not allowed declaring a class in a fn.
66 * docs/cp/topics/types.rst: Add template keyword.
67 * docs/examples/tut04-toyvm/toyvm.c (toyvm_function_compile):
68 Add removed comment used for code snippet ending detection.
69 * docs/intro/tutorial04.rst: Fix to match the real comment.
70
712022-07-28 marxin <mliska@suse.cz>
72
73 * docs/cp/topics/expressions.rst: Use :expr: for basic types.
74 * docs/topics/compilation.rst: Likewise.
75 * docs/topics/expressions.rst: Likewise.
76 * docs/topics/function-pointers.rst: Likewise.
77
782022-07-28 marxin <mliska@suse.cz>
79
80 * docs/conf.py: Add needs_sphinx = '3.0' where c:type was added.
81 * docs/index.rst: Remove note about it.
82 * docs/topics/compilation.rst: Use enum directive and reference.
83 * docs/topics/contexts.rst: Likewise.
84 * docs/topics/expressions.rst: Likewise.
85 * docs/topics/functions.rst: Likewise.
86
e0e07bc7
GA
872022-07-14 Jonathan Wakely <jwakely@redhat.com>
88
89 * jit-recording.h (recording::memento): Define copy constructor
90 and copy assignment operator as deleted.
91 (recording::string): Likewise.
92 (recording::string::c_str): Add const qualifier.
93
ce600bc4
GA
942022-06-29 Antoni Boucher <bouanto@zoho.com>
95
96 PR jit/105812
97 * jit-playback.cc: Use the correct return type when folding in
98 as_truth_value.
99
1002022-06-29 Sergei Trofimovich <siarheit@google.com>
101
102 PR c++/106102
103 * jit-playback.cc: Include <pthread.h> via "system.h" to avoid calloc()
104 poisoning.
105 * jit-recording.cc: Ditto.
106 * libgccjit.cc: Ditto.
107
ef1e4d80
GA
1082022-06-10 Antoni Boucher <bouanto@zoho.com>
109
110 PR jit/105829
111 * libgccjit.cc: Add support for floating-point types in
112 gcc_jit_type_get_size.
113
02b4e2de
GA
1142022-06-08 Yang Yujie <yangyujie@loongson.cn>
115
116 * Make-lang.in: only link objects from $(EXTRA_GCC_OBJS)
117 that's not in $(EXTRA_OBJS) into libgccjit.
118
168fc8bd
GA
1192022-05-23 David Malcolm <dmalcolm@redhat.com>
120
121 * jit-recording.h: Add "final" and "override" to all vfunc
122 implementations that were missing them, as appropriate.
123
57f2ce6a
GA
1242022-05-20 David Malcolm <dmalcolm@redhat.com>
125
126 * jit-playback.h: Replace uses of "FINAL" and "OVERRIDE" with
127 "final" and "override".
128 * jit-recording.cc: Likewise.
129 * jit-recording.h: Likewise.
130
702bd11f
GA
1312022-05-16 Martin Liska <mliska@suse.cz>
132
133 * jit-builtins.cc (find_builtin_by_name): Use ARRAY_SIZE.
134 (get_string_for_type_id): Likewise.
135 * jit-recording.cc (recording::context::context): Likewise.
136
031bd52e
GA
1372022-04-14 Iain Sandoe <iain@sandoe.co.uk>
138
139 * jit-playback.cc (new_bitcast): Cast values returned by tree_to_uhwi
140 to 'long' to match the print format.
141
504dae1d
GA
1422022-04-12 Antoni Boucher <bouanto@zoho.com>
143
144 PR jit/104293
145 * docs/_build/texinfo/libgccjit.texi: Regenerate.
146 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_24): New ABI tag.
147 * docs/topics/expressions.rst: Add documentation for the
148 functions gcc_jit_lvalue_set_alignment and
149 gcc_jit_lvalue_get_alignment.
150 * jit-playback.h: New function (set_alignment).
151 * jit-recording.cc: New function (set_alignment).
152 * jit-recording.h: New functions (set_alignment, get_alignment)
153 and new field (m_alignment).
154 * libgccjit.cc: New functions (gcc_jit_lvalue_get_alignment,
155 gcc_jit_lvalue_set_alignment)
156 * libgccjit.h: New functions (gcc_jit_lvalue_get_alignment,
157 gcc_jit_lvalue_set_alignment)
158 * libgccjit.map (LIBGCCJIT_ABI_24): New ABI tag.
159
1602022-04-12 Antoni Boucher <bouanto@zoho.com>
161
162 PR jit/104073
163 * docs/_build/texinfo/libgccjit.texi: Regenerate.
164 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_23): New ABI tag.
165 * docs/topics/contexts.rst: Add documentation for the new
166 function gcc_jit_context_set_bool_print_errors_to_stderr.
167 * jit-common.h: New enum value
168 (INNER_BOOL_OPTION_PRINT_ERRORS_TO_STDERR).
169 * jit-recording.cc: Handle the new option
170 INNER_BOOL_OPTION_PRINT_ERRORS_TO_STDERR.
171 * libgccjit.cc: New function
172 (gcc_jit_context_set_bool_print_errors_to_stderr).
173 * libgccjit.h: New function
174 (gcc_jit_context_set_bool_print_errors_to_stderr).
175 * libgccjit.map (LIBGCCJIT_ABI_23): New ABI tag.
176
1772022-04-12 Antoni Boucher <bouanto@zoho.com>
178
179 PR jit/104072
180 * docs/_build/texinfo/libgccjit.texi: Regenerate.
181 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_22): New ABI tag.
182 * docs/topics/expressions.rst: Add documentation for the
183 function gcc_jit_lvalue_set_register_name.
184 * jit-playback.h: New function (set_register_name).
185 * jit-recording.cc: New function (set_register_name) and add
186 support for register variables.
187 * jit-recording.h: New field (m_reg_name) and new function
188 (set_register_name).
189 * libgccjit.cc: New function (gcc_jit_lvalue_set_register_name).
190 * libgccjit.h: New function (gcc_jit_lvalue_set_register_name).
191 * libgccjit.map (LIBGCCJIT_ABI_22): New ABI tag.
192
1932022-04-12 Antoni Boucher <bouanto@zoho.com>
194
195 PR jit/104071
196 * docs/_build/texinfo/libgccjit.texi: Regenerate.
197 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_21): New ABI tag.
198 * docs/topics/expressions.rst: Add documentation for the
199 function gcc_jit_context_new_bitcast.
200 * jit-playback.cc: New function (new_bitcast).
201 * jit-playback.h: New function (new_bitcast).
202 * jit-recording.cc: New functions (new_bitcast,
203 bitcast::replay_into, bitcast::visit_children,
204 bitcast::make_debug_string, bitcast::write_reproducer).
205 * jit-recording.h: New class (bitcast) and new function
206 (new_bitcast, bitcast::replay_into, bitcast::visit_children,
207 bitcast::make_debug_string, bitcast::write_reproducer,
208 bitcast::get_precedence).
209 * libgccjit.cc: New function (gcc_jit_context_new_bitcast)
210 * libgccjit.h: New function (gcc_jit_context_new_bitcast)
211 * libgccjit.map (LIBGCCJIT_ABI_21): New ABI tag.
212
2132022-04-12 Antoni Boucher <bouanto@zoho.com>
214
215 PR target/95325
216 * docs/_build/texinfo/libgccjit.texi: Regenerate
217 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_20): New ABI tag.
218 * docs/topics/types.rst: Add documentation for the new types
219 GCC_JIT_TYPE_UINT8_T, GCC_JIT_TYPE_UINT16_T,
220 GCC_JIT_TYPE_UINT32_T, GCC_JIT_TYPE_UINT64_T,
221 GCC_JIT_TYPE_UINT128_T, GCC_JIT_TYPE_INT8_T, GCC_JIT_TYPE_INT16_T,
222 GCC_JIT_TYPE_INT32_T, GCC_JIT_TYPE_INT64_T, GCC_JIT_TYPE_INT128_T and
223 new functions (gcc_jit_compatible_types, gcc_jit_type_get_size).
224 * jit-builtins.cc: Add support for BT_UINT128.
225 * jit-common.h: Update the value of NUM_GCC_JIT_TYPES.
226 * jit-playback.cc: Add support for the sized integer types.
227 * jit-recording.cc: Add support for the sized integer types.
228 * jit-recording.h: Add support for comparing integer types
229 and new function (is_signed).
230 * libgccjit.cc (gcc_jit_compatible_types): New.
231 (gcc_jit_type_get_size) New.
232 * libgccjit.h: New enum variants for gcc_jit_types
233 (GCC_JIT_TYPE_UINT8_T, GCC_JIT_TYPE_UINT16_T,
234 GCC_JIT_TYPE_UINT32_T, GCC_JIT_TYPE_UINT64_T,
235 GCC_JIT_TYPE_UINT128_T, GCC_JIT_TYPE_INT8_T,
236 GCC_JIT_TYPE_INT16_T, GCC_JIT_TYPE_INT32_T,
237 GCC_JIT_TYPE_INT64_T, GCC_JIT_TYPE_INT128_T) and new functions
238 (gcc_jit_compatible_types, gcc_jit_type_get_size).
239 * libgccjit.map (LIBGCCJIT_ABI_20): New ABI tag.
240
80eb8ec6
GA
2412022-04-06 David Malcolm <dmalcolm@redhat.com>
242
243 PR jit/102824
244 * docs/_build/texinfo/factorial.png: Move to...
245 * docs/_build/texinfo/libgccjit-figures/factorial.png: ...here.
246 * docs/_build/texinfo/factorial1.png: Move to...
247 * docs/_build/texinfo/libgccjit-figures/factorial1.png: ...here.
248 * docs/_build/texinfo/sum-of-squares.png: Move to...
249 * docs/_build/texinfo/libgccjit-figures/sum-of-squares.png: ...here.
250 * docs/_build/texinfo/sum-of-squares1.png: Move to...
251 * docs/_build/texinfo/libgccjit-figures/sum-of-squares1.png: ...here.
252
8af4270d
GA
2532022-04-01 David Malcolm <dmalcolm@redhat.com>
254
255 * docs/topics/expressions.rst: Fix formatting.
256 * docs/topics/types.rst: Likewise.
257 * docs/_build/texinfo/libgccjit.texi: Regenerate
258
2592022-04-01 Petter Tomner <tomner@kth.se>
260
261 * docs/topics/compatibility.rst: Add 19 tag
262 * docs/topics/compilation.rst: Linking
263 * docs/topics/contexts.rst: Linking example
264 * docs/topics/expressions.rst: Fix formatting and dropped 's'
265
e6533e2e
GA
2662022-03-07 Jakub Jelinek <jakub@redhat.com>
267
268 * libgccjit.h: Fix up duplicated word issue in a comment.
269
fc829782
GA
2702022-01-17 Martin Liska <mliska@suse.cz>
271
272 * config-lang.in: Rename .c names to .cc.
273 * docs/_build/texinfo/libgccjit.texi: Likewise.
274 * docs/internals/index.rst: Likewise.
275 * jit-builtins.cc (builtins_manager::make_builtin_function): Likewise.
276 * jit-playback.cc (fold_const_var): Likewise.
277 (playback::context::~context): Likewise.
278 (new_field): Likewise.
279 (new_bitfield): Likewise.
280 (new_compound_type): Likewise.
281 (playback::compound_type::set_fields): Likewise.
282 (global_set_init_rvalue): Likewise.
283 (load_blob_in_ctor): Likewise.
284 (new_global_initialized): Likewise.
285 (double>): Likewise.
286 (new_string_literal): Likewise.
287 (as_truth_value): Likewise.
288 (build_call): Likewise.
289 (playback::context::build_cast): Likewise.
290 (new_array_access): Likewise.
291 (new_field_access): Likewise.
292 (dereference): Likewise.
293 (postprocess): Likewise.
294 (add_jump): Likewise.
295 (add_switch): Likewise.
296 (build_goto_operands): Likewise.
297 (playback::context::read_dump_file): Likewise.
298 (init_types): Likewise.
299 * jit-recording.cc (recording::context::get_int_type): Likewise.
300 * jit-recording.h: Likewise.
301 * libgccjit.cc (compatible_types): Likewise.
302 (gcc_jit_context_acquire): Likewise.
303 (gcc_jit_context_release): Likewise.
304 (gcc_jit_context_new_child_context): Likewise.
305 (gcc_jit_type_as_object): Likewise.
306 (gcc_jit_context_get_type): Likewise.
307 (gcc_jit_context_get_int_type): Likewise.
308 (gcc_jit_type_get_pointer): Likewise.
309 (gcc_jit_type_get_const): Likewise.
310 (gcc_jit_type_get_volatile): Likewise.
311 (gcc_jit_type_dyncast_array): Likewise.
312 (gcc_jit_type_is_bool): Likewise.
313 (gcc_jit_type_is_pointer): Likewise.
314 (gcc_jit_type_is_integral): Likewise.
315 (gcc_jit_type_dyncast_vector): Likewise.
316 (gcc_jit_type_is_struct): Likewise.
317 (gcc_jit_vector_type_get_num_units): Likewise.
318 (gcc_jit_vector_type_get_element_type): Likewise.
319 (gcc_jit_type_unqualified): Likewise.
320 (gcc_jit_type_dyncast_function_ptr_type): Likewise.
321 (gcc_jit_function_type_get_return_type): Likewise.
322 (gcc_jit_function_type_get_param_count): Likewise.
323 (gcc_jit_function_type_get_param_type): Likewise.
324 (gcc_jit_context_new_array_type): Likewise.
325 (gcc_jit_context_new_field): Likewise.
326 (gcc_jit_field_as_object): Likewise.
327 (gcc_jit_context_new_struct_type): Likewise.
328 (gcc_jit_struct_as_type): Likewise.
329 (gcc_jit_struct_set_fields): Likewise.
330 (gcc_jit_struct_get_field_count): Likewise.
331 (gcc_jit_context_new_union_type): Likewise.
332 (gcc_jit_context_new_function_ptr_type): Likewise.
333 (gcc_jit_param_as_rvalue): Likewise.
334 (gcc_jit_context_new_function): Likewise.
335 (gcc_jit_function_get_return_type): Likewise.
336 (gcc_jit_function_dump_to_dot): Likewise.
337 (gcc_jit_block_get_function): Likewise.
338 (gcc_jit_global_set_initializer_rvalue): Likewise.
339 (gcc_jit_rvalue_get_type): Likewise.
340 (gcc_jit_context_new_rvalue_from_int): Likewise.
341 (gcc_jit_context_one): Likewise.
342 (gcc_jit_context_new_rvalue_from_double): Likewise.
343 (gcc_jit_context_null): Likewise.
344 (gcc_jit_context_new_string_literal): Likewise.
345 (valid_binary_op_p): Likewise.
346 (gcc_jit_context_new_binary_op): Likewise.
347 (gcc_jit_context_new_comparison): Likewise.
348 (gcc_jit_context_new_call): Likewise.
349 (is_valid_cast): Likewise.
350 (gcc_jit_context_new_cast): Likewise.
351 (gcc_jit_object_get_context): Likewise.
352 (gcc_jit_object_get_debug_string): Likewise.
353 (gcc_jit_lvalue_access_field): Likewise.
354 (gcc_jit_rvalue_access_field): Likewise.
355 (gcc_jit_rvalue_dereference_field): Likewise.
356 (gcc_jit_rvalue_dereference): Likewise.
357 (gcc_jit_lvalue_get_address): Likewise.
358 (gcc_jit_lvalue_set_tls_model): Likewise.
359 (gcc_jit_lvalue_set_link_section): Likewise.
360 (gcc_jit_function_new_local): Likewise.
361 (gcc_jit_block_add_eval): Likewise.
362 (gcc_jit_block_add_assignment): Likewise.
363 (is_bool): Likewise.
364 (gcc_jit_block_end_with_conditional): Likewise.
365 (gcc_jit_block_add_comment): Likewise.
366 (gcc_jit_block_end_with_jump): Likewise.
367 (gcc_jit_block_end_with_return): Likewise.
368 (gcc_jit_block_end_with_void_return): Likewise.
369 (case_range_validator::case_range_validator): Likewise.
370 (case_range_validator::validate): Likewise.
371 (case_range_validator::get_wide_int): Likewise.
372 (gcc_jit_block_end_with_switch): Likewise.
373 (gcc_jit_context_set_str_option): Likewise.
374 (gcc_jit_context_set_int_option): Likewise.
375 (gcc_jit_context_set_bool_option): Likewise.
376 (gcc_jit_context_set_bool_allow_unreachable_blocks): Likewise.
377 (gcc_jit_context_set_bool_use_external_driver): Likewise.
378 (gcc_jit_context_add_command_line_option): Likewise.
379 (gcc_jit_context_add_driver_option): Likewise.
380 (gcc_jit_context_enable_dump): Likewise.
381 (gcc_jit_context_compile): Likewise.
382 (gcc_jit_context_compile_to_file): Likewise.
383 (gcc_jit_context_set_logfile): Likewise.
384 (gcc_jit_context_dump_reproducer_to_file): Likewise.
385 (gcc_jit_context_get_first_error): Likewise.
386 (gcc_jit_context_get_last_error): Likewise.
387 (gcc_jit_result_get_code): Likewise.
388 (gcc_jit_result_get_global): Likewise.
389 (gcc_jit_rvalue_set_bool_require_tail_call): Likewise.
390 (gcc_jit_type_get_aligned): Likewise.
391 (gcc_jit_type_get_vector): Likewise.
392 (gcc_jit_function_get_address): Likewise.
393 (gcc_jit_version_patchlevel): Likewise.
394 (gcc_jit_block_add_extended_asm): Likewise.
395 (gcc_jit_extended_asm_as_object): Likewise.
396 (gcc_jit_extended_asm_set_volatile_flag): Likewise.
397 (gcc_jit_extended_asm_set_inline_flag): Likewise.
398 (gcc_jit_extended_asm_add_output_operand): Likewise.
399 (gcc_jit_extended_asm_add_input_operand): Likewise.
400 (gcc_jit_extended_asm_add_clobber): Likewise.
401 * notes.txt: Likewise.
402
4032022-01-17 Martin Liska <mliska@suse.cz>
404
405 * dummy-frontend.c: Moved to...
406 * dummy-frontend.cc: ...here.
407 * jit-builtins.c: Moved to...
408 * jit-builtins.cc: ...here.
409 * jit-logging.c: Moved to...
410 * jit-logging.cc: ...here.
411 * jit-playback.c: Moved to...
412 * jit-playback.cc: ...here.
413 * jit-recording.c: Moved to...
414 * jit-recording.cc: ...here.
415 * jit-result.c: Moved to...
416 * jit-result.cc: ...here.
417 * jit-spec.c: Moved to...
418 * jit-spec.cc: ...here.
419 * jit-tempdir.c: Moved to...
420 * jit-tempdir.cc: ...here.
421 * jit-w32.c: Moved to...
422 * jit-w32.cc: ...here.
423 * libgccjit.c: Moved to...
424 * libgccjit.cc: ...here.
425
054e57e4
GA
4262021-12-28 Martin Liska <mliska@suse.cz>
427
428 * docs/_build/texinfo/libgccjit.texi: Replace http:// with https.
429 * docs/cp/index.rst: Likewise.
430 * docs/cp/intro/index.rst: Likewise.
431 * docs/cp/intro/tutorial01.rst: Likewise.
432 * docs/cp/intro/tutorial02.rst: Likewise.
433 * docs/cp/intro/tutorial03.rst: Likewise.
434 * docs/cp/intro/tutorial04.rst: Likewise.
435 * docs/cp/topics/asm.rst: Likewise.
436 * docs/cp/topics/compilation.rst: Likewise.
437 * docs/cp/topics/contexts.rst: Likewise.
438 * docs/cp/topics/expressions.rst: Likewise.
439 * docs/cp/topics/functions.rst: Likewise.
440 * docs/cp/topics/index.rst: Likewise.
441 * docs/cp/topics/locations.rst: Likewise.
442 * docs/cp/topics/objects.rst: Likewise.
443 * docs/cp/topics/types.rst: Likewise.
444 * docs/index.rst: Likewise.
445 * docs/internals/index.rst: Likewise.
446 * docs/intro/index.rst: Likewise.
447 * docs/intro/tutorial01.rst: Likewise.
448 * docs/intro/tutorial02.rst: Likewise.
449 * docs/intro/tutorial03.rst: Likewise.
450 * docs/intro/tutorial04.rst: Likewise.
451 * docs/intro/tutorial05.rst: Likewise.
452 * docs/topics/asm.rst: Likewise.
453 * docs/topics/compatibility.rst: Likewise.
454 * docs/topics/compilation.rst: Likewise.
455 * docs/topics/contexts.rst: Likewise.
456 * docs/topics/expressions.rst: Likewise.
457 * docs/topics/function-pointers.rst: Likewise.
458 * docs/topics/functions.rst: Likewise.
459 * docs/topics/index.rst: Likewise.
460 * docs/topics/locations.rst: Likewise.
461 * docs/topics/objects.rst: Likewise.
462 * docs/topics/performance.rst: Likewise.
463 * docs/topics/types.rst: Likewise.
464
7631a4d1
GA
4652021-12-20 Martin Liska <mliska@suse.cz>
466
467 * libgccjit.c (struct version_info): Rename to jit_version_info.
468 (struct jit_version_info): Likewise.
469 (gcc_jit_version_major): Likewise.
470 (gcc_jit_version_minor): Likewise.
471 (gcc_jit_version_patchlevel): Likewise.
472
9c6586bc
GA
4732021-12-14 Petter Tomner <tomner@kth.se>
474
475 * jit-common.h: New enum
476 * jit-playback.c : Folding an setting intitial
477 (global_new_decl) : Handle const global generation
478 (new_global) : New flag
479 (global_set_init_rvalue) : New
480 (new_ctor) : New
481 (new_global_initialized) : Flag
482 (as_truth_value) : Fold
483 (new_unary_op) : Fold
484 (new_binary_op) : Fold
485 (new_comparison) : Fold
486 (new_array_access) : Fold
487 (new_dereference) : Fold
488 (get_address) : Fold
489 * jit-playback.h :
490 (global_set_init_rvalue) : New
491 (new_ctor) : New
492 * jit-recording.c :
493 * jit-recording.h :
494 (new_global_init_rvalue) : New
495 (new_ctor) : New
496 (ctor) : New, inherits rvalue
497 (global_init_rvalue) : New, inherits memento
498 (type::is_union) : New
499 * libgccjit++.h : New entrypoints, see C-header
500 * libgccjit.c : See .h
501 * libgccjit.h : New entrypoints
502 (gcc_jit_context_new_array_constructor) : New
503 (gcc_jit_context_new_struct_constructor) : New
504 (gcc_jit_context_new_union_constructor) : New
505 (gcc_jit_global_set_initializer_rvalue) : New
506 (LIBGCCJIT_HAVE_CTORS) : New feuture macro
507 * libgccjit.map : New entrypoints added to ABI 19
508 * docs/topics/expressions.rst : Updated docs
509
c8dcf64b
GA
5102021-12-12 Antoni Boucher <bouanto@zoho.com>
511
512 PR target/100688
513 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_18): New ABI
514 tag.
515 * docs/topics/expressions.rst: Add documentation for the
516 function gcc_jit_lvalue_set_link_section.
517 * jit-playback.h: New function (set_link_section).
518 * jit-recording.c: New function (set_link_section) and
519 support for setting the link section.
520 * jit-recording.h: New function (set_link_section) and new
521 field m_link_section.
522 * libgccjit.c: New function (gcc_jit_lvalue_set_link_section).
523 * libgccjit.h: New function (gcc_jit_lvalue_set_link_section).
524 * libgccjit.map (LIBGCCJIT_ABI_18): New ABI tag.
525
e8decbe7
GA
5262021-12-12 Antoni Boucher <bouanto@zoho.com>
527
528 PR target/95415
529 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_17): New ABI
530 tag.
531 * docs/topics/expressions.rst: Add document for the function
532 gcc_jit_lvalue_set_tls_model.
533 * jit-playback.h: New function (set_tls_model).
534 * jit-recording.c: New function (set_tls_model), new
535 variables (tls_models and tls_model_enum_strings) and support
536 for setting the tls model.
537 * jit-recording.h: New function (set_tls_model) and new
538 field m_tls_model.
539 * libgccjit.c: New function (gcc_jit_lvalue_set_tls_model).
540 * libgccjit.h: New function (gcc_jit_lvalue_set_tls_model)
541 and new enum (gcc_jit_tls_model).
542 * libgccjit.map (LIBGCCJIT_ABI_17): New ABI tag.
543
5442021-12-11 Antoni Boucher <bouanto@zoho.com>
545
546 PR target/96066
547 PR target/96067
548 * jit-builtins.c: Implement missing types for builtins.
549 * jit-recording.c:: Allow sending a volatile const void * as
550 argument.
551 * jit-recording.h: New functions (is_volatile, is_const) and
552 allow comparing qualified types.
553
0bceef16
GA
5542021-12-10 David Malcolm <dmalcolm@redhat.com>
555
556 PR jit/103562
557 * jit-playback.c (gcc::jit::playback::context::new_function): Set
558 DECL_CONTEXT of the result_decl.
559
d62c8c74
GA
5602021-11-27 Petter Tomner <tomner@kth.se>
561
562 * libgccjit.c: %ld -> %zu
563
d9ca4b45
GA
5642021-11-24 Martin Liska <mliska@suse.cz>
565
566 * jit-playback.c (function): Initialize m_blocks vector.
567
f658f1d7
GA
5682021-11-20 Antoni Boucher <bouanto@zoho.com>
569
570 PR target/96889
571 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_16): New ABI tag.
572 * docs/topics/functions.rst: Add documentation for the
573 functions gcc_jit_function_get_return_type and
574 gcc_jit_function_get_param_count
575 * docs/topics/types.rst: Add documentation for the functions
576 gcc_jit_function_type_get_return_type,
577 gcc_jit_function_type_get_param_count,
578 gcc_jit_function_type_get_param_type,
579 gcc_jit_type_unqualified, gcc_jit_type_dyncast_array,
580 gcc_jit_type_is_bool,
581 gcc_jit_type_dyncast_function_ptr_type,
582 gcc_jit_type_is_integral, gcc_jit_type_is_pointer,
583 gcc_jit_type_dyncast_vector,
584 gcc_jit_vector_type_get_element_type,
585 gcc_jit_vector_type_get_num_units,
586 gcc_jit_struct_get_field, gcc_jit_type_is_struct,
587 and gcc_jit_struct_get_field_count
588 * libgccjit.c:
589 (gcc_jit_function_get_return_type, gcc_jit_function_get_param_count,
590 gcc_jit_function_type_get_return_type,
591 gcc_jit_function_type_get_param_count,
592 gcc_jit_function_type_get_param_type, gcc_jit_type_unqualified,
593 gcc_jit_type_dyncast_array, gcc_jit_type_is_bool,
594 gcc_jit_type_dyncast_function_ptr_type, gcc_jit_type_is_integral,
595 gcc_jit_type_is_pointer, gcc_jit_type_dyncast_vector,
596 gcc_jit_vector_type_get_element_type,
597 gcc_jit_vector_type_get_num_units, gcc_jit_struct_get_field,
598 gcc_jit_type_is_struct, gcc_jit_struct_get_field_count): New
599 functions.
600 (struct gcc_jit_function_type, struct gcc_jit_vector_type):
601 New types.
602 * libgccjit.h:
603 (gcc_jit_function_get_return_type, gcc_jit_function_get_param_count,
604 gcc_jit_function_type_get_return_type,
605 gcc_jit_function_type_get_param_count,
606 gcc_jit_function_type_get_param_type, gcc_jit_type_unqualified,
607 gcc_jit_type_dyncast_array, gcc_jit_type_is_bool,
608 gcc_jit_type_dyncast_function_ptr_type, gcc_jit_type_is_integral,
609 gcc_jit_type_is_pointer, gcc_jit_type_dyncast_vector,
610 gcc_jit_vector_type_get_element_type,
611 gcc_jit_vector_type_get_num_units, gcc_jit_struct_get_field,
612 gcc_jit_type_is_struct, gcc_jit_struct_get_field_count): New
613 function declarations.
614 (struct gcc_jit_function_type, struct gcc_jit_vector_type):
615 New types.
616 * jit-recording.h: New functions (is_struct and is_vector)
617 * libgccjit.map (LIBGCCJIT_ABI_16): New ABI tag.
618
af2852b9
GA
6192021-11-12 David Malcolm <dmalcolm@redhat.com>
620
621 PR jit/103199
622 * docs/examples/tut04-toyvm/toyvm.c (toyvm_function_compile):
623 Increase size of buffer.
624 * docs/examples/tut04-toyvm/toyvm.cc
625 (compilation_state::create_function): Likewise.
626
a26206ec
GA
6272021-09-10 Petter Tomner <tomner@kth.se>
628
629 * jit-playback.c: Moved global var processing to after loc handling.
630 Setting TYPE_NAME for fundamental types.
631 Using common functions for finalizing globals.
632 * jit-playback.h: New method init_types().
633 Changed get_tree_node_for_type() to method.
634
b57fba5e
GA
6352021-08-19 Iain Sandoe <iain@sandoe.co.uk>
636
637 * docs/examples/tut04-toyvm/toyvm.c: Include jit-dejagnu.h.
638 * docs/examples/tut04-toyvm/toyvm.cc: Likewise.
639 * jit-dejagnu.h: New file, imported from dejagnu-1.6.2 and
640 patched for this application.
641
6e529985
GA
6422021-08-18 Iain Sandoe <iain@sandoe.co.uk>
643
644 PR jit/100613
645 * Make-lang.in: Provide clauses for Darwin hosts.
646
bdea84c4
GA
6472021-07-18 Antoni Boucher <bouanto@zoho.com>
648
649 PR target/95498
650 * jit-playback.c (convert): Add support to handle truncation and
651 extension in the convert function.
652
65f32e5d
GA
6532021-05-19 Martin Liska <mliska@suse.cz>
654
655 PR testsuite/100658
656 * libgccjit.c (gcc_jit_context_new_function): Fix typos.
657
8bf52ffa
GA
6582021-03-24 Matthias Klose <doko@ubuntu.com>
659
660 * Make-lang.in (jit.sphinx.html, jit.sphinx.pdf): Use $(mkinstalldirs),
661 (jit.install-headers): Depend on installdirs.
662
50352c6c
GA
6632021-02-19 David Malcolm <dmalcolm@redhat.com>
664
665 PR jit/99126
666 * jit-builtins.c
667 (gcc::jit::builtins_manager::get_builtin_function_by_id):
668 Update assertion to reject BUILT_IN_NONE.
669 (gcc::jit::builtins_manager::ensure_optimization_builtins_exist):
670 New.
671 * jit-builtins.h
672 (gcc::jit::builtins_manager::ensure_optimization_builtins_exist):
673 New decl.
674 * jit-playback.c (gcc::jit::playback::context::replay): Call it.
675 Remove redundant conditional on bm.
676
5fff80fd
GA
6772021-01-14 David Malcolm <dmalcolm@redhat.com>
678
679 * docs/cp/index.rst: Remove "Alpha" warning.
680 * docs/index.rst: Likewise.
681 * docs/_build/texinfo/libgccjit.texi: Regenerate
682
360258da
GA
6832020-11-25 Martin Sebor <msebor@redhat.com>
684
685 PR bootstrap/94982
686 * jit-recording.c (recording::function::dump_to_dot): Avoid
687 -Wformat-diag.
688 (recording::block::dump_to_dot): Same.
689
82e5048e
GA
6902020-11-20 Jakub Jelinek <jakub@redhat.com>
691
692 PR other/97911
693 * Make-lang.in (jit.serial): Change from goal to a
694 variable.
695 (.PHONY): Drop jit.serial and jit.prev.
696 ($(LIBGCCJIT_FILENAME)): Depend on $(jit.serial) rather than
697 jit.serial.
698
25bb75f8
GA
6992020-11-18 Jakub Jelinek <jakub@redhat.com>
700
701 * Make-lang.in (jit.serial): New goal.
702 (.PHONY): Add jit.serial jit.prev.
703 ($(LIBGCCJIT_FILENAME)): Depend on jit.prev. Call LINK_PROGRESS.
704
a5a11525
GA
7052020-11-12 David Malcolm <dmalcolm@redhat.com>
706
707 PR jit/87291
708 * docs/cp/topics/asm.rst: New file.
709 * docs/cp/topics/index.rst (Topic Reference): Add it.
710 * docs/topics/asm.rst: New file.
711 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_15): New.
712 * docs/topics/functions.rst (Statements): Add link to extended
713 asm.
714 * docs/topics/index.rst (Topic Reference): Add asm.rst.
715 * docs/topics/objects.rst: Add gcc_jit_extended_asm to ASCII art.
716 * docs/_build/texinfo/Makefile: Regenerate.
717 * docs/_build/texinfo/libgccjit.texi: Regenerate.
718 * jit-common.h (gcc::jit::recording::extended_asm): New forward
719 decl.
720 (gcc::jit::recording::top_level_asm): Likewise.
721 * jit-playback.c: Include "stmt.h".
722 (build_string): New.
723 (gcc::jit::playback::context::new_string_literal): Disambiguate
724 build_string call.
725 (gcc::jit::playback::context::add_top_level_asm): New.
726 (build_operand_chain): New.
727 (build_clobbers): New.
728 (build_goto_operands): New.
729 (gcc::jit::playback::block::add_extended_asm): New.
730 * jit-playback.h (gcc::jit::playback::context::add_top_level_asm):
731 New decl.
732 (struct gcc::jit::playback::asm_operand): New struct.
733 (gcc::jit::playback::block::add_extended_asm): New decl.
734 * jit-recording.c (gcc::jit::recording::context::dump_to_file):
735 Dump top-level asms.
736 (gcc::jit::recording::context::add_top_level_asm): New.
737 (gcc::jit::recording::block::add_extended_asm): New.
738 (gcc::jit::recording::block::end_with_extended_asm_goto): New.
739 (gcc::jit::recording::asm_operand::asm_operand): New.
740 (gcc::jit::recording::asm_operand::print): New.
741 (gcc::jit::recording::asm_operand::make_debug_string): New.
742 (gcc::jit::recording::output_asm_operand::write_reproducer): New.
743 (gcc::jit::recording::output_asm_operand::print): New.
744 (gcc::jit::recording::input_asm_operand::write_reproducer): New.
745 (gcc::jit::recording::input_asm_operand::print): New.
746 (gcc::jit::recording::extended_asm::add_output_operand): New.
747 (gcc::jit::recording::extended_asm::add_input_operand): New.
748 (gcc::jit::recording::extended_asm::add_clobber): New.
749 (gcc::jit::recording::extended_asm::replay_into): New.
750 (gcc::jit::recording::extended_asm::make_debug_string): New.
751 (gcc::jit::recording::extended_asm::write_flags): New.
752 (gcc::jit::recording::extended_asm::write_clobbers): New.
753 (gcc::jit::recording::extended_asm_simple::write_reproducer): New.
754 (gcc::jit::recording::extended_asm::maybe_populate_playback_blocks):
755 New.
756 (gcc::jit::recording::extended_asm_goto::extended_asm_goto): New.
757 (gcc::jit::recording::extended_asm_goto::replay_into): New.
758 (gcc::jit::recording::extended_asm_goto::write_reproducer): New.
759 (gcc::jit::recording::extended_asm_goto::get_successor_blocks):
760 New.
761 (gcc::jit::recording::extended_asm_goto::maybe_print_gotos): New.
762 (gcc::jit::recording::extended_asm_goto::maybe_populate_playback_blocks):
763 New.
764 (gcc::jit::recording::top_level_asm::top_level_asm): New.
765 (gcc::jit::recording::top_level_asm::replay_into): New.
766 (gcc::jit::recording::top_level_asm::make_debug_string): New.
767 (gcc::jit::recording::top_level_asm::write_to_dump): New.
768 (gcc::jit::recording::top_level_asm::write_reproducer): New.
769 * jit-recording.h
770 (gcc::jit::recording::context::add_top_level_asm): New decl.
771 (gcc::jit::recording::context::m_top_level_asms): New field.
772 (gcc::jit::recording::block::add_extended_asm): New decl.
773 (gcc::jit::recording::block::end_with_extended_asm_goto): New
774 decl.
775 (gcc::jit::recording::asm_operand): New class.
776 (gcc::jit::recording::output_asm_operand): New class.
777 (gcc::jit::recording::input_asm_operand): New class.
778 (gcc::jit::recording::extended_asm): New class.
779 (gcc::jit::recording::extended_asm_simple): New class.
780 (gcc::jit::recording::extended_asm_goto): New class.
781 (gcc::jit::recording::top_level_asm): New class.
782 * libgccjit++.h (gccjit::extended_asm): New forward decl.
783 (gccjit::context::add_top_level_asm): New.
784 (gccjit::block::add_extended_asm): New.
785 (gccjit::block::end_with_extended_asm_goto): New.
786 (gccjit::extended_asm): New class.
787 (gccjit::extended_asm::extended_asm): New ctors.
788 (gccjit::extended_asm::set_volatile_flag): New.
789 (gccjit::extended_asm::set_inline_flag): New.
790 (gccjit::extended_asm::add_output_operand): New.
791 (gccjit::extended_asm::add_input_operand): New.
792 (gccjit::extended_asm::add_clobber): New.
793 (gccjit::extended_asm::get_inner_extended_asm): New.
794 * libgccjit.c (struct gcc_jit_extended_asm): New.
795 (jit_error): Make "loc" param take a gcc::jit::recording::location *
796 rather than a gcc_jit_location *.
797 (gcc_jit_block_add_extended_asm): New entrypoint.
798 (gcc_jit_block_end_with_extended_asm_goto): New entrypoint.
799 (gcc_jit_extended_asm_as_object): New entrypoint.
800 (gcc_jit_extended_asm_set_volatile_flag): New entrypoint.
801 (gcc_jit_extended_asm_set_inline_flag): New entrypoint.
802 (gcc_jit_extended_asm_add_output_operand): New entrypoint.
803 (gcc_jit_extended_asm_add_clobber): New entrypoint.
804 (gcc_jit_context_add_top_level_asm): New entrypoint.
805 * libgccjit.h: Add gcc_jit_extended_asm to ASCII art.
806 (gcc_jit_extended_asm): New typedef.
807 (LIBGCCJIT_HAVE_ASM_STATEMENTS): New define.
808 (gcc_jit_block_add_extended_asm): New entrypoint.
809 (gcc_jit_block_end_with_extended_asm_goto): New entrypoint.
810 (gcc_jit_extended_asm_as_object): New entrypoint.
811 (gcc_jit_extended_asm_set_volatile_flag): New entrypoint.
812 (gcc_jit_extended_asm_set_inline_flag): New entrypoint.
813 (gcc_jit_extended_asm_add_output_operand): New entrypoint.
814 (gcc_jit_extended_asm_add_input_operand): New entrypoint.
815 (gcc_jit_extended_asm_add_clobber): New entrypoint.
816 (gcc_jit_context_add_top_level_asm): New entrypoint.
817 * libgccjit.map (LIBGCCJIT_ABI_15): New.
818
8192020-11-12 David Malcolm <dmalcolm@redhat.com>
820
821 * jit-recording.c (recording::context::new_string): Add "escaped"
822 param and use it when creating the new recording::string instance.
823 (recording::string::string): Add "escaped" param and use it to
824 initialize m_escaped.
825 (recording::string::make_debug_string): Replace check that first
826 char is double-quote with use of m_escaped. Fix escaping of
827 '\t' and '\n'. Set "escaped" on the result.
828 * jit-recording.h (recording::context::new_string): Add "escaped"
829 param.
830 (recording::string::string): Add "escaped" param.
831 (recording::string::m_escaped): New field.
832
8332020-11-12 David Malcolm <dmalcolm@redhat.com>
834
835 * libgccjit.h: Fix typo in comment.
836
50a71cd0
GA
8372020-09-14 Andrea Corallo <andrea.corallo@arm.com>
838
839 * docs/_build/texinfo/libgccjit.texi: Regenerate.
840
ac35c090
GA
8412020-09-11 Andrea Corallo <andrea.corallo@arm.com>
842
843 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_14): New ABI tag.
844 * docs/topics/expressions.rst (gcc_jit_global_set_initializer):
845 Document new entry point in section 'Global variables'.
846 * jit-playback.c (global_new_decl, global_finalize_lvalue): New
847 method.
848 (playback::context::new_global): Make use of global_new_decl,
849 global_finalize_lvalue.
850 (load_blob_in_ctor): New template function in use by the
851 following.
852 (playback::context::new_global_initialized): New method.
853 * jit-playback.h (class context): Decl 'new_global_initialized',
854 'global_new_decl', 'global_finalize_lvalue'.
855 (lvalue::set_initializer): Add implementation.
856 * jit-recording.c (recording::memento_of_get_pointer::get_size)
857 (recording::memento_of_get_type::get_size): Add implementation.
858 (recording::global::write_initializer_reproducer): New function in
859 use by 'recording::global::write_reproducer'.
860 (recording::global::replay_into)
861 (recording::global::write_to_dump)
862 (recording::global::write_reproducer): Handle
863 initialized case.
864 * jit-recording.h (class type): Decl 'get_size' and
865 'num_elements'.
866 * libgccjit++.h (class lvalue): Declare new 'set_initializer'
867 method.
868 (class lvalue): Decl 'is_global' and 'set_initializer'.
869 (class global) Decl 'write_initializer_reproducer'. Add
870 'm_initializer', 'm_initializer_num_bytes' fields. Implement
871 'set_initializer'. Add a destructor to free 'm_initializer'.
872 * libgccjit.c (gcc_jit_global_set_initializer): New function.
873 * libgccjit.h (gcc_jit_global_set_initializer): New function
874 declaration.
875 * libgccjit.map (LIBGCCJIT_ABI_14): New ABI tag.
876
8f7ea26a
GA
8772020-08-28 Martin Sebor <msebor@redhat.com>
878
879 * jit-recording.c (recording::switch_::make_debug_string): Add argument
880 to a call.
881
e769f970
GA
8822020-08-22 Andrea Corallo <andrea.corallo@arm.com>
883
884 * libgccjit.c:
885 (gcc_jit_context_new_rvalue_from_int)
886 (gcc_jit_context_new_rvalue_from_long)
887 (gcc_jit_context_new_rvalue_from_double)
888 (gcc_jit_context_new_rvalue_from_ptr): Update function heading
889 comments.
890
6fb94d67
GA
8912020-06-16 Nicolas Bértolo <nicolasbertolo@gmail.com>
892
893 * Make-lang.in: Always define version, minor and release
894 numbers. Create the Windows shared library as
895 libgccjit-$(LIBGCCJIT_VERSION_NUM).dll.
896
9a5b7438
GA
8972020-06-03 David Malcolm <dmalcolm@redhat.com>
898
899 PR jit/95306
900 * jit-builtins.c (builtins_manager::make_primitive_type):
901 Implement BT_CONST_VOLATILE_PTR.
902
a9312a79
GA
9032020-06-02 David Malcolm <dmalcolm@redhat.com>
904
905 PR jit/95426
906 * dummy-frontend.c: Include "options.h", "stringpool.h", and
907 "attribs.h".
908 (ATTR_EXCL): New, copied from lto/lto-lang.c.
909 (attr_noreturn_exclusions): Likewise.
910 (attr_returns_twice_exclusions): Likewise.
911 (attr_const_pure_exclusions): Likewise.
912 (jit_attribute_table): Likewise, copied from lto_attribute_table.
913 (jit_format_attribute_table): Likewise, copied from
914 lto_format_attribute_table.
915 (handle_noreturn_attribute): New, copied from lto/lto-lang.c.
916 (handle_leaf_attribute): Likewise.
917 (handle_const_attribute): Likewise.
918 (handle_malloc_attribute): Likewise.
919 (handle_pure_attribute): Likewise.
920 (handle_novops_attribute): Likewise.
921 (get_nonnull_operand): Likewise.
922 (handle_nonnull_attribute): Likewise.
923 (handle_nothrow_attribute): Likewise.
924 (handle_sentinel_attribute): Likewise.
925 (handle_type_generic_attribute): Likewise.
926 (handle_transaction_pure_attribute): Likewise.
927 (handle_returns_twice_attribute): Likewise.
928 (handle_patchable_function_entry_attribute): Likewise.
929 (ignore_attribute): Likewise.
930 (handle_format_attribute): Likewise.
931 (handle_format_arg_attribute): Likewise.
932 (handle_fnspec_attribute): Likewise.
933 (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
934 (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.
935
53ffb43a
GA
9362020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
937
938 * Make-lang.in: Remove extra slash. Build libgccjit.dll and its
939 import library in Windows.
940 * config-lang.in: Update comment about --enable-host-shared.
941 * jit-w32.h: New file.
942 * jit-w32.c: New file.
943 (print_last_error): New function that prints the error
944 string corresponding to GetLastError().
945 (get_TOKEN_USER_current_user): Helper function used for getting
946 the SID belonging to the current user.
947 (create_directory_for_current_user): Helper function to create
948 a directory with permissions such that only the current user can
949 access it.
950 (win_mkdtemp): Create a temporary directory using Windows APIs.
951 * jit-playback.c: Do not chmod files in Windows. Use LoadLibrary,
952 FreeLibrary and GetProcAddress instead of libdl.
953 * jit-result.h, jit-result.c: Introduce result::handle_t to
954 abstract over the types used for dynamic library handles.
955 * jit-tempdir.c: Do not use mkdtemp() in Windows, use
956 win_mkdtemp().
957
61f3b605
GA
9582020-05-27 David Malcolm <dmalcolm@redhat.com>
959
960 PR jit/95314
961 * dummy-frontend.c (LANG_HOOKS_DEEP_UNSHARING): Define to be true.
962 * jit-playback.h (gcc::jit::playback::rvalue): Mark tree node with
963 TREE_VISITED.
964
9652020-05-27 Tom Tromey <tromey@gcc.gnu.org>
966
967 PR jit/91330
968 * docs/conf.py (texinfo_documents): Set description.
969 * docs/_build/texinfo/libgccjit.texi: Regenerate.
970
c3a4169b
GA
9712020-05-26 David Malcolm <dmalcolm@redhat.com>
972
973 PR jit/95306
974 * docs/topics/functions.rst
975 (gcc_jit_context_get_builtin_function): Document.
976 * docs/_build/texinfo/libgccjit.texi: Regenerate.
977 * dummy-frontend.c (jit_langhook_global_bindings_p): Remove
978 gcc_unreachable.
979 * jit-builtins.c (type_names): New array.
980 (get_string_for_type_id): New function.
981 (gcc::jit::builtins_manager::make_primitive_type): Show name of
982 type in error messages. Update cases to reflect the order in
983 builtin-types.def. Implement cases for BT_INT8, BT_INT16,
984 BT_UINT8, BT_CONST_PTR, BT_VOLATILE_PTR, BT_INT_PTR, BT_FLOAT_PTR,
985 BT_CONST_DOUBLE_PTR, BT_SIZE, BT_CONST_SIZE.
986
9872020-05-26 David Malcolm <dmalcolm@redhat.com>
988
989 * docs/topics/compatibility.rst: Fix underline.
990 Fix missing labels.
991 * docs/topics/types.rst: Fix missing blank line.
992 * docs/_build/texinfo/libgccjit.texi: Regenerate.
993
9942020-05-26 David Malcolm <dmalcolm@redhat.com>
995
996 PR jit/95296
997 * docs/topics/expressions.rst (Unary Operations): Document that
998 result_type of gcc_jit_context_new_unary_op must be a numeric type.
999 (Binary Operations): Likewise for gcc_jit_context_new_binary_op.
1000 (Global variables): Document that "type" of
1001 gcc_jit_context_new_global must be non-`void`.
1002 * docs/topics/function-pointers.rst
1003 (gcc_jit_context_new_function_ptr_type): Document that the
1004 param_types must be non-void, but that return_type may be.
1005 * docs/topics/functions.rst (Params): Document that
1006 gcc_jit_context_new_param's type must be non-void.
1007 (Functions): Likewise for gcc_jit_function_new_local.
1008 * docs/topics/types.rst (gcc_jit_context_new_array_type): Document
1009 that the type must be non-void.
1010 (gcc_jit_context_new_field): Likewise.
1011 * docs/_build/texinfo/Makefile: Regenerate.
1012 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1013 * libgccjit.c (gcc_jit_context_new_array_type): Fail if
1014 element_type is void.
1015 (gcc_jit_context_new_field): Likewise for "type".
1016 (gcc_jit_context_new_function_ptr_type): Likewise for each
1017 element of param_types.
1018 (gcc_jit_context_new_param): Likewise for "type".
1019 (gcc_jit_context_new_global): Likewise.
1020 (gcc_jit_function_new_local): Likewise.
1021 (gcc_jit_type_get_aligned): Likewise.
1022
63b2923d
A
10232020-03-31 Andrea Corallo <andrea.corallo@arm.com>
1024 David Malcolm <dmalcolm@redhat.com>
1025
1026 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_13): New ABI tag
1027 plus add version paragraph.
1028 * libgccjit++.h (namespace gccjit::version): Add new namespace.
1029 * libgccjit.c (gcc_jit_version_major, gcc_jit_version_minor)
1030 (gcc_jit_version_patchlevel): New functions.
1031 * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_version): New macro.
1032 (gcc_jit_version_major, gcc_jit_version_minor)
1033 (gcc_jit_version_patchlevel): New functions.
1034 * libgccjit.map (LIBGCCJIT_ABI_13) New ABI tag.
1035
0cd55f9d
A
10362020-03-23 Andrea Corallo <andrea.corallo@arm.com>
1037
1038 * jit-playback.h
1039 (gcc::jit::playback::context m_recording_ctxt): Remove
1040 m_char_array_type_node field.
1041 * jit-playback.c
1042 (playback::context::context) Remove m_char_array_type_node from member
1043 initializer list.
1044 (playback::context::new_string_literal) Fix logic to handle string
1045 length > 200.
1046
8d9254fc
JJ
10472020-01-01 Jakub Jelinek <jakub@redhat.com>
1048
1049 Update copyright years.
1050
70ce1ab9
JB
10512019-11-29 Julian Brown <julian@codesourcery.com>
1052
1053 * jit-builtins.c (BT_DFLOAT32_PTR, BT_DFLOAT64_PTR, BT_DFLOAT128_PTR):
1054 Remove commented-out cases.
1055
56e04525
DM
10562019-11-20 David Malcolm <dmalcolm@redhat.com>
1057
1058 PR jit/92483
1059 * jit-playback.c (gcc::jit::playback::context::make_fake_args):
1060 Update GCC_JIT_BOOL_OPTION_SELFCHECK_GC for new --param syntax.
1061
4d732405
RS
10622019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1063
1064 PR middle-end/91421
1065 * jit-playback.c (new_function): Use set_decl_built_in_function.
1066
ab20d992 10672019-07-22 Andrea Corallo <andrea.corallo@arm.com>
9afb91b2
AC
1068
1069 * jit-recording.c (unary_op_reproducer_strings): Make it extern.
1070 (binary_op_reproducer_strings): Likewise.
1071 * jit-recording.h (unary_op_reproducer_strings): Likewise.
1072 (binary_op_reproducer_strings): Likewise.
1073 * libgccjit.c (gcc_jit_context_new_unary_op): Check result_type to be a
1074 numeric type.
1075 * libgccjit.c (gcc_jit_context_new_binary_op): Improve error message.
1076
ab20d992 10772019-07-04 Andrea Corallo <andrea.corallo@arm.com>
2b442504
AC
1078
1079 * libgccjit.c (gcc_jit_context_new_binary_op): Check result_type to be a
1080 numeric type.
1081
ab20d992 10822019-07-04 Andrea Corallo <andrea.corallo@arm.com>
ee118c14
AC
1083
1084 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_12): New ABI tag.
1085 * docs/topics/types.rst: Add gcc_jit_context_new_bitfield.
1086 * jit-common.h (namespace recording): Add class bitfield.
1087 * jit-playback.c:
1088 (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): Add macros.
1089 (playback::context::new_bitfield): New method.
1090 (playback::compound_type::set_fields): Add bitfield support.
1091 (playback::lvalue::mark_addressable): Was jit_mark_addressable make this
1092 a method of lvalue plus return a bool to communicate success.
1093 (playback::lvalue::get_address): Check for jit_mark_addressable return
1094 value.
1095 * jit-playback.h (new_bitfield): New method.
1096 (class bitfield): New class.
1097 (class lvalue): Add jit_mark_addressable method.
1098 * jit-recording.c (recording::context::new_bitfield): New method.
1099 (recording::bitfield::replay_into): New method.
1100 (recording::bitfield::write_to_dump): Likewise.
1101 (recording::bitfield::make_debug_string): Likewise.
1102 (recording::bitfield::write_reproducer): Likewise.
1103 * jit-recording.h (class context): Add new_bitfield method.
1104 (class field): Make it derivable by class bitfield.
1105 (class bitfield): Add new class.
1106 * libgccjit++.h (class context): Add new_bitfield method.
1107 * libgccjit.c (struct gcc_jit_bitfield): New structure.
1108 (gcc_jit_context_new_bitfield): New function.
1109 * libgccjit.h
1110 (LIBGCCJIT_HAVE_gcc_jit_context_new_bitfield) New macro.
1111 (gcc_jit_context_new_bitfield): New function.
1112 * libgccjit.map (LIBGCCJIT_ABI_12) New ABI tag.
1113
36a3a7a3
JJ
11142019-03-21 Jakub Jelinek <jakub@redhat.com>
1115
1116 * jit-recording.c (reproducer::m_set_identifiers): Use false as Lazy
1117 in hash_set template param.
1118
ab20d992 11192019-02-05 Andrea Corallo <andrea.corallo@arm.com>
216090cc
AC
1120
1121 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_11): New ABI tag.
1122 * docs/topics/contexts.rst (Additional driver options): New
1123 section.
1124 * jit-playback.c (invoke_driver): Add call to append_driver_options.
1125 * jit-recording.c: Within namespace gcc::jit...
1126 (recording::context::~context): Free the optnames within
1127 m_driver_options.
1128 (recording::context::add_driver_option): New method.
1129 (recording::context::append_driver_options): New method.
1130 (recording::context::dump_reproducer_to_file): Add driver
1131 options.
1132 * jit-recording.h: Within namespace gcc::jit...
1133 (recording::context::add_driver_option): New method.
1134 (recording::context::append_driver_options): New method.
1135 (recording::context::m_driver_options): New field.
1136 * libgccjit++.h (gccjit::context::add_driver_option): New
1137 method.
1138 * libgccjit.c (gcc_jit_context_add_driver_option): New API
1139 entrypoint.
1140 * libgccjit.h (gcc_jit_context_add_driver_option): New API
1141 entrypoint.
1142 (LIBGCCJIT_HAVE_gcc_jit_context_add_driver_option): New
1143 macro.
1144 * libgccjit.map (LIBGCCJIT_ABI_11): New ABI tag.
1145
a5544970
JJ
11462019-01-01 Jakub Jelinek <jakub@redhat.com>
1147
1148 Update copyright years.
1149
478dd60d
DM
11502018-11-15 David Malcolm <dmalcolm@redhat.com>
1151
1152 PR other/19165
1153 * dummy-frontend.c (jit_begin_diagnostic): Add diagnostic_t param.
1154
620e594b
DM
11552018-11-13 David Malcolm <dmalcolm@redhat.com>
1156
1157 * jit-playback.c: Replace "source_location" with "location_t".
1158
033eb567
DM
11592018-10-17 David Malcolm <dmalcolm@redhat.com>
1160
1161 * Make-lang.in (selftest-jit): New.
1162
98086b2b
ML
11632018-06-28 Martin Liska <mliska@suse.cz>
1164
1165 * jit-playback.c: Include opt-suggestions.h.
1166
3de37a5d
ML
11672018-06-28 Martin Liska <mliska@suse.cz>
1168
1169 * jit-playback.c (class auto_argvec): Moved to vec.h.
1170 (auto_argvec::~auto_argvec): Likewise.
1171 (compile): Use the renamed name.
1172 (invoke_driver): Likewise.
1173
ea143da7
RO
11742018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1175
1176 PR jit/84288
1177 * Make-lang.in ($(LIBGCCJIT_FILENAME)): Add $(EXTRA_GCC_LIBS).
1178
deb3da39
DM
11792018-03-09 David Malcolm <dmalcolm@redhat.com>
1180 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1181
1182 PR jit/64089
1183 PR jit/84288
1184 * Make-lang.in (COMMA): New.
1185 (LIBGCCJIT_VERSION_SCRIPT_OPTION): New.
1186 (LIBGCCJIT_SONAME_OPTION): New.
1187 (jit): Move --version-script and -soname linker options to the
1188 above.
1189
9aba6f77
DM
11902018-01-25 David Malcolm <dmalcolm@redhat.com>
1191
1192 PR jit/81672
1193 * jit-recording.h (gcc::jit::recording::union_): Remove fields
1194 "m_loc" and "m_name".
1195
85ec4feb
JJ
11962018-01-03 Jakub Jelinek <jakub@redhat.com>
1197
1198 Update copyright years.
1199
01512446
JJ
12002017-12-19 Jakub Jelinek <jakub@redhat.com>
1201
1202 * jit-playback.c (get_type, playback::compile_to_file::copy_file,
1203 playback::context::acquire_mutex): Replace Yoda conditions with
1204 typical order conditions.
1205 * libgccjit.c (gcc_jit_context_new_struct_type,
1206 gcc_jit_struct_set_fields, gcc_jit_context_new_union_type,
1207 gcc_jit_context_new_function, gcc_jit_timer_pop): Likewise.
1208 * jit-builtins.c (matches_builtin): Likewise.
1209 * jit-recording.c (recording::compound_type::set_fields,
1210 recording::fields::write_reproducer, recording::rvalue::set_scope,
1211 recording::function::validate): Likewise.
1212 * jit-logging.c (logger::decref): Likewise.
1213
5de73c05
JJ
12142017-11-30 Jakub Jelinek <jakub@redhat.com>
1215
1216 * jit-recording.c
1217 (recording::memento_of_new_rvalue_from_const <long>::write_reproducer):
1218 Use ; instead of ;;.
1219
9e851845
JJ
12202017-11-28 Jakub Jelinek <jakub@redhat.com>
1221
1222 * jit-playback.c (add_switch): Build SWITCH_EXPR using build2 instead
1223 of build3. Formatting fixes. Adjust funciton comment.
1224
120e92fc
TV
12252017-11-23 Tom de Vries <tom@codesourcery.com>
1226
1227 * libgccjit.c (RETURN_NULL_IF_FAIL_NONNULL_NUMERIC_TYPE): Wrap in
1228 JIT_{BEGIN,END}_STMT.
1229
77f4ead7
DM
12302017-10-31 David Malcolm <dmalcolm@redhat.com>
1231
1232 * docs/internals/index.rst (Running the test suite): Document
1233 PRESERVE_EXECUTABLES.
1234 (Running under valgrind): Add markup to RUN_UNDER_VALGRIND.
1235 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1236
6069fe72
DM
12372017-10-04 David Malcolm <dmalcolm@redhat.com>
1238
1239 * docs/cp/topics/expressions.rst (Vector expressions): New
1240 section.
1241 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_10): New ABI tag.
1242 * docs/topics/expressions.rst (Vector expressions): New section.
1243 * docs/topics/types.rst (gcc_jit_type_get_vector): Add link to
1244 gcc_jit_context_new_rvalue_from_vector.
1245 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1246 * jit-common.h (gcc::jit:recording::vector_type): New forward
1247 decl.
1248 * jit-playback.c
1249 (gcc::jit::playback::context::new_rvalue_from_vector): New method.
1250 * jit-playback.h
1251 (gcc::jit::playback::context::new_rvalue_from_vector): New method.
1252 * jit-recording.c: In namespace gcc::jit::
1253 (class comma_separated_string): New class.
1254 (comma_separated_string::comma_separated_string): New ctor,
1255 adapted from recording::call::make_debug_string.
1256 (comma_separated_string::~comma_separated_string): New dtor.
1257 In namespace gcc::jit::recording::
1258 (context::new_rvalue_from_vector): New method.
1259 (type::get_vector): Update for renaming of memento_of_get_vector.
1260 (class memento_of_get_vector): Rename to...
1261 (class vector_type): ..this.
1262 (memento_of_new_rvalue_from_vector::memento_of_new_rvalue_from_vector):
1263 New ctor.
1264 (memento_of_new_rvalue_from_vector::replay_into): New method.
1265 (memento_of_new_rvalue_from_vector::visit_children): New method.
1266 (memento_of_new_rvalue_from_vector::make_debug_string): New
1267 method.
1268 (memento_of_new_rvalue_from_vector::write_reproducer): New method.
1269 (call::make_debug_string): Split out arg-printing code into ctor
1270 for comma_separated_string.
1271 * jit-recording.h: In namespace gcc::jit::recording::
1272 (context::new_rvalue_from_vector): New method.
1273 (type::dyn_cast_vector_type): New virtual function.
1274 (class memento_of_get_vector): Rename to...
1275 (class vector_type): ...this.
1276 (vector_type::unqualified): Remove this vfunc override in favor
1277 of...
1278 (vector_type::get_element_type): ...this new method.
1279 (vector_type::get_num_units): New method.
1280 (vector_type::dyn_cast_vector_type): New vfunc override.
1281 (class memento_of_new_rvalue_from_vector): New class.
1282 * libgccjit++.h (gccjit::context::new_rvalue): Add overload for
1283 vector of rvalue.
1284 * libgccjit.c (gcc_jit_context_new_binary_op): Strip off type
1285 qualifications when checking that both operands have same type.
1286 (gcc_jit_context_new_rvalue_from_vector): New API entrypoint.
1287 * libgccjit.h
1288 (LIBGCCJIT_HAVE_gcc_jit_context_new_rvalue_from_vector): New
1289 macro.
1290 (gcc_jit_context_new_rvalue_from_vector): New API entrypoint.
1291 * libgccjit.map (LIBGCCJIT_ABI_10): New ABI tag.
1292
ecd5156d
DM
12932017-09-28 David Malcolm <dmalcolm@redhat.com>
1294
1295 * docs/topics/expressions.rst (Function calls): Add link to
1296 gcc_jit_context_new_function_ptr_type.
1297 (Function pointers): Convert to cross-references to
1298 function-pointers.rst, moving material there.
1299 * docs/topics/function-pointers.rst: New page.
1300 * docs/topics/index.rst: Add function-pointers.rst.
1301 * docs/topics/types.rst (Function pointer types): New section.
1302 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1303
5a47aa2c
DM
13042017-09-28 David Malcolm <dmalcolm@redhat.com>
1305
1306 * jit-recording.c
1307 (gcc::jit::recording::function_type::is_same_type_as): New function.
1308 * jit-recording.h: In namespace gcc::jit::recording::
1309 (type::accepts_writes_from): Use is_same_type_as rather than pointer
1310 equality.
1311 (type::is_same_type_as): New virtual function.
1312 (function_type::is_same_type_as): New override.
1313
15a65e63
DM
13142017-09-27 David Malcolm <dmalcolm@redhat.com>
1315
1316 * docs/cp/topics/expressions.rst (Function pointers): New section.
1317 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_9): New tag.
1318 * docs/topics/expressions.rst (Function pointers): New section.
1319 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1320 * jit-common.h (class gcc::jit::recording::function_pointer): New
1321 forward decl.
1322 * jit-playback.c (gcc::jit::playback::function::get_address): New
1323 method.
1324 * jit-playback.h (gcc::jit::playback::function::get_address): New
1325 method decl.
1326 * jit-recording.c: Within namespace gcc::jit::recording...
1327 (function::function): Initialize new field "m_fn_ptr_type".
1328 (function::get_address): New method.
1329 (function_pointer::replay_into): New method.
1330 (function_pointer::visit_children): New method.
1331 (function_pointer::make_debug_string): New method.
1332 (function_pointer::write_reproducer): New method.
1333 * jit-recording.h: Within namespace gcc::jit::recording...
1334 (function::get_address): New method.
1335 (function): Add field "m_fn_ptr_type".
1336 (class function_pointer): New subclass of rvalue.
1337 * libgccjit++.h (gccjit::function::get_address): New method.
1338 * libgccjit.c (gcc_jit_function_get_address): New function.
1339 * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_function_get_address): New
1340 macro.
1341 (gcc_jit_function_get_address): New API entrypoint.
1342 * libgccjit.map (LIBGCCJIT_ABI_9): New tag.
1343
595ced60
DM
13442017-09-14 David Malcolm <dmalcolm@redhat.com>
1345
1346 PR jit/82174
1347 * jit-builtins.c (matches_builtin): Ignore entries with a NULL
1348 name.
1349
953e520d
DM
13502017-08-18 David Malcolm <dmalcolm@redhat.com>
1351
1352 PR tree-optimization/46805
1353 * dummy-frontend.c (jit_langhook_parse_file): Handle vector types.
1354
519d0798
DM
13552017-08-18 David Malcolm <dmalcolm@redhat.com>
1356
1357 * jit-recording.c (class gcc::jit::reproducer): Rename field
1358 "m_identifiers" to "m_map_memento_to_identifier". Add field
1359 "m_set_identifiers" and struct hash_traits for it.
1360 (gcc::jit::reproducer::reproducer): Update for above.
1361 (convert_to_identifier): New function.
1362 (gcc::jit::reproducer::ensure_identifier_is_unique): New method.
1363 (gcc::jit::reproducer::make_identifier): Avoid appending the %p
1364 unless necessary for uniqueness. Update for field renaming.
1365 (gcc::jit::reproducer::get_identifier): Update for field renaming.
1366
47ee1b7c
DM
13672017-08-09 David Malcolm <dmalcolm@redhat.com>
1368
1369 * docs/cp/topics/types.rst (Vector types): New section.
1370 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_8): New tag.
1371 * docs/topics/types.rst (gcc_jit_context_get_type): Fix typo in
1372 example.
1373 (Vector types): New section.
1374 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1375 * jit-playback.c (gcc::jit::playback::type::get_vector): New
1376 method.
1377 * jit-playback.h (gcc::jit::playback::type::get_vector): New
1378 method.
1379 * jit-recording.c: In namespace gcc::jit::recording::
1380 (type::get_vector): New method.
1381 (memento_of_get_aligned::write_reproducer): Fix typo
1382 in leading comment.
1383 (memento_of_get_vector::replay_into): New method.
1384 (memento_of_get_vector::make_debug_string): New method.
1385 (memento_of_get_vector::write_reproducer): New method.
1386 * jit-recording.h: In namespace gcc::jit::recording::
1387 (type::get_vector): New
1388 method.
1389 (class memento_of_get_vector): New class.
1390 * libgccjit++.h (gccjit::type::get_vector): New method.
1391 * libgccjit.c (gcc_jit_type_get_vector): New public entrypoint.
1392 * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_type_get_vector): New
1393 define.
1394 (gcc_jit_type_get_vector): New decl.
1395 * libgccjit.map (LIBGCCJIT_ABI_8): New ABI tag.
1396
b8506a8a
RS
13972017-07-05 Richard Sandiford <richard.sandiford@linaro.org>
1398 Alan Hayward <alan.hayward@arm.com>
1399 David Sherwood <david.sherwood@arm.com>
1400
1401 * dummy-frontend.c (jit_langhook_type_for_mode): Remove "enum" before
1402 "machine_mode".
1403
0ebd1f00
DM
14042017-04-24 David Malcolm <dmalcolm@redhat.com>
1405
1406 * docs/cp/topics/types.rst (gccjit::type::get_const): Remove
1407 comment.
1408 (gccjit::type::get_aligned): Add.
1409 * docs/topics/compatibility.rst: Add LIBGCCJIT_ABI_7.
1410 * docs/topics/types.rst: Add gcc_jit_type_get_aligned.
1411 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1412 * jit-playback.c (gcc::jit::playback::type::get_aligned): New
1413 method.
1414 * jit-playback.h (gcc::jit::playback::type::get_aligned): New
1415 method.
1416 * jit-recording.c: Within namespace gcc::jit::recording...
1417 (type::get_aligned): New method.
1418 (memento_of_get_aligned::replay_into): New method.
1419 (memento_of_get_aligned::make_debug_string): New method.
1420 (memento_of_get_aligned::write_reproducer): New method.
1421 * jit-recording.h: Within namespace gcc::jit::recording...
1422 (type::get_aligned): New method.
1423 (type::accepts_writes_from): Strip off qualifications from
1424 this when comparing pointer equality.
1425 (decorated_type): New subclass of type, subsuming the
1426 commonality between memento_of_get_const and
1427 memento_of_get_volatile.
1428 (memento_of_get_const): Make a subclass of decorated_type,
1429 rather than type.
1430 (memento_of_get_volatile): Likewise.
1431 (memento_of_get_aligned): Likewise.
1432 * libgccjit++.h: Within namespace gccjit...
1433 (type::get_const): New method.
1434 (type::get_aligned): New method.
1435 * libgccjit.c (gcc_jit_type_get_aligned): New function.
1436 * libgccjit.h (gcc_jit_type_get_aligned): New decl.
1437 * libgccjit.map (LIBGCCJIT_ABI_7): New
1438 (gcc_jit_type_get_aligned): Add.
1439
8a3a6ab4
DM
14402017-01-19 David Malcolm <dmalcolm@redhat.com>
1441
1442 * dummy-frontend.c (jit_langhook_type_for_size): Delete.
1443 (LANG_HOOKS_TYPE_FOR_SIZE): Don't redefine.
1444
b37589b0
DM
14452017-01-18 David Malcolm <dmalcolm@redhat.com>
1446
1447 * dummy-frontend.c (jit_langhook_type_for_size): Implement, using
1448 lto's lto_type_for_size.
1449
cbe34bb5
JJ
14502017-01-01 Jakub Jelinek <jakub@redhat.com>
1451
1452 Update copyright years.
1453
15c671a7
DM
14542016-05-20 David Malcolm <dmalcolm@redhat.com>
1455
1456 * docs/topics/compatibility.rst: Add LIBGCCJIT_ABI_6.
1457 * docs/topics/expressions.rst (Function calls): Add documentation
1458 of gcc_jit_rvalue_set_bool_require_tail_call.
1459 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1460 * jit-common.h (gcc::jit::recording::base_call): Add forward decl.
1461 * jit-playback.c: Within namespace gcc::jit::playback...
1462 (context::build_call) Add "require_tail_call" param and use it
1463 to set CALL_EXPR_MUST_TAIL_CALL.
1464 (context::new_call): Add "require_tail_call" param.
1465 (context::new_call_through_ptr): Likewise.
1466 * jit-playback.h: Within namespace gcc::jit::playback...
1467 (context::new_call: Add "require_tail_call" param.
1468 (context::new_call_through_ptr): Likewise.
1469 (context::build_call): Likewise.
1470 * jit-recording.c: Within namespace gcc::jit::recording...
1471 (base_call::base_call): New constructor.
1472 (base_call::write_reproducer_tail_call): New method.
1473 (call::call): Update for inheritance from base_call.
1474 (call::replay_into): Provide m_require_tail_call to call
1475 to new_call.
1476 (call::write_reproducer): Call write_reproducer_tail_call.
1477 (call_through_ptr::call_through_ptr): Update for inheritance from
1478 base_call.
1479 (call_through_ptr::replay_into): Provide m_require_tail_call to call
1480 to new_call_through_ptr.
1481 (recording::call_through_ptr::write_reproducer): Call
1482 write_reproducer_tail_call.
1483 * jit-recording.h: Within namespace gcc::jit::recording...
1484 (rvalue::dyn_cast_base_call): New virtual function.
1485 (class base_call): New subclass of class rvalue.
1486 (class call): Inherit from base_call rather than directly from
1487 rvalue, moving get_precedence and m_args to base_call.
1488 (class call_through_ptr): Likewise.
1489 * libgccjit.c (gcc_jit_rvalue_set_bool_require_tail_call): New
1490 function.
1491 * libgccjit.h
1492 (LIBGCCJIT_HAVE_gcc_jit_rvalue_set_bool_require_tail_call): New
1493 macro.
1494 (gcc_jit_rvalue_set_bool_require_tail_call): New function.
1495 * libgccjit.map (LIBGCCJIT_ABI_6): New.
1496 (gcc_jit_rvalue_set_bool_require_tail_call): Add.
1497
6b5423a5
DM
14982016-05-17 David Malcolm <dmalcolm@redhat.com>
1499
1500 * dummy-frontend.c: Include diagnostic.h.
1501 (jit_begin_diagnostic): New function.
1502 (jit_end_diagnostic): New function.
1503 (jit_langhook_init): Register jit_begin_diagnostic
1504 and jit_end_diagnostic with the global_dc.
1505 * jit-playback.c: Include diagnostic.h.
1506 (gcc::jit::playback::context::add_diagnostic): New method.
1507 * jit-playback.h (struct diagnostic_context): Add forward
1508 declaration.
1509 (gcc::jit::playback::context::add_diagnostic): New method.
1510
f51703a8
DM
15112016-05-17 David Malcolm <dmalcolm@redhat.com>
1512
1513 * docs/topics/expressions.rst (Function calls): Document
1514 gcc_jit_context_new_call_through_ptr.
1515 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1516
54ece5e2
DM
15172016-05-13 David Malcolm <dmalcolm@redhat.com>
1518
1519 * jit-playback.h: Within namespace gcc:jit::playback...
1520 (compile_to_memory::postprocess): Mark with FINAL OVERRIDE.
1521 (compile_to_file::postprocess): Likewise.
1522 (function::finalizer): Likewise.
1523 (block::finalizer): Likewise.
1524 (source_file::finalizer): Likewise.
1525 (source_line::finalizer): Likewise.
1526 * jit-recording.c (gcc::jit::rvalue_usage_validator):: Likewise.
1527 * jit-recording.h: Within namespace gcc::jit::recording...
1528 (string::replay_into): Mark with FINAL OVERRIDE.
1529 (string::make_debug_string): Likewise.
1530 (string::write_reproducer): Likewise.
1531 (location::replay_into): Likewise.
1532 (location::dyn_cast_location): Likewise.
1533 (location::make_debug_string): Likewise.
1534 (location::write_reproducer): Likewise.
1535 (memento_of_get_type::dereference): Likewise.
1536 (memento_of_get_type::accepts_writes_from): Likewise.
1537 (memento_of_get_type::is_int): Likewise.
1538 (memento_of_get_type::is_float): Likewise.
1539 (memento_of_get_type::is_bool): Likewise.
1540 (memento_of_get_type::is_pointer): Likewise.
1541 (memento_of_get_type::is_array): Likewise.
1542 (memento_of_get_type::is_void): Likewise.
1543 (memento_of_get_type::replay_into): Likewise.
1544 (memento_of_get_type::make_debug_string): Likewise.
1545 (memento_of_get_type::write_reproducer): Likewise.
1546 (memento_of_get_pointer::dereference): Likewise.
1547 (memento_of_get_pointer::accepts_writes_from): Likewise.
1548 (memento_of_get_pointer::replay_into): Likewise.
1549 (memento_of_get_pointer::is_int): Likewise.
1550 (memento_of_get_pointer::is_float): Likewise.
1551 (memento_of_get_pointer::is_bool): Likewise.
1552 (memento_of_get_pointer::is_pointer): Likewise.
1553 (memento_of_get_pointer::is_array): Likewise.
1554 (memento_of_get_pointer::make_debug_string): Likewise.
1555 (memento_of_get_pointer::write_reproducer): Likewise.
1556 (memento_of_get_const::dereference): Likewise.
1557 (memento_of_get_const::accepts_writes_from): Likewise.
1558 (memento_of_get_const::unqualified): Likewise.
1559 (memento_of_get_const::is_int): Likewise.
1560 (memento_of_get_const::is_float): Likewise.
1561 (memento_of_get_const::is_bool): Likewise.
1562 (memento_of_get_const::is_pointer): Likewise.
1563 (memento_of_get_const::is_array): Likewise.
1564 (memento_of_get_const::void replay_into): Likewise;
1565 (memento_of_get_const::make_debug_string): Likewise.
1566 (memento_of_get_const::write_reproducer): Likewise.
1567 (memento_of_get_volatile::dereference): Likewise.
1568 (memento_of_get_volatile::unqualified): Likewise.
1569 (memento_of_get_volatile::is_int): Likewise.
1570 (memento_of_get_volatile::is_float): Likewise.
1571 (memento_of_get_volatile::is_bool): Likewise.
1572 (memento_of_get_volatile::is_pointer): Likewise.
1573 (memento_of_get_volatile::is_array): Likewise.
1574 (memento_of_get_volatile::replay_into): Likewise;
1575 (memento_of_get_volatile::make_debug_string): Likewise.
1576 (memento_of_get_volatile::write_reproducer): Likewise.
1577 (array_type::dereference): Likewise.
1578 (array_type::is_int): Likewise.
1579 (array_type::is_float): Likewise.
1580 (array_type::is_bool): Likewise.
1581 (array_type::is_pointer): Likewise.
1582 (array_type::is_array): Likewise.
1583 (array_type::replay_into): Likewise;
1584 (array_type::make_debug_string): Likewise.
1585 (array_type::write_reproducer): Likewise.
1586 (function_type::dereference): Likewise.
1587 (function_type::function_dyn_cast_function_type): Likewise.
1588 (function_type::function_as_a_function_type): Likewise.
1589 (function_type::is_int): Likewise.
1590 (function_type::is_float): Likewise.
1591 (function_type::is_bool): Likewise.
1592 (function_type::is_pointer): Likewise.
1593 (function_type::is_array): Likewise.
1594 (function_type::replay_into): Likewise;
1595 (function_type::make_debug_string): Likewise.
1596 (function_type::write_reproducer): Likewise.
1597 (field::replay_into): Likewise;
1598 (field::write_to_dump): Likewise.
1599 (field::make_debug_string): Likewise.
1600 (field::write_reproducer): Likewise.
1601 (compound_type::dereference): Likewise.
1602 (compound_type::is_int): Likewise.
1603 (compound_type::is_float): Likewise.
1604 (compound_type::is_bool): Likewise.
1605 (compound_type::is_pointer): Likewise.
1606 (compound_type::is_array): Likewise.
1607 (compound_type::has_known_size): Likewise.
1608 (struct_::dyn_cast_struct): Likewise.
1609 (struct_::replay_into): Likewise.
1610 (struct_::access_as_type): Likewise.
1611 (struct_::make_debug_string): Likewise.
1612 (struct_::write_reproducer): Likewise.
1613 (fields::replay_into): Likewise.
1614 (fields::write_to_dump): Likewise.
1615 (fields::make_debug_string): Likewise.
1616 (fields::write_reproducer): Likewise.
1617 (union_::replay_into): Likewise.
1618 (union_::make_debug_string): Likewise.
1619 (union_::write_reproducer): Likewise.
1620 (lvalue::access_as_rvalue): Mark with OVERRIDE.
1621 (param::replay_into): Mark with FINAL OVERRIDE.
1622 (param::visit_children): Likewise.
1623 (param::dyn_cast_param): Likewise.
1624 (param::access_as_rvalue): Likewise.
1625 (param::access_as_lvalue): Likewise.
1626 (param::make_debug_string): Likewise.
1627 (param::write_reproducer): Likewise.
1628 (param::get_precedence): Likewise.
1629 (function::replay_into): Likewise.
1630 (function::write_to_dump): Likewise.
1631 (function::make_debug_string): Likewise.
1632 (function::write_reproducer): Likewise.
1633 (block::write_to_dump): Likewise.
1634 (block::make_debug_string): Likewise.
1635 (block::write_reproducer): Likewise.
1636 (block::replay_into): Likewise.
1637 (global::replay_into): Likewise;
1638 (global::visit_children): Likewise.
1639 (global::write_to_dump): Likewise.
1640 (global::make_debug_string): Likewise.
1641 (global::write_reproducer): Likewise.
1642 (global::get_precedence): Likewise.
1643 (memento_of_new_rvalue_from_const::replay_into): Likewise.
1644 (memento_of_new_rvalue_from_const::visit_children): Likewise.
1645 (memento_of_new_rvalue_from_const::is_constant): Likewise.
1646 (memento_of_new_rvalue_from_const::get_wide_int): Likewise.
1647 (memento_of_new_rvalue_from_const::make_debug_string): Likewise.
1648 (memento_of_new_rvalue_from_const::write_reproducer): Likewise.
1649 (memento_of_new_rvalue_from_const::get_precedence): Likewise.
1650 (memento_of_new_string_literal::replay_into): Likewise.
1651 (memento_of_new_string_literal::visit_children): Likewise.
1652 (memento_of_new_string_literal::make_debug_string): Likewise.
1653 (memento_of_new_string_literal::write_reproducer): Likewise.
1654 (memento_of_new_string_literal::get_precedence): Likewise.
1655 (unary_op::replay_into): Likewise.
1656 (unary_op::visit_children): Likewise.
1657 (unary_op::make_debug_string): Likewise.
1658 (unary_op::write_reproducer): Likewise.
1659 (unary_op::get_precedence): Likewise.
1660 (binary_op::replay_into): Likewise.
1661 (binary_op::visit_children): Likewise.
1662 (binary_op::make_debug_string): Likewise.
1663 (binary_op::write_reproducer): Likewise.
1664 (binary_op::get_precedence): Likewise.
1665 (comparison::replay_into): Likewise.
1666 (comparison::visit_children): Likewise.
1667 (comparison::make_debug_string): Likewise.
1668 (comparison::write_reproducer): Likewise.
1669 (comparison::get_precedence): Likewise.
1670 (cast::replay_into): Likewise.
1671 (cast::visit_children): Likewise.
1672 (cast::make_debug_string): Likewise.
1673 (cast::write_reproducer): Likewise.
1674 (cast::get_precedence): Likewise.
1675 (call::replay_into): Likewise.
1676 (call::visit_children): Likewise.
1677 (call::make_debug_string): Likewise.
1678 (call::write_reproducer): Likewise.
1679 (call::get_precedence): Likewise.
1680 (call_through_ptr::replay_into): Likewise.
1681 (call_through_ptr::visit_children): Likewise.
1682 (call_through_ptr::make_debug_string): Likewise.
1683 (call_through_ptr::write_reproducer): Likewise.
1684 (call_through_ptr::get_precedence): Likewise.
1685 (array_access::replay_into): Likewise.
1686 (array_access::visit_children): Likewise.
1687 (array_access::make_debug_string): Likewise.
1688 (array_access::write_reproducer): Likewise.
1689 (array_access::get_precedence): Likewise.
1690 (access_field_of_lvalue::replay_into): Likewise.
1691 (access_field_of_lvalue::visit_children): Likewise.
1692 (access_field_of_lvalue::make_debug_string): Likewise.
1693 (access_field_of_lvalue::write_reproducer): Likewise.
1694 (access_field_of_lvalue::get_precedence): Likewise.
1695 (access_field_rvalue::replay_into): Likewise.
1696 (access_field_rvalue::visit_children): Likewise.
1697 (access_field_rvalue::make_debug_string): Likewise.
1698 (access_field_rvalue::write_reproducer): Likewise.
1699 (access_field_rvalue::get_precedence): Likewise.
1700 (dereference_field_rvalue::replay_into): Likewise.
1701 (dereference_field_rvalue::visit_children): Likewise.
1702 (dereference_field_rvalue::make_debug_string): Likewise.
1703 (dereference_field_rvalue::write_reproducer): Likewise.
1704 (dereference_field_rvalue::get_precedence): Likewise.
1705 (dereference_rvalue::replay_into): Likewise.
1706 (dereference_rvalue::visit_children): Likewise.
1707 (dereference_rvalue::make_debug_string): Likewise.
1708 (dereference_rvalue::write_reproducer): Likewise.
1709 (dereference_rvalue::get_precedence): Likewise.
1710 (get_address_of_lvalue::replay_into): Likewise.
1711 (get_address_of_lvalue::visit_children): Likewise.
1712 (get_address_of_lvalue::make_debug_string): Likewise.
1713 (get_address_of_lvalue::write_reproducer): Likewise.
1714 (get_address_of_lvalue::get_precedence): Likewise.
1715 (local::replay_into): Likewise.
1716 (local::visit_children): Likewise.
1717 (local::write_to_dump): Likewise.
1718 (local::make_debug_string): Likewise.
1719 (local::write_reproducer): Likewise.
1720 (local::get_precedence): Likewise.
1721 (statement::write_to_dump): Likewise.
1722 (eval::replay_into): Likewise.
1723 (eval::make_debug_string): Likewise.
1724 (eval::write_reproducer): Likewise.
1725 (assignment::replay_into): Likewise.
1726 (assignment::make_debug_string): Likewise.
1727 (assignment::write_reproducer): Likewise.
1728 (assignment_op::replay_into): Likewise.
1729 (assignment_op::make_debug_string): Likewise.
1730 (assignment_op::write_reproducer): Likewise.
1731 (comment::replay_into): Likewise.
1732 (comment::make_debug_string): Likewise.
1733 (comment::write_reproducer): Likewise.
1734 (conditional::replay_into): Likewise.
1735 (conditional::get_successor_blocks): Likewise.
1736 (conditional::make_debug_string): Likewise.
1737 (conditional::write_reproducer): Likewise.
1738 (jump::replay_into): Likewise.
1739 (jump::get_successor_blocks): Likewise.
1740 (jump::make_debug_string): Likewise.
1741 (jump::write_reproducer): Likewise.
1742 (return_::replay_into): Likewise.
1743 (return_::get_successor_blocks): Likewise.
1744 (return_::make_debug_string): Likewise.
1745 (return_::write_reproducer): Likewise.
1746 (case_::replay_into): Likewise.
1747 (case_::write_reproducer): Likewise.
1748 (case_::make_debug_string): Likewise.
1749 (switch_::replay_into): Likewise.
1750 (switch_::get_successor_blocks): Likewise.
1751 (switch_::make_debug_string): Likewise.
1752 (switch_::write_reproducer): Likewise.
1753
f258ad62
DM
17542016-02-08 David Malcolm <dmalcolm@redhat.com>
1755
1756 * dummy-frontend.c (jit_langhook_init): Remove
1757 second argument to build_common_tree_nodes to
1758 track r233218.
1759
1c652ccb
IB
17602016-01-23 Iain Buclaw <ibuclaw@gdcproject.org>
1761
1762 * jit-playback.c: Include pthread.h.
1763
199501ea
DM
17642016-01-19 David Malcolm <dmalcolm@redhat.com>
1765
1766 PR jit/69144
1767 * jit-playback.c (gcc::jit::playback::compile_to_file::postprocess):
1768 Potentially add the temporary artifact to the tempdir's list of
1769 tempfiles needing additional cleanup.
1770 (gcc::jit::playback::context::extract_any_requested_dumps): Likewise
1771 for the dumpfile.
1772 * jit-tempdir.c (gcc::jit::tempdir::~tempdir): Clean up additional
1773 tempfiles.
1774 * jit-tempdir.h (gcc::jit::tempdir::add_temp_file): New method.
1775 (gcc::jit::tempdir::m_tempfiles): New field.
1776 * docs/cp/intro/tutorial04.rst: Update for changes to toyvm.cc.
1777 * docs/examples/tut04-toyvm/toyvm.cc (class compilation_result):
1778 New.
1779 (toyvm_function::compile): Change return type from function ptr
1780 to a compilation_result.
1781 (toyvm_function::get_function_name): New accessor.
1782 (toyvm_function::m_funcname): New field.
1783 (get_function_name): Convert to...
1784 (toyvm_function::make_function_name): ...this new method.
1785 (toyvm_function::parse): Call make_function_name.
1786 (toyvm_function::compile): Convert return type from function ptr
1787 to a compilation_result. Use get_function_name.
1788 (compilation_state::compile): Convert return type from
1789 gcc_jit_result * to a compilation_result.
1790 (test_script): Update for above changes, extracting the code from
1791 the compilation_result.
1792 (main): Likewise.
1793 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1794
818ab71a
JJ
17952016-01-04 Jakub Jelinek <jakub@redhat.com>
1796
1797 Update copyright years.
1798
69f293c9
AM
17992015-11-11 Andrew MacLeod <amacleod@redhat.com>
1800
1801 * dummy-frontend.c: Remove unused header files.
1802 * jit-builtins.c: Likewise.
1803 * jit-playback.c: Likewise.
1804 * jit-recording.c: Likewise.
1805 * jit-spec.c: Likewise.
1806 * libgccjit.c: Likewise.
1807
0aad0198
RS
18082015-11-07 Richard Sandiford <richard.sandiford@arm.com>
1809
1810 * jit-builtins.c: Don't undef DEF_BUILTIN.
1811
2adfab87
AM
18122015-10-29 Andrew MacLeod <amacleod@redhat.com>
1813
1814 * dummy-frontend.c: Reorder #include's and remove duplicates.
1815 * jit-builtins.c: Likewise.
1816 * jit-playback.c: Likewise.
1817 * jit-recording.c: Likewise.
1818 * libgccjit.c: Likewise.
1819
d9a6bd32
JJ
18202015-10-13 Jakub Jelinek <jakub@redhat.com>
1821
1822 * jit-builtins.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
1823 DEF_FUNCTION_TYPE_11): Define.
1824 * jit-builtins.h (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
1825 DEF_FUNCTION_TYPE_11): Define.
1826
fa83660d
TS
18272015-09-30 Thomas Schwinge <thomas@codesourcery.com>
1828 Ulrich Drepper <drepper@gmail.com>
1829
1830 * jit-builtins.h: Undefine DEF_FUNCTION_TYPE_VAR_6 after use.
1831
20a44562
MK
18322015-09-30 Matthias Klose <doko@ubuntu.com>
1833
1834 * jit-builtins.h Define DEF_FUNCTION_TYPE_VAR_6,
1835 remove DEF_FUNCTION_TYPE_VAR_11.
1836 * jit-builtins.c (builtins_manager::make_type): Define and handle
1837 DEF_FUNCTION_TYPE_VAR_6, remove DEF_FUNCTION_TYPE_VAR_11.
1838
9376dd63
DM
18392015-08-25 David Malcolm <dmalcolm@redhat.com>
1840
1841 * docs/cp/topics/contexts.rst
1842 (gccjit::context::set_bool_use_external_driver): New.
1843 * docs/internals/test-hello-world.exe.log.txt: Update.
1844 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_5): New.
1845 * docs/topics/contexts.rst
1846 (gcc_jit_context_set_bool_use_external_driver): New.
1847 * jit-common.h (enum inner_bool_option): Add
1848 INNER_BOOL_OPTION_USE_EXTERNAL_DRIVER.
1849 * jit-playback.c (gcc_driver_name): New global.
1850 (gcc:jit::playback::context::invoke_driver): Split out second
1851 half into...
1852 (gcc::jit::playback::context::invoke_embedded_driver): ...this new
1853 function, and...
1854 (gcc::jit::playback::context::invoke_external_driver): ...this new
1855 function.
1856 * jit-playback.h
1857 (gcc::jit::playback::context::get_inner_bool_option): New.
1858 (gcc::jit::playback::context::invoke_embedded_driver): New.
1859 (gcc::jit::playback::context::invoke_external_driver): New.
1860 * jit-recording.c (inner_bool_option_reproducer_strings):
1861 Add entry for INNER_BOOL_OPTION_USE_EXTERNAL_DRIVER.
1862 * libgccjit++.h
1863 (gccjit::context::set_bool_use_external_driver): New.
1864 * libgccjit.c (gcc_jit_context_set_bool_use_external_driver): New.
1865 * libgccjit.h (gcc_jit_context_set_bool_use_external_driver): New.
1866 (LIBGCCJIT_HAVE_gcc_jit_context_set_bool_use_external_driver):
1867 New.
1868 * libgccjit.map (LIBGCCJIT_ABI_5): New.
1869 * notes.txt: Show invocation of embedded copy of driver.
1870 * docs/internals/test-hello-world.exe.log.txt: Update
1871
baf3fbad
DM
18722015-08-13 David Malcolm <dmalcolm@redhat.com>
1873
1874 * jit-playback.c (invoke_driver): On OS X, add
1875 "-Wl,-undefined,dynamic_lookup" to the driver arguments.
1876
afed3459
DM
18772015-08-03 David Malcolm <dmalcolm@redhat.com>
1878
1879 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_4): New.
1880 * docs/topics/contexts.rst (GCC_JIT_BOOL_OPTION_DUMP_SUMMARY):
1881 We no longer show a profile.
1882 * docs/topics/index.rst (Topic Reference): Add performance.rst.
1883 * docs/topics/performance.rst: New file.
1884 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1885 * jit-playback.c (gcc::jit::playback::context::compile): Add timer
1886 param when constructing the "toplev" instance.
1887 (gcc::jit::playback::context::acquire_mutex): Add timer param when
1888 constructing auto_timevar instance.
1889 (gcc::jit::playback::context::make_fake_args): If we have a timer,
1890 add "-ftime-report".
1891 (gcc::jit::playback::context::invoke_driver): Add timer param when
1892 constructing auto_timevar instance.
1893 (gcc::jit::playback::context::dlopen_built_dso): Likewise.
1894 * jit-playback.h (gcc::jit::playback::context::get_timer): New accessor.
1895 * jit-recording.c: Include timevar.h.
1896 (gcc::jit::recording::context::context): Initialize field "m_timer".
1897 * jit-recording.h: Add forward declaration of class timer.
1898 (gcc::jit::recording::context::set_timer): New method.
1899 (gcc::jit::recording::context::get_timer): New method.
1900 (gcc::jit::recording::context::m_timer): New field.
1901 * libgccjit++.h (gccjit::timer): New class.
1902 (gccjit::auto_time): New class.
1903 (gccjit::context::set_timer): New method.
1904 (gccjit::context::get_timer): New.
1905 (gccjit::timer::timer): New.
1906 (gccjit::timer::push): New.
1907 (gccjit::timer::pop): New.
1908 (timer::print): New.
1909 (timer::get_inner_timer): New.
1910 (timer::release): New.
1911 (auto_time::auto_time): New.
1912 (auto_time::~auto_time): New.
1913 * libgccjit.c: Include timevar.h.
1914 (struct gcc_jit_timer): New.
1915 (gcc_jit_timer_new): New function.
1916 (gcc_jit_timer_release): New function.
1917 (gcc_jit_context_set_timer): New function.
1918 (gcc_jit_context_get_timer): New function.
1919 (gcc_jit_timer_push): New function.
1920 (gcc_jit_timer_pop): New function.
1921 (gcc_jit_timer_print): New function.
1922 * libgccjit.h (LIBGCCJIT_HAVE_TIMING_API): New macro.
1923 (gcc_jit_timer): New typedef.
1924 (gcc_jit_timer_new): New function.
1925 (gcc_jit_timer_release): New function.
1926 (gcc_jit_context_set_timer): New function.
1927 (gcc_jit_context_get_timer): New function.
1928 (gcc_jit_timer_push): New function.
1929 (gcc_jit_timer_pop): New function.
1930 (gcc_jit_timer_print): New function.
1931 * libgccjit.map (LIBGCCJIT_ABI_4): New.
1932 (gcc_jit_timer_new): New function.
1933 (gcc_jit_timer_release): New function.
1934 (gcc_jit_context_set_timer): New function.
1935 (gcc_jit_context_get_timer): New function.
1936 (gcc_jit_timer_push): New function.
1937 (gcc_jit_timer_pop): New function.
1938 (gcc_jit_timer_print): New function.
1939
eb3982c1
DM
19402015-07-23 David Malcolm <dmalcolm@redhat.com>
1941
1942 * jit-playback.c (invoke_driver): Convert local "argvec"
1943 to an auto_argvec, so that it owns copies of the strings,
1944 rather than borrows them, updating ADD_ARG to use xstrdup
1945 and special-casing the NULL terminator to avoid
1946 xstrdup (NULL). Call add_multilib_driver_arguments at the front
1947 of the arguments.
1948 (MULTILIB_DEFAULTS): Provide a default definition.
1949 (multilib_defaults_raw): New constant array.
1950 (gcc::jit::playback::context::add_multilib_driver_arguments): New
1951 method.
1952 * jit-playback.h
1953 (gcc::jit::playback::context::add_multilib_driver_arguments): New
1954 method.
1955 * docs/internals/test-hello-world.exe.log.txt: Update.
1956 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1957
1470e75f
DM
19582015-07-16 David Malcolm <dmalcolm@redhat.com>
1959
1960 * docs/internals/index.rst (Overview of code structure): Add note
1961 that the implementation is in C++, despite the .c extension.
1962 (Submitting patches): New subsection.
1963 * docs/_build/texinfo/libgccjit.texi: Regenerate.
1964
1916bcb5
AM
19652015-07-09 Andrew MacLeod <amacleod@redhat.com>
1966
1967 * dummy-frontend.c: Adjust includes for flags.h changes.
1968 * jit-common.h: Likewise.
1969 * jit-playback.c: Likewise.
1970
58c5ad40
DM
19712015-07-08 David Malcolm <dmalcolm@redhat.com>
1972
1973 PR jit/66783
1974 * libgccjit.c (gcc_jit_context_new_field): Show name of field in
1975 "unknown size" error message.
1976 (gcc_jit_struct_set_fields): Show name of struct in error message.
1977 (gcc_jit_context_new_global): Show name of global in
1978 "unknown size" error message.
1979 (gcc_jit_function_new_local): Likewise for local.
1980
c7131fb2
AM
19812015-07-07 Andrew MacLeod <amacleod@redhat.com>
1982
1983 * dummy-frontend.c: Adjust includes.
1984 * jit-common.h: Likewise.
1985 * jit-playback.c: Likewise.
1986
3457d39e
DM
19872015-07-07 David Malcolm <dmalcolm@redhat.com>
1988
1989 PR jit/66783
1990 * jit-recording.h: Within namespace gcc:jit::recording...
1991 (type::has_known_size): New virtual function.
1992 (struct_has_known_size): New function.
1993 * libgccjit.c (gcc_jit_context_new_field): Verify that the type
1994 has a known size.
1995 (gcc_jit_context_new_global): Likewise.
1996 (gcc_jit_function_new_local): Likewise.
1997
bada4bed
DM
19982015-07-07 David Malcolm <dmalcolm@redhat.com>
1999
2000 PR jit/66779
2001 * dummy-frontend.c (jit_langhook_type_for_mode): Ensure that we
2002 handle modes QI, HI, SI, DI, TI.
2003
e09abfa4
DM
20042015-07-01 David Malcolm <dmalcolm@redhat.com>
2005
2006 PR jit/66700
2007 * jit-playback.c (jit_mark_addressable): New function.
2008 (gcc::jit::playback::lvalue::get_address): Call
2009 jit_mark_addressable on the underlying tree.
2010
e807aeaa
DM
20112015-07-01 David Malcolm <dmalcolm@redhat.com>
2012
2013 * docs/topics/types.rst (gcc_jit_context_new_union_type): Add
2014 documentation.
2015 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2016
c575221a
DM
20172015-07-01 David Malcolm <dmalcolm@redhat.com>
2018
2019 * docs/topics/contexts.rst (gcc_jit_context_set_bool_option):
2020 Clarify lack of lifetime requirements on (const char *) parameter.
2021 * docs/topics/expressions.rst
2022 (gcc_jit_context_new_string_literal): Likewise.
2023 (gcc_jit_context_new_global): Likewise.
2024 * docs/topics/functions.rst (gcc_jit_context_new_param): Likewise.
2025 (gcc_jit_context_new_function): Likewise.
2026 (gcc_jit_function_new_block): Likewise.
2027 (gcc_jit_block_add_comment): Likewise.
2028 * docs/topics/locations.rst (gcc_jit_context_new_location):
2029 Likewise.
2030 * docs/topics/types.rst (gcc_jit_context_new_field): Likewise.
2031 (gcc_jit_context_new_struct_type): Likewise.
2032 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2033
ec5d0088
DM
20342015-06-30 David Malcolm <dmalcolm@redhat.com>
2035
2036 * docs/cp/topics/functions.rst (Blocks): Add switch statements to
2037 list of ways to terminate a block.
2038 (gccjit::block::end_with_switch): Add function description.
2039 (gccjit::case_): Add class.
2040 (gccjit::context::new_case): Add function description.
2041 * docs/cp/topics/objects.rst: Add "case_" to class hierarchy.
2042 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_3): New.
2043 * docs/topics/functions.rst (Blocks): Add switch statements to
2044 list of ways to terminate a block.
2045 (gcc_jit_block_end_with_switch): Add function description.
2046 (gcc_jit_case): Add type.
2047 (gcc_jit_context_new_case): Add function description.
2048 (gcc_jit_case_as_object): Add function description.
2049 * docs/topics/objects.rst: Add gcc_jit_case to class hierarchy.
2050 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2051 * jit-common.h (gcc::jit::recording::case_): Add forward decl.
2052 (gcc::jit::playback::case_): Add forward decl.
2053 * jit-playback.c (add_case): New function.
2054 (gcc::jit::playback::block::add_switch): New function.
2055 * jit-playback.h (gcc::jit::playback::case_): New struct.
2056 (gcc::jit::playback::block::get_function): New method.
2057 (gcc::jit::playback::block::add_switch): New method.
2058 * jit-recording.c: Within namespace gcc::jit...
2059 (recording::context::new_case): New method.
2060 (recording::function::validate): Update for change to
2061 get_successor_blocks.
2062 (recording::block::end_with_switch): New method.
2063 (recording::block::get_successor_blocks): Update to support an
2064 arbitrary number of successor blocks.
2065 (recording::block::dump_edges_to_dot): Likewise.
2066 (memento_of_new_rvalue_from_const <int>::get_wide_int): New.
2067 (memento_of_new_rvalue_from_const <long>::get_wide_int): New.
2068 (memento_of_new_rvalue_from_const <double>::get_wide_int): New.
2069 (memento_of_new_rvalue_from_const <void *>::get_wide_int): New.
2070 (recording::statement::get_successor_blocks): Update to support an
2071 arbitrary number of successor blocks.
2072 (recording::conditional::get_successor_blocks): Likewise.
2073 (recording::jump::get_successor_blocks): Likewise.
2074 (recording::return_::get_successor_blocks): Likewise.
2075 (recording::case_::write_reproducer): New.
2076 (recording::case_::make_debug_string): New.
2077 (recording::switch_::switch_): New.
2078 (recording::switch_::replay_into): New.
2079 (recording::switch_::get_successor_blocks): New.
2080 (recording::switch_::make_debug_string): New.
2081 (recording::switch_::write_reproducer): New.
2082 * jit-recording.h: Within namespace gcc::jit::recording...
2083 (context::new_case): New.
2084 (rvalue::is_constant): New.
2085 (rvalue::get_wide_int): New.
2086 (block::end_with_switch): New.
2087 (block::get_successor_blocks): Update to support an arbitrary
2088 number of successor blocks.
2089 (memento_of_new_rvalue_from_const::is_constant): New.
2090 (memento_of_new_rvalue_from_const::get_wide_int): New.
2091 (statement::get_successor_blocks): Update to support an arbitrary
2092 number of successor blocks.
2093 (conditional::get_successor_blocks): Likewise.
2094 (jump::get_successor_blocks): Likewise.
2095 (return_::get_successor_blocks): Likewise.
2096 (case_): New subclass of memento.
2097 (switch_): New subclass of statement.
2098 * libgccjit++.h (gccjit::case_): New subclass of gccjit::object.
2099 (gccjit::context::new_case): New method.
2100 (gccjit::block::end_with_switch): New method.
2101 (gccjit::case_::case): New ctors.
2102 (gccjit::case_::get_inner_case): New method.
2103 * libgccjit.c: Include "typed-splay-tree.h"
2104 (struct gcc_jit_case): New.
2105 (gcc_jit_context_new_case): New function.
2106 (gcc_jit_case_as_object): New function.
2107 (valid_dest_for_switch): New function.
2108 (valid_case_for_switch): New function.
2109 (class api_call_validator): New class.
2110 (class case_range_validator): New class.
2111 (case_range_validator::case_range_validator): New.
2112 (case_range_validator::validate): New.
2113 (case_range_validator::case_compare): New.
2114 (case_range_validator::get_wide_int): new.
2115 (gcc_jit_block_end_with_switch): New.
2116 * libgccjit.h: Add gcc_jit_case to class hierarchy comment.
2117 (gcc_jit_case): New typedef.
2118 (gcc_jit_context_new_case): New function.
2119 (gcc_jit_case_as_object): New function.
2120 (gcc_jit_block_end_with_switch): New function.
2121 (LIBGCCJIT_HAVE_SWITCH_STATEMENTS): New.
2122 * libgccjit.map: Add gcc_jit_block_end_with_switch,
2123 gcc_jit_case_as_object and gcc_jit_context_new_case.
2124
6a3603e3
DM
21252015-06-30 David Malcolm <dmalcolm@redhat.com>
2126
2127 PR jit/66546
2128 * docs/cp/topics/contexts.rst
2129 (gccjit::context::set_bool_allow_unreachable_blocks): New.
2130 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_2): New.
2131 * docs/topics/contexts.rst (Options): Add notes discussing the
2132 transition from enums to entrypoints for new options.
2133 (gcc_jit_context_set_bool_allow_unreachable_blocks): New.
2134 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2135 * jit-common.h (gcc::jit::inner_bool_option): New enum.
2136 * jit-recording.c: Within namespace gcc::jit...
2137 (recording::context::context): Handle m_inner_bool_options.
2138 (recording::context::set_inner_bool_option): New.
2139 (inner_bool_option_reproducer_strings): New.
2140 (recording::context::log_all_options): Log the "inner" bool
2141 options.
2142 (recording::context::log_inner_bool_option): New.
2143 (recording::context::dump_reproducer_to_file): Write initializers
2144 for "inner" bool options.
2145 (recording::function::validate): Don't check for block
2146 reachability if INNER_BOOL_OPTION_ALLOW_UNREACHABLE_BLOCKS is set.
2147 * jit-recording.h: Within namespace gcc::jit...
2148 (recording::context::set_inner_bool_option): New.
2149 (recording::context::get_inner_bool_option): New.
2150 (recording::context::log_inner_bool_option): New.
2151 (recording::context::m_inner_bool_options): New.
2152 * libgccjit++.h
2153 (gccjit::context::set_bool_allow_unreachable_blocks): New.
2154 * libgccjit.c
2155 (gcc_jit_context_set_bool_allow_unreachable_blocks): New.
2156 * libgccjit.h: Add note about options present in the
2157 initial release of libgccjit.
2158 (gcc_jit_context_set_bool_allow_unreachable_blocks): New API
2159 entrypoint.
2160 (LIBGCCJIT_HAVE_gcc_jit_context_set_bool_allow_unreachable_blocks):
2161 New macro.
2162 * libgccjit.map (LIBGCCJIT_ABI_2): New, containing...
2163 (gcc_jit_context_set_bool_allow_unreachable_blocks): ...this new
2164 entrypoint.
2165
fa22c20d
DM
21662015-06-30 David Malcolm <dmalcolm@redhat.com>
2167
2168 PR jit/66628
2169 * docs/cp/topics/contexts.rst (Additional command-line options):
2170 New section.
2171 * docs/topics/compatibility.rst: New file.
2172 * docs/topics/contexts.rst (Additional command-line options): New
2173 section.
2174 * docs/topics/index.rst: Add compatibility.rst.
2175 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2176 * jit-playback.c (make_fake_args): Add call to
2177 append_command_line_options.
2178 * jit-recording.c: Within namespace gcc::jit...
2179 (recording::context::~context): Free the optnames within
2180 m_command_line_options.
2181 (recording::context::set_bool_option): Likewise.
2182 (recording::context::add_command_line_option): New method.
2183 (recording::context::append_command_line_options): New method.
2184 (recording::context::dump_reproducer_to_file): Add command-line
2185 options.
2186 * jit-recording.h: Within namespace gcc::jit...
2187 (recording::context::add_command_line_option): New method.
2188 (recording::context::append_command_line_options): New method.
2189 (recording::context::m_command_line_options): New field.
2190 * libgccjit++.h (gccjit::context::add_command_line_option): New
2191 method.
2192 * libgccjit.c (gcc_jit_context_add_command_line_option): New API
2193 entrypoint.
2194 * libgccjit.h (gcc_jit_context_add_command_line_option): New API
2195 entrypoint.
2196 (LIBGCCJIT_HAVE_gcc_jit_context_add_command_line_option): New
2197 macro.
2198 * libgccjit.map: Put existing symbols within LIBGCCJIT_ABI_0; add
2199 LIBGCCJIT_ABI_1 and gcc_jit_context_add_command_line_option.
2200
a6314e15
DM
22012015-06-30 David Malcolm <dmalcolm@redhat.com>
2202
2203 * jit-recording.c
2204 (gcc::jit::recording::context::dump_reproducer_to_file):
2205 Add pragma to generated reproducers to disable -Wunused-variable.
2206 Fix handling of NULL string options.
2207
adb6d84b
DM
22082015-06-30 David Malcolm <dmalcolm@redhat.com>
2209
2210 * docs/cp/topics/expressions.rst: Remove stray semicolon.
2211 * docs/cp/topics/functions.rst: Remove stray backslash.
2212 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2213
f0889939
AM
22142015-06-25 Andrew MacLeod <amacleod@redhat.com>
2215
2216 * dummy-frontend.c: Remove ipa-ref.h and plugin-api.h from include list.
2217 * jit-playback.c: Likewise.
2218
9cad7a76
AM
22192015-06-25 Andrew Macleod <amacleod@redhat.com>
2220
2221 * jit-common.h: Don't include alias.h.
2222
41571b55
DM
22232015-06-17 David Malcolm <dmalcolm@redhat.com>
2224
2225 * libgccjit.c (gcc_jit_lvalue_access_field): Verify that the field
2226 is for the correct struct.
2227 (gcc_jit_rvalue_access_field): Likewise.
2228
abb226c9
AM
22292015-06-17 Andrew MacLeod <amacleod@redhat.com>
2230
2231 * dummy-frontend.c: Do not include input.h, line-map.h or is-a.h.
2232 * jit-common.h: Likewise.
2233 * jit-playback.c: Likewise.
2234
bd93aa1a
DM
22352015-06-16 David Malcolm <dmalcolm@redhat.com>
2236
2237 PR jit/66539
2238 * jit-recording.c: Within namespace gcc::jit::recording::
2239 (rvalue::get_debug_string_parens): New function.
2240 (binary_op::make_debug_string): Update to mimic C precedence
2241 rules.
2242 (binary_op_precedence): New array.
2243 (binary_op::get_precedence): New function.
2244 (comparison::make_debug_string): Update to mimic C precedence
2245 rules.
2246 (comparison_precedence): New array.
2247 (comparison::get_precedence): New function.
2248 (cast::make_debug_string): Update to mimic C precedence rules.
2249 (call::make_debug_string): Likewise.
2250 (call_through_ptr::make_debug_string): Likewise.
2251 (array_access::make_debug_string): Likewise.
2252 (access_field_of_lvalue::make_debug_string): Likewise.
2253 (access_field_rvalue::make_debug_string): Likewise.
2254 (dereference_field_rvalue::make_debug_string): Likewise.
2255 (dereference_rvalue::make_debug_string): Likewise.
2256 (get_address_of_lvalue::make_debug_string): Likewise.
2257 * jit-recording.h: Within namespace gcc::jit::recording::
2258 (precedence): New enum.
2259 (rvalue::rvalue): Initialize field "m_parenthesized_string".
2260 (rvalue::get_debug_string_parens): New method.
2261 (rvalue::get_precedence): New pure virtual function.
2262 (rvalue::m_parenthesized_string): New field.
2263 (param::get_precedence): New function.
2264 (global::get_precedence): New function.
2265 (memento_of_new_rvalue_from_const::get_precedence): New function.
2266 (memento_of_new_string_literal::get_precedence): New function.
2267 (unary_op::get_precedence): New function.
2268 (binary_op::get_precedence): New function.
2269 (comparison::get_precedence): New function.
2270 (cast::get_precedence): New function.
2271 (call::get_precedence): New function.
2272 (call_through_ptr::get_precedence): New function.
2273 (array_access::get_precedence): New function.
2274 (access_field_of_lvalue::get_precedence): New function.
2275 (access_field_rvalue::get_precedence): New function.
2276 (dereference_field_rvalue::get_precedence): New function.
2277 (dereference_rvalue::get_precedence): New function.
2278 (get_address_of_lvalue::get_precedence): New function.
2279 (local::get_precedence): New function.
2280
83c1b80e
MK
22812015-06-09 Matthias Klose <doko@ubuntu.com>
2282
2283 * Make-lang.in (jit.install-common): Install headers using INSTALL_DATA.
2284
13fdf2e2
AM
22852015-06-08 Andrew MacLeod <amacleod@redhat.com>
2286
2287 * dummy-frontend.c : Adjust include files.
2288 * jit-common.h : Likewise.
2289 * jit-playback.c : Likewise.
2290
e4753451
DM
22912015-06-05 David Malcolm <dmalcolm@redhat.com>
2292
2293 * dummy-frontend.c
2294 (jit_langhook_post_compilation_parsing_cleanups): Remove.
2295 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): Remove
2296 * jit-playback.c (gcc::jit::playback::context::new_global): Add
2297 call to varpool_node::finalize_decl.
2298 (gcc::jit::playback::context::finalize_global_decls): Remove.
2299 * jit-playback.h
2300 (gcc::jit::playback::context::finalize_global_decls): Remove.
2301
e7547bc6
DM
23022015-06-05 David Malcolm <dmalcolm@redhat.com>
2303
2304 * dummy-frontend.c (jit_langhook_write_globals): Rename to...
2305 (jit_langhook_post_compilation_parsing_cleanups): ...this, and
2306 eliminate calls to finalize_compilation_unit and
2307 write_global_decls_2.
2308 (LANG_HOOKS_WRITE_GLOBALS): Rename to...
2309 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): ...this and
2310 redirect from jit_langhook_write_globals to
2311 jit_langhook_post_compilation_parsing_cleanups.
2312 * jit-playback.c
2313 (gcc::jit::playback::context::write_global_decls_1): Rename to...
2314 (gcc::jit::playback::context::finalize_global_decls): ...this.
2315 (gcc::jit::playback::context::write_global_decls_1): Delete.
2316 * jit-playback.h
2317 (gcc::jit::playback::context::write_global_decls_1): Rename to...
2318 (gcc::jit::playback::context::finalize_global_decls): ...this.
2319 (gcc::jit::playback::context::write_global_decls_1): Delete.
2320
ecb9f223
AM
23212015-06-04 Andrew MacLeod <amacleod@redhat.com>
2322
2323 * dummy-frontend.c: Adjust includes for restructured coretypes.h.
2324 * jit-common.h: Likewise.
2325 * jit-playback.c: Likewise.
2326
2637afb7
DM
23272015-05-12 David Malcolm <dmalcolm@redhat.com>
2328
2329 * jit-builtins.c: Include vec.h before target.h.
2330
46bf0b0a
JW
23312015-04-27 Jim Wilson <jim.wilson@linaro.org>
2332
2333 * Make-lang.in (jit.mostlyclean): Remove shared libraries and object
2334 files.
2335
51c5c6b5
DM
23362015-04-09 David Malcolm <dmalcolm@redhat.com>
2337
2338 PR jit/65691
2339 * docs/cp/topics/expressions.rst (Simple expressions): Fix copy
2340 and paste error in description of gccjit::context::one.
2341 * docs/topics/expressions.rst (Simple expressions): Likewise in
2342 description of gcc_jit_context_one.
2343 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2344
f40fd895
UB
23452015-03-13 Uros Bizjak <ubizjak@gmail.com>
2346
2347 * jit-recording.c (dump::write): Also check vasprintf return value.
2348 (recording::context::add_error_va): Ditto.
2349 (recording::string::from_printf): Ditto.
2350
18eb0d13
DM
23512015-03-13 David Malcolm <dmalcolm@redhat.com>
2352
2353 * docs/internals/index.rst (Packaging notes): New section.
2354 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2355
7ef96183
DM
23562015-03-05 David Malcolm <dmalcolm@redhat.com>
2357
2358 * docs/cp/intro/tutorial03.rst: Add missing arguments to
2359 gccjit::block::end_with_conditional call. Add on_true/on_false
2360 comments. Tweak the wording.
2361 * docs/intro/tutorial03.rst: Add missing arguments to
2362 gcc_jit_block_end_with_conditional call. Add some clarifying
2363 comments.
2364 * docs/topics/compilation.rst: Tweak the wording to avoid an
2365 ambiguous use of "this".
2366 * docs/topics/contexts.rst: Fix a typo.
2367 * docs/topics/expressions.rst (GCC_JIT_BINARY_OP_MINUS): Remove
2368 a stray backtick.
2369 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2370
56a9f6bc
TS
23712015-02-24 Thomas Schwinge <thomas@codesourcery.com>
2372
2373 PR libgomp/64625
2374 * jit-builtins.c (DEF_FUNCTION_TYPE_VAR_8)
2375 (DEF_FUNCTION_TYPE_VAR_12): Remove macros.
2376 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
2377 * jit-builtins.h (DEF_FUNCTION_TYPE_VAR_8)
2378 (DEF_FUNCTION_TYPE_VAR_12): Remove macros.
2379 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
2380
a4be4e91
DM
23812015-02-04 David Malcolm <dmalcolm@redhat.com>
2382
2383 PR jit/64257
2384 * docs/conf.py (html_theme): Change from 'pyramid'
2385 to 'sphinxdoc'.
2386
f435bff3
DM
23872015-02-04 David Malcolm <dmalcolm@redhat.com>
2388
2389 * docs/topics/contexts.rst (gcc_jit_context_acquire): Fix
2390 typo.
2391 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2392
0ed4f017
DM
23932015-02-03 David Malcolm <dmalcolm@redhat.com>
2394
2395 * jit-logging.h (gcc::jit::log_user::log): Make const.
2396 * jit-recording.c (gcc::jit::recording::context::set_str_option):
2397 Log the new value of the option.
2398 (gcc::jit::recording::context::set_int_option): Likewise.
2399 (gcc::jit::recording::context::set_bool_option): Likewise.
2400 (gcc::jit::recording::context::compile): Log the value of all
2401 options.
2402 (gcc::jit::recording::context::compile_to_file): Likewise.
2403 (gcc::jit::recording::context::log_all_options): New function.
2404 (gcc::jit::recording::context::log_str_option): New function.
2405 (gcc::jit::recording::context::log_int_option): New function.
2406 (gcc::jit::recording::context::log_bool_option): New function.
2407 * jit-recording.h (gcc::jit::recording::context::log_all_options):
2408 New function.
2409 (gcc::jit::recording::context::log_str_option): New function.
2410 (gcc::jit::recording::context::log_int_option): New function.
2411 (gcc::jit::recording::context::log_bool_option): New function.
2412 * docs/internals/test-hello-world.exe.log.txt: Update for above
2413 changes.
2414 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2415
2cb844ce
DM
24162015-02-03 David Malcolm <dmalcolm@redhat.com>
2417
2418 PR jit/64810
2419 * Make-lang.in (jit_OBJS): Add jit/jit-spec.o and gcc.o.
2420 (LIBGCCJIT_FILENAME): Add EXTRA_GCC_OBJS.
2421 * jit-playback.c: Include gcc.h.
2422 (gcc::jit::playback::context::compile): Move mutex acquisition
2423 to before the call to make_fake_args.
2424 (append_arg_from_driver): New function.
2425 (gcc::jit::playback::context::make_fake_args): On the first call,
2426 call into driver_get_configure_time_options to get configure-time
2427 default options and cache them. Add them to the args for
2428 toplev::main.
2429 * jit-spec.c: New source file.
2430 * docs/internals/test-hello-world.exe.log.txt: Update to reflect
2431 above changes.
2432 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2433
16a71c50
DM
24342015-02-02 David Malcolm <dmalcolm@redhat.com>
2435
2436 PR jit/64810
2437 * dummy-frontend.c (jit_langhook_type_for_mode): Support
2438 TYPE_MODE (long_long_integer_type_node).
2439
53c04ec9
DM
24402015-01-27 David Malcolm <dmalcolm@redhat.com>
2441
2442 * docs/internals/test-hello-world.exe.log.txt: Add example version
2443 lines.
2444 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2445 * jit-common.h (gcc::jit::dump::get_file): New accessor.
2446 * jit-logging.c: Include toplev.h.
2447 (gcc::jit::logger::logger): Log the GCC version.
2448 * jit-recording.c: Include toplev.h.
2449 (gcc:jit::recording::context::dump_reproducer_to_file): Log the
2450 GCC version.
2451
dc44ee3a
DM
24522015-01-26 David Malcolm <dmalcolm@redhat.com>
2453
2454 * docs/topics/compilation.rst (gcc_jit_result_get_code): Fix typo.
2455 * docs/topics/contexts.rst (gcc_jit_context_get_last_error): The
2456 error buffer is only valid until the next call to the context.
2457 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2458 * libgccjit.h (gcc_jit_context_get_first_error): Reword the
2459 comment to omit mention of compiling.
2460 (gcc_jit_context_get_last_error): The error buffer is only valid
2461 until the next call to the context.
2462
3349605d
DM
24632015-01-26 David Malcolm <dmalcolm@redhat.com>
2464
2465 PR jit/64708
2466 * config-lang.in (compilers): Drop "libgccjit.so".
2467
6fc2d0f3
DM
24682015-01-23 David Malcolm <dmalcolm@redhat.com>
2469
2470 PR jit/64721
2471 * jit-playback.c (gcc::jit::playback::context::compile): Construct
2472 toplev instances with init_signals=false.
2473
fdce7209
DM
24742015-01-19 David Malcolm <dmalcolm@redhat.com>
2475
2476 * docs/cp/topics/results.rst: Rename to...
2477 * docs/cp/topics/compilation.rst: ...this, and add section on
2478 ahead-of-time compilation.
2479 * docs/cp/topics/index.rst: Update for renaming of results.rst
2480 to compilation.rst.
2481 * docs/examples/emit-alphabet.bf: New file, a sample "brainf"
2482 script.
2483 * docs/examples/tut05-bf.c: New file, implementing a compiler
2484 for "brainf".
2485 * docs/internals/test-hello-world.exe.log.txt: Update to reflect
2486 changes to logger output.
2487 * docs/intro/index.rst: Add tutorial05.rst
2488 * docs/intro/tutorial05.rst: New file.
2489 * docs/topics/results.rst: Rename to...
2490 * docs/topics/compilation.rst: ...this, and add section on
2491 ahead-of-time compilation.
2492 * docs/topics/index.rst: Update for renaming of results.rst to
2493 compilation.rst.
2494 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2495 * jit-playback.c (gcc::jit::playback::context::compile): Convert
2496 return type from result * to void. Move the code to convert to
2497 dso and dlopen the result to a new pure virtual "postprocess"
2498 method.
2499 (gcc::jit::playback::compile_to_memory::compile_to_memory): New
2500 function.
2501 (gcc::jit::playback::compile_to_memory::postprocess): New
2502 function, based on playback::context::compile.
2503 (gcc::jit::playback::compile_to_file::compile_to_file): New
2504 function.
2505 (gcc::jit::playback::compile_to_file::postprocess): New function.
2506 (gcc::jit::playback::compile_to_file::copy_file): New function.
2507 (gcc::jit::playback::context::convert_to_dso): Move internals
2508 to...
2509 (gcc::jit::playback::context::invoke_driver): New method. Add
2510 "-shared" and "-c" options to driver's argv as needed.
2511 * jit-playback.h: Include "timevar.h".
2512 (gcc::jit::playback::context::compile): Convert return type from
2513 result * to void.
2514 (gcc::jit::playback::context::postprocess): New pure virtual
2515 function, making this an abstract base class.
2516 (gcc::jit::playback::context::get_tempdir): New accessor.
2517 (gcc::jit::playback::context::invoke_driver): New function.
2518 (class gcc::jit::playback::compile_to_memory): New subclass of
2519 playback::context.
2520 (class gcc::jit::playback::compile_to_file): Likewise.
2521 * jit-recording.c (gcc::jit::recording::context::compile): Use a
2522 playback::compile_to_memory, and extract its result.
2523 (gcc::jit::recording::context::compile_to_file): New function.
2524 * jit-recording.h (gcc::jit::recording::context::compile_to_file):
2525 New function.
2526 * libgccjit++.h (gccjit::context::compile_to_file): New method.
2527 * libgccjit.c (gcc_jit_context_compile): Update log message to
2528 clarify that this is an in-memory compile.
2529 (gcc_jit_context_compile_to_file): New function.
2530 * libgccjit.h (gcc_jit_context): Clarify that you can compile
2531 a context more than once, and that you can compile to a file
2532 as well as to memory.
2533 (gcc_jit_result): Clarify that this is the result of an
2534 in-memory compilation.
2535 (gcc_jit_context_compile): Clarify that you can compile, and that
2536 this is an in-memory compilation.
2537 (enum gcc_jit_output_kind): New enum.
2538 (gcc_jit_context_compile_to_file): New function.
2539 (gcc_jit_context_enable_dump): Clarify comment to cover both forms
2540 of compilation.
2541 * libgccjit.map (gcc_jit_context_compile_to_file): New API
2542 entrypoint.
2543 * notes.txt: Update to show the playback::context::postprocess
2544 virtual function.
2545
450e225b
DM
25462015-01-19 David Malcolm <dmalcolm@redhat.com>
2547
2548 * jit-recording.c
2549 (gcc::jit::recording::memento_of_new_string_literal::make_debug_string):
2550 Add missing format string.
2551
499de348
DM
25522015-01-16 David Malcolm <dmalcolm@redhat.com>
2553
2554 * Make-lang.in (lang_checks_parallelized): Add "check-jit".
2555 (check_jit_parallelize): Set this to an arbitrary value (10).
2556
e989e68d
JJ
25572015-01-16 Jakub Jelinek <jakub@redhat.com>
2558
2559 * jit-builtins.h (DEF_FUNCTION_TYPE_VAR_5): Fix spelling of
2560 last argument.
2561 (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12): Define and
2562 undef afterwards.
2563 * jit-builtins.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
2564 Likewise.
2565
179ed8f5
RS
25662015-01-15 Richard Sandiford <richard.sandiford@arm.com>
2567
2568 Update copyright years in docs/.
2569
96a87981
DM
25702015-01-15 David Malcolm <dmalcolm@redhat.com>
2571
2572 * libgccjit.c (gcc_jit_block_add_assignment_op): Check that the
2573 lvalue and the rvalue are of compatible type.
2574
86d0ac88
DM
25752015-01-13 David Malcolm <dmalcolm@redhat.com>
2576
2577 * docs/cp/topics/contexts.rst (Debugging): Add
2578 gccjit::context::dump_reproducer_to_file.
2579 * docs/internals/index.rst (Design notes): New section,
2580 discussing input validation and
2581 gcc_jit_context_dump_reproducer_to_file.
2582 * docs/topics/contexts.rst (Debugging): Add
2583 gcc_jit_context_dump_reproducer_to_file.
2584 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2585 * jit-common.h (gcc::jit::dump::get_context): New accessor.
2586 * jit-recording.c: Include "hash-map.h".
2587 Within namespace ::gcc::jit...
2588 (dump::write): Flush each line.
2589 (dump::make_location): Pass false for new param "created_by_user".
2590 (class allocator): New class.
2591 (allocator::~allocator): New function.
2592 (allocator::xstrdup_printf): New function.
2593 (allocator::xstrdup_printf_va): New function.
2594 (class reproducer): New subclass of dump.
2595 (reproducer::reproducer): New function.
2596 (reproducer::write_params): New function.
2597 (reproducer::write_args): New function.
2598 (reproducer::make_identifier): New function.
2599 (reproducer::make_tmp_identifier): New function.
2600 (reproducer::get_identifier): New pair of functions.
2601 (reproducer::get_identifier_as_rvalue): New function.
2602 (reproducer::get_identifier_as_lvalue): New function.
2603 (reproducer::get_identifier_as_type): New function.
2604 (reproducer::xstrdup_printf): New function.
2605 (recording::context::context): Initialize m_toplevel_ctxt.
2606 (recording::context::new_location): Add param created_by_user.
2607 (str_option_reproducer_strings): New table of strings.
2608 (int_option_reproducer_strings): Likewise.
2609 (bool_option_reproducer_strings): Likewise.
2610 (get_type_enum_strings): Likewise.
2611 (names_of_function_kinds): Likewise.
2612 (global_kind_reproducer_strings): Likewise.
2613 (unary_op_reproducer_strings): Likewise.
2614 (binary_op_reproducer_strings): Likewise.
2615 (comparison_reproducer_strings): Likewise.
2616 Within namespace ::gcc::jit::recording::...
2617 (context::dump_reproducer_to_file): New function.
2618 (string::write_reproducer): Likewise.
2619 (location::write_reproducer): Likewise.
2620 (type::access_as_type): Likewise.
2621 (memento_of_get_type::write_reproducer): Likewise.
2622 (memento_of_get_pointer::write_reproducer): Likewise.
2623 (memento_of_get_const::write_reproducer): Likewise.
2624 (memento_of_get_volatile::write_reproducer): Likewise.
2625 (array_type::write_reproducer): Likewise.
2626 (function_type::write_reproducer): Likewise.
2627 (function_type::write_deferred_reproducer): Likewise.
2628 (field::write_reproducer): Likewise.
2629 (struct_::access_as_type): Likewise.
2630 (struct_::write_reproducer): Likewise.
2631 (union_::write_reproducer): Likewise.
2632 (fields::write_reproducer): Likewise.
2633 (rvalue::access_as_rvalue): Likewise.
2634 (lvalue::access_as_rvalue): Likewise.
2635 (lvalue::access_as_lvalue): Likewise.
2636 (param::access_as_rvalue): Likewise.
2637 (param::access_as_lvalue): Likewise.
2638 (param::write_reproducer): Likewise.
2639 (function::write_reproducer): Likewise.
2640 (block::write_reproducer): Likewise.
2641 (global::write_reproducer): Likewise.
2642 (memento_of_new_rvalue_from_const <int>::write_reproducer):
2643 Likewise.
2644 (memento_of_new_rvalue_from_const <long>::write_reproducer):
2645 Likewise.
2646 (memento_of_new_rvalue_from_const <double>::write_reproducer):
2647 Likewise.
2648 (memento_of_new_rvalue_from_const <void *>::write_reproducer):
2649 Likewise.
2650 (memento_of_new_string_literal::write_reproducer): Likewise.
2651 (unary_op::write_reproducer): Likewise.
2652 (binary_op::write_reproducer): Likewise.
2653 (comparison::write_reproducer): Likewise.
2654 (cast::write_reproducer): Likewise.
2655 (call::write_reproducer): Likewise.
2656 (call_through_ptr::write_reproducer): Likewise.
2657 (array_access::write_reproducer): Likewise.
2658 (access_field_of_lvalue::write_reproducer): Likewise.
2659 (access_field_rvalue::write_reproducer): Likewise.
2660 (dereference_field_rvalue::write_reproducer): Likewise.
2661 (dereference_rvalue::write_reproducer): Likewise.
2662 (get_address_of_lvalue::write_reproducer): Likewise.
2663 (local::write_reproducer): Likewise.
2664 (eval::write_reproducer): Likewise.
2665 (assignment::write_reproducer): Likewise.
2666 (assignment_op::write_reproducer): Likewise.
2667 (comment::write_reproducer): Likewise.
2668 (conditional::write_reproducer): Likewise.
2669 (jump::write_reproducer): Likewise.
2670 (return_::write_reproducer): Likewise.
2671 * jit-recording.h (gcc::jit::reproducer): New forward declararion.
2672 Within namespace ::gcc::jit::recording::...
2673 (context::new_location): Add "created_by_user" param.
2674 (context::dump_reproducer_to_file): New method.
2675 (context::m_toplevel_ctxt): New field.
2676 (memento::write_reproducer): New pure virtual function.
2677 (memento::dyn_cast_location): New virtual function.
2678 (string::write_reproducer):
2679 (location::location): Add "created_by_user" param.
2680 (location::dyn_cast_location): New function.
2681 (location::created_by_user): New accessor.
2682 (location::write_reproducer): New function.
2683 (location::m_created_by_user): New field.
2684 (type::access_as_type): New virtual function.
2685 (location::write_reproducer): Likewise.
2686 (type::access_as_type): Likewise.
2687 (memento_of_get_type::write_reproducer): Likewise.
2688 (memento_of_get_pointer::write_reproducer): Likewise.
2689 (memento_of_get_const::write_reproducer): Likewise.
2690 (memento_of_get_volatile::write_reproducer): Likewise.
2691 (array_type::write_reproducer): Likewise.
2692 (function_type::write_reproducer): Likewise.
2693 (function_type::write_deferred_reproducer): Likewise.
2694 (field::write_reproducer): Likewise.
2695 (struct_::access_as_type): Likewise.
2696 (struct_::write_reproducer): Likewise.
2697 (union_::write_reproducer): Likewise.
2698 (union_::m_fields): Remove stray unused field.
2699 (fields::length): New accessor.
2700 (fields::get_field): New accessor.
2701 (fields::write_reproducer): New function.
2702 (rvalue::access_as_rvalue): Likewise.
2703 (lvalue::access_as_rvalue): Likewise.
2704 (lvalue::access_as_lvalue): Likewise.
2705 (param::access_as_rvalue): Likewise.
2706 (param::access_as_lvalue): Likewise.
2707 (param::write_reproducer): Likewise.
2708 (function::write_reproducer): Likewise.
2709 (block::write_reproducer): Likewise.
2710 (global::write_reproducer): Likewise.
2711 (memento_of_new_rvalue_from_const <HOST_TYPE>::write_reproducer):
2712 Likewise.
2713 (memento_of_new_string_literal::write_reproducer): Likewise.
2714 (unary_op::write_reproducer): Likewise.
2715 (binary_op::write_reproducer): Likewise.
2716 (comparison::write_reproducer): Likewise.
2717 (cast::write_reproducer): Likewise.
2718 (call::write_reproducer): Likewise.
2719 (call_through_ptr::write_reproducer): Likewise.
2720 (array_access::write_reproducer): Likewise.
2721 (access_field_of_lvalue::write_reproducer): Likewise.
2722 (access_field_rvalue::write_reproducer): Likewise.
2723 (dereference_field_rvalue::write_reproducer): Likewise.
2724 (dereference_rvalue::write_reproducer): Likewise.
2725 (get_address_of_lvalue::write_reproducer): Likewise.
2726 (local::write_reproducer): Likewise.
2727 (eval::write_reproducer): Likewise.
2728 (assignment::write_reproducer): Likewise.
2729 (assignment_op::write_reproducer): Likewise.
2730 (comment::write_reproducer): Likewise.
2731 (conditional::write_reproducer): Likewise.
2732 (jump::write_reproducer): Likewise.
2733 (return_::write_reproducer): Likewise.
2734 * libgccjit++.h (gccjit::context::dump_reproducer_to_file): New.
2735 * libgccjit.c (gcc_jit_context_new_location): Pass "true" as
2736 param "created_by_user".
2737 (gcc_jit_context_dump_reproducer_to_file): New API entrypoint.
2738 * libgccjit.h (gcc_jit_context_dump_reproducer_to_file): New API
2739 entrypoint.
2740 * libgccjit.map (gcc_jit_context_dump_reproducer_to_file): New API
2741 entrypoint.
2742
f6f2b019
DM
27432015-01-12 David Malcolm <dmalcolm@redhat.com>
2744
2745 * jit-recording.c (class gcc::jit::rvalue_usage_validator): New.
2746 (gcc::jit::rvalue_usage_validator::rvalue_usage_validator): New
2747 ctor.
2748 (gcc::jit::rvalue_usage_validator::visit): New function.
2749 (gcc::jit::recording::rvalue::verify_valid_within_stmt): New
2750 function.
2751 (gcc::jit::recording::rvalue::set_scope): New function.
2752 (gcc::jit::recording::function::function): Call set_scope on each
2753 param, issuing errors for any params that already have a function.
2754 (gcc::jit::recording::block::add_eval): Return the new statement;
2755 update the comment given that some error-checking now happens after
2756 this returns.
2757 (gcc::jit::recording::block::add_assignment): Likewise.
2758 (gcc::jit::recording::block::add_assignment_op): Likewise.
2759 (gcc::jit::recording::block::add_comment): Likewise.
2760 (gcc::jit::recording::block::end_with_conditional): Likewise.
2761 (gcc::jit::recording::block::end_with_jump): Likewise.
2762 (gcc::jit::recording::block::end_with_return): Likewise.
2763 (gcc::jit::recording::block::validate): Add a comment.
2764 (gcc::jit::recording::unary_op::visit_children): New function.
2765 (gcc::jit::recording::binary_op::visit_children): New function.
2766 (gcc::jit::recording::comparison::visit_children): New function.
2767 (gcc::jit::recording::cast::visit_children): New function.
2768 (gcc::jit::recording::call::visit_children): New function.
2769 (gcc::jit::recording::call_through_ptr::visit_children): New function.
2770 (gcc::jit::recording::array_access::visit_children): New function.
2771 (gcc::jit::recording::access_field_of_lvalue::visit_children): New
2772 function.
2773 (gcc::jit::recording::access_field_rvalue::visit_children): New
2774 function.
2775 (gcc::jit::recording::dereference_field_rvalue::visit_children):
2776 New function.
2777 (gcc::jit::recording::dereference_rvalue::visit_children): New
2778 function.
2779 (gcc::jit::recording::get_address_of_lvalue::visit_children): New
2780 function.
2781 * jit-recording.h: Within namespace gcc::jit::recording...
2782 (class rvalue_visitor): New.
2783 (rvalue::rvalue): Initialize m_scope.
2784 (rvalue::get_loc): New accessor.
2785 (rvalue::verify_valid_within_stmt): New function.
2786 (rvalue::visit_children): New pure virtual function.
2787 (rvalue::set_scope): New function.
2788 (rvalue::get_scope): New function.
2789 (rvalue::dyn_cast_param): New function.
2790 (rvalue::m_scope): New field.
2791 (param::visit_children): New empty function.
2792 (param::dyn_cast_param): New function.
2793 (function::get_loc): New function.
2794 (block::add_eval): Return the new statement.
2795 (block::add_assignment): Likewise.
2796 (block::add_assignment_op): Likewise.
2797 (block::add_comment): Likewise.
2798 (block::end_with_conditional): Likewise.
2799 (block::end_with_jump): Likewise.
2800 (block::end_with_return): Likewise.
2801 (global::visit_children): New function.
2802 (memento_of_new_rvalue_from_const<HOST_TYPE>::visit_children):
2803 New function.
2804 (memento_of_new_string_literal::visit_children): New function.
2805 (unary_op::visit_children): New function.
2806 (binary_op::visit_children): New function.
2807 (comparison::visit_children): New function.
2808 (cast::visit_children): New function.
2809 (call::visit_children): New function.
2810 (call_through_ptr::visit_children): New function.
2811 (array_access::visit_children): New function.
2812 (access_field_of_lvalue::visit_children): New function.
2813 (access_field_rvalue::visit_children): New function.
2814 (dereference_field_rvalue::visit_children): New function.
2815 (dereference_rvalue::visit_children): New function.
2816 (get_address_of_lvalue::visit_children): New function.
2817 (local::local): Call set_scope.
2818 (local::visit_children): New function.
2819 (statement::get_block): Make public.
2820 * libgccjit.c (RETURN_VAL_IF_FAIL_PRINTF5): New macro.
2821 (RETURN_NULL_IF_FAIL_PRINTF5): New macro.
2822 (gcc_jit_context_new_function): Verify that each param has
2823 not yet been used for creating another function.
2824 (gcc_jit_block_add_eval): After creating the stmt, verify
2825 that the rvalue expression tree is valid to use within it.
2826 (gcc_jit_block_add_assignment): Likewise for the lvalue and
2827 rvalue expression trees.
2828 (gcc_jit_block_add_assignment_op): Likewise.
2829 (gcc_jit_block_end_with_conditional): Likewise for the boolval
2830 expression tree.
2831 (gcc_jit_block_end_with_return): Likewise for the rvalue
2832 expression tree.
2833 (gcc_jit_block_end_with_void_return): Remove return of "void",
2834 now that block::end_with_return is now non-void.
2835
1c35cc2c
DM
28362015-01-12 David Malcolm <dmalcolm@redhat.com>
2837
2838 * jit-playback.c (gcc::jit::playback::context::read_dump_file):
2839 Add missing fclose on error-handling path.
2840
791cfef8
DM
28412015-01-12 David Malcolm <dmalcolm@redhat.com>
2842
2843 * docs/cp/topics/expressions.rst (Global variables): Add
2844 enum gcc_jit_global_kind param to gccjit::context::new_global.
2845 * docs/topics/expressions.rst (Global variables): Likewise.
2846 Document the new enum.
2847 * docs/topics/results.rst (Compilation results): Document
2848 globals-handling.
2849 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2850 * dummy-frontend.c (jit_langhook_write_globals): Call into the
2851 playback context's write_global_decls_1 and write_global_decls_2
2852 before and after calling symtab->finalize_compilation_unit ().
2853 * jit-playback.c: Include "debug.h".
2854 (gcc::jit::playback::context::new_global): Add "kind" param and
2855 use it to set TREE_PUBLIC, TREE_STATIC and DECL_EXTERNAL on the
2856 underlying VAR_DECL. Call varpool_node::get_create on the
2857 VAR_DECL, and add it to m_globals.
2858 (gcc::jit::playback::context::write_global_decls_1): New function.
2859 (gcc::jit::playback::context::write_global_decls_2): New function.
2860 * jit-playback.h (gcc::jit::playback::context::context): Call
2861 create on m_globals.
2862 (gcc::jit::playback::context::new_global): Add "kind" param.
2863 (gcc::jit::playback::context::write_global_decls_1): New function.
2864 (gcc::jit::playback::context::write_global_decls_2): New function.
2865 (gcc::jit::playback::context::m_globals): New field.
2866 * jit-recording.c (gcc::jit::recording::context::context):
2867 Initialize m_globals.
2868 (gcc::jit::recording::context::new_global): Add param "kind".
2869 Add the new global to m_globals.
2870 (gcc::jit::recording::context::dump_to_file): Dump the globals.
2871 (gcc::jit::recording::global::replay_into): Add field m_kind.
2872 (gcc::jit::recording::global::write_to_dump): New override.
2873 * jit-recording.h (gcc::jit::recording::context::new_global): Add
2874 param "kind".
2875 (gcc::jit::recording::context::m_globals): New field.
2876 (gcc::jit::recording::global::global): Add param kind.
2877 (gcc::jit::recording::global::write_to_dump): New override.
2878 (gcc::jit::recording::global::m_kind): New field.
2879 * jit-result.c (gcc::jit::result::get_global): New function.
2880 * jit-result.h (gcc::jit::result::get_global): New function.
2881 * libgccjit++.h (gccjit::context::new_global): Add "kind" param.
2882 * libgccjit.c (gcc_jit_context_new_global): Likewise.
2883 (gcc_jit_result_get_global): New API entrypoint.
2884 * libgccjit.h (gcc_jit_result_get_global): New API entrypoint.
2885 (enum gcc_jit_global_kind): New enum.
2886 (gcc_jit_context_new_global): API change: add "kind" param.
2887 * libgccjit.map (gcc_jit_result_get_global): New symbol.
2888
860e981c
DM
28892015-01-09 David Malcolm <dmalcolm@redhat.com>
2890
2891 * dummy-frontend.c: Include "fixed-value.h", "alias.h", "flags.h",
2892 "symtab.h", "inchash.h". Move include of "hash-set.h" much
2893 earlier.
2894 * jit-builtins.c: Remove redundant includes of "opts.h" and
2895 "tree.h".
2896 * jit-common.h: Include "hash-set.h", "input.h", "vec.h",
2897 "double-int.h", "alias.h", "flags.h", "symtab.h", "inchash.h".
2898 * jit-playback.c: Include "hashtab.h", "machmode.h", "input.h",
2899 "statistics.h", "vec.h", "double-int.h", "real.h",
2900 "fixed-value.h", "alias.h", "flags.h", "symtab.h", "tree-core.h",
2901 "inchash.h", "fold-const.h". Move include of "hash-set.h" to
2902 earlier.
2903 * jit-recording.c: Remove redundant includes of "opts.h" and
2904 "tree.h".
2905
ccce3b2a
DM
29062015-01-09 David Malcolm <dmalcolm@redhat.com>
2907
2908 * docs/cp/topics/expressions.rst (Simple expressions): Use
2909 ":c:type:" for C types. Document new overload of
2910 gcc::jit::context::new_rvalue.
2911 * docs/topics/expressions.rst (Simple expressions): Use
2912 ":c:type:" for C types. Document new entrypoint
2913 gcc_jit_context_new_rvalue_from_long.
2914 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2915 * jit-playback.c: Within namespace gcc::jit::playback...
2916 (context::new_rvalue_from_int): Eliminate in favor of...
2917 (context::new_rvalue_from_const <int>): ...this.
2918 (context::new_rvalue_from_double): Eliminate in favor of...
2919 (context::new_rvalue_from_const <double>): ...this.
2920 (context::new_rvalue_from_const <long>): New.
2921 (context::new_rvalue_from_ptr): Eliminate in favor of...
2922 (context::new_rvalue_from_const <void *>): ...this.
2923 * jit-playback.h: Within namespace gcc::jit::playback...
2924 (context::new_rvalue_from_int): Eliminate in favor of...
2925 (context::new_rvalue_from_const <HOST_TYPE>): ...this.
2926 (context::new_rvalue_from_double): Likewise.
2927 (context::new_rvalue_from_ptr): Likewise.
2928 * jit-recording.c: Within namespace gcc::jit::recording...
2929 (context::new_rvalue_from_int): Eliminate.
2930 (context::new_rvalue_from_double): Likewise.
2931 (context::new_rvalue_from_ptr): Likewise.
2932 (class memento_of_new_rvalue_from_const <int>):
2933 Add explicit specialization.
2934 (class memento_of_new_rvalue_from_const <long>):
2935 Likewise.
2936 (class memento_of_new_rvalue_from_const <double>):
2937 Likewise.
2938 (class memento_of_new_rvalue_from_const <void *>):
2939 Likewise.
2940 (memento_of_new_rvalue_from_int::replay_into):
2941 Generalize into...
2942 (memento_of_new_rvalue_from_const <HOST_TYPE>::replay_into):
2943 ...this...
2944 (memento_of_new_rvalue_from_double::replay_into):
2945 ...allowing this...
2946 (memento_of_new_rvalue_from_ptr::replay_into):
2947 ...and this to be deleted.
2948 (memento_of_new_rvalue_from_int::make_debug_string):
2949 Convert to...
2950 (memento_of_new_rvalue_from_const <int>::make_debug_string):
2951 ...this.
2952 (memento_of_new_rvalue_from_double::make_debug_string):
2953 Convert to...
2954 (memento_of_new_rvalue_from_const <double>::make_debug_string):
2955 ...this.
2956 (memento_of_new_rvalue_from_ptr::make_debug_string)
2957 Convert to...
2958 (memento_of_new_rvalue_from_const <void *>::make_debug_string):
2959 ...this.
2960 (memento_of_new_rvalue_from_const <long>::make_debug_string):
2961 New function.
2962 * jit-recording.h: Within namespace gcc::jit::recording...
2963 (context::new_rvalue_from_int): Eliminate.
2964 (context::new_rvalue_from_double): Likewise.
2965 (context::new_rvalue_from_ptr): Likewise, all in favor of...
2966 (context::new_rvalue_from_const <HOST_TYPE>): New family of
2967 methods.
2968 (class memento_of_new_rvalue_from_int): Eliminate.
2969 (class memento_of_new_rvalue_from_double): Likewise.
2970 (class memento_of_new_rvalue_from_ptr): Likewise.
2971 (class memento_of_new_rvalue_from_const <HOST_TYPE>): New family
2972 of rvalue subclasses.
2973 * libgccjit++.h (gccjit::context::new_rvalue): New overload, for
2974 "long".
2975 * libgccjit.c (gcc_jit_context_new_rvalue_from_int): Update for
2976 rewriting of recording::context::new_rvalue_from_int to
2977 recording::context::new_rvalue_from_const <int>.
2978 (gcc_jit_context_new_rvalue_from_long): New API entrypoint.
2979 (gcc_jit_context_new_rvalue_from_double): Update for
2980 rewriting of recording::context::new_rvalue_from_double to
2981 recording::context::new_rvalue_from_const <double>.
2982 (gcc_jit_context_new_rvalue_from_ptr): Update for
2983 rewriting of recording::context::new_rvalue_from_ptr to
2984 recording::context::new_rvalue_from_const <void *>.
2985 * libgccjit.h (gcc_jit_context_new_rvalue_from_long): New API
2986 entrypoint.
2987 * libgccjit.map (gcc_jit_context_new_rvalue_from_long): Likewise.
2988
d2286af3
DM
29892015-01-09 David Malcolm <dmalcolm@redhat.com>
2990
2991 PR jit/64206
2992 * docs/internals/test-hello-world.exe.log.txt: Update, the log now
2993 shows tempdir creation/cleanup.
2994 * docs/_build/texinfo/libgccjit.texi: Regenerate.
2995 * jit-logging.h (class gcc::jit::log_user): Add gcc::jit::tempdir
2996 to the list of subclasses in the comment.
2997 * jit-playback.c (gcc::jit::playback::context::context): Add a
2998 comment clarifying when the tempdir gets cleaned up.
2999 (gcc::jit::playback::context::compile): Pass the context's logger,
3000 if any, to the tempdir.
3001 (gcc::jit::playback::context::dlopen_built_dso): When creating the
3002 gcc::jit::result, if GCC_JIT_BOOL_OPTION_DEBUGINFO is set, hand
3003 over ownership of the tempdir to it.
3004 * jit-result.c: Include "jit-tempdir.h".
3005 (gcc::jit::result::result): Add tempdir param, saving it as
3006 m_tempdir.
3007 (gcc::jit::result::~result): Delete m_tempdir.
3008 * jit-result.h (gcc::jit::result::result): Add tempdir param.
3009 (gcc::jit::result::m_tempdir): New field.
3010 * jit-tempdir.c (gcc::jit::tempdir::tempdir): Add logger param;
3011 add JIT_LOG_SCOPE.
3012 (gcc::jit::tempdir::create): Add JIT_LOG_SCOPE to log entry/exit,
3013 and log m_path_template and m_path_tempdir.
3014 (gcc::jit::tempdir::~tempdir): Add JIT_LOG_SCOPE to log
3015 entry/exit, and log the unlink and rmdir calls.
3016 * jit-tempdir.h: Include "jit-logging.h".
3017 (class gcc::jit::tempdir): Make this be a subclass of log_user.
3018 (gcc::jit::tempdir::tempdir): Add logger param.
3019 * notes.txt: Update to show the two possible places where the
3020 tempdir can be cleaned up.
3021
7c8db13e
DM
30222015-01-08 David Malcolm <dmalcolm@redhat.com>
3023
3024 * libgccjit.h (struct gcc_jit_context): Rewrite the descriptive
3025 comment.
3026
303e1d56
DM
30272015-01-08 David Malcolm <dmalcolm@redhat.com>
3028
3029 * docs/topics/contexts.rst (Error-handling): Document new
3030 entrypoint gcc_jit_context_get_last_error.
3031 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3032 * jit-recording.c (gcc::jit::recording::context::context):
3033 Initialize new fields "m_last_error_str" and
3034 "m_owns_last_error_str".
3035 (gcc::jit::recording::context::~context): Clean up
3036 m_last_error_str, if needed.
3037 (gcc::jit::recording::context::add_error_va): Update
3038 m_last_error_str and m_owns_last_error_str, freeing the old
3039 value if appropriate.
3040 (gcc::jit::recording::context::get_last_error): New function.
3041 * jit-recording.h (gcc::jit::recording::context::get_last_error):
3042 New function.
3043 (gcc::jit::recording::context): New fields m_last_error_str and
3044 m_owns_last_error_str.
3045 * libgccjit.c (gcc_jit_context_get_last_error): New function.
3046 * libgccjit.h (gcc_jit_context_get_last_error): New declaration.
3047 * libgccjit.map (gcc_jit_context_get_last_error): New function.
3048
eb4c16eb
DM
30492015-01-08 David Malcolm <dmalcolm@redhat.com>
3050
3051 * Make-lang.in (jit_OBJS): Add jit/jit-logging.o.
3052 * docs/internals/index.rst (Overview of code structure): Mention
3053 gcc_jit_context_set_logfile, and embed the example logfile.
3054 * docs/internals/test-hello-world.exe.log.txt: New file: example
3055 of a logfile.
3056 * docs/topics/contexts.rst (Debugging): Add documentation
3057 for gcc_jit_context_set_logfile.
3058 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3059 * dummy-frontend.c: Include "jit-logging.h".
3060 (jit_langhook_init): Assert that there is an active playback
3061 context. If it has a logger, log entry/exit to this function.
3062 (jit_langhook_write_globals): Likewise.
3063 * jit-common.h (gcc::jit::logger): New forward declaration.
3064 * jit-logging.c: New file.
3065 * jit-logging.h: New file.
3066 * jit-playback.c: Include "jit-logging.h".
3067 (gcc::jit::playback::context::context): Initialize the log_user
3068 base class from the recording context's logger (if any). Use
3069 JIT_LOG_SCOPE to log entry/exit from the function body.
3070 (gcc::jit::playback::context::~context): Use JIT_LOG_SCOPE to
3071 log entry/exit from the function body.
3072 (gcc::jit::playback::build_stmt_list): Likewise.
3073 (gcc::jit::playback::function::postprocess): Likewise.
3074 (gcc::jit::playback::context::compile): Likewise. Log the
3075 entry/exit to toplev::main and toplev::finalize. Log the
3076 fake argv passed to toplev::main.
3077 (gcc::jit::playback::context::acquire_mutex): Use JIT_LOG_SCOPE to
3078 log entry/exit from the function body.
3079 (gcc::jit::playback::context::release_mutex): Likewise.
3080 (gcc::jit::playback::context::make_fake_args): Likewise.
3081 (gcc::jit::playback::context::extract_any_requested_dumps):
3082 Likewise.
3083 (gcc::jit::playback::context::convert_to_dso): Likewise. Also,
3084 log the arguments that the driver is invoked with.
3085 (gcc::jit::playback::context::dlopen_built_dso): Likewise. Pass
3086 the logger to the result object.
3087 (gcc::jit::playback::context::replay): Use JIT_LOG_SCOPE to
3088 log entry/exit from the function body.
3089 (gcc::jit::playback::context::dump_generated_code): Likewise.
3090 (gcc::jit::playback::context::handle_locations): Likewise.
3091 * jit-playback.h (gcc::jit::playback::context): Make this be
3092 a subclass of gcc::jit::log_user.
3093 * jit-recording.c: Include "jit-logging.h".
3094 (gcc::jit::recording::context::context: Initialize the logger to
3095 NULL for root contexts, or to the parent's logger for child
3096 contexts.
3097 (gcc::jit::recording::context::~context): Use JIT_LOG_SCOPE to
3098 log entry/exit from the function body.
3099 (gcc::jit::recording::context::replay_into): Likewise.
3100 (gcc::jit::recording::context::disassociate_from_playback):
3101 Likewise.
3102 (gcc::jit::recording::context::compile): Likewise.
3103 (recording::context::add_error_va): Likewise. Also, log the
3104 error.
3105 (gcc::jit::recording::context::validate): Use JIT_LOG_SCOPE to
3106 log entry/exit from the function body.
3107 * jit-recording.h: Include "jit-logging.h".
3108 (gcc::jit::recording::context): Make this be a subclass of
3109 gcc::jit::log_user.
3110 * jit-result.c: Include "jit-common.h" and "jit-logging.h".
3111 (gcc::jit::result::result): Add logger param, recording it.
3112 Use JIT_LOG_SCOPE to log entry/exit from the function body.
3113 (gcc::jit::result::~result(): Use JIT_LOG_SCOPE to
3114 log entry/exit from the function body.
3115 (gcc::jit::result::get_code): Likewise.
3116 * jit-result.h (gcc::jit::result): Make this be a subclass of
3117 gcc::jit::log_user.
3118 (gcc::jit::result::result): Add logger parameter.
3119 * libgccjit++.h (gccjit::context::set_logfile): New function.
3120 * libgccjit.c: Include "jit-logging.h".
3121 (gcc_jit_context_acquire): Log the context.
3122 (gcc_jit_context_release): Use JIT_LOG_FUNC to
3123 log entry/exit from the function body, and log the context.
3124 (gcc_jit_context_new_child_context): Likewise, logging both
3125 contexts.
3126 (gcc_jit_context_new_location): Use JIT_LOG_FUNC to
3127 log entry/exit from the function body.
3128 (gcc_jit_context_get_type): Likewise.
3129 (gcc_jit_context_get_int_type): Likewise.
3130 (gcc_jit_context_new_array_type): Likewise.
3131 (gcc_jit_context_new_field): Likewise.
3132 (gcc_jit_context_new_struct_type): Likewise.
3133 (gcc_jit_context_new_opaque_struct): Likewise.
3134 (gcc_jit_struct_set_fields): Likewise.
3135 (gcc_jit_context_new_union_type): Likewise.
3136 (gcc_jit_context_new_function_ptr_type): Likewise.
3137 (gcc_jit_context_new_param): Likewise.
3138 (gcc_jit_context_new_function): Likewise.
3139 (gcc_jit_context_get_builtin_function): Likewise.
3140 (gcc_jit_function_get_param): Likewise.
3141 (gcc_jit_function_dump_to_dot): Likewise.
3142 (gcc_jit_function_new_block): Likewise.
3143 (gcc_jit_context_new_global): Likewise.
3144 (gcc_jit_context_new_rvalue_from_int): Likewise.
3145 (gcc_jit_context_zero): Likewise.
3146 (gcc_jit_context_one): Likewise.
3147 (gcc_jit_context_new_rvalue_from_double): Likewise.
3148 (gcc_jit_context_new_rvalue_from_ptr): Likewise.
3149 (gcc_jit_context_null): Likewise.
3150 (gcc_jit_context_new_string_literal): Likewise.
3151 (gcc_jit_context_new_unary_op): Likewise.
3152 (gcc_jit_context_new_binary_op): Likewise.
3153 (gcc_jit_context_new_comparison): Likewise.
3154 (gcc_jit_context_new_call): Likewise.
3155 (gcc_jit_context_new_call_through_ptr): Likewise.
3156 (gcc_jit_context_new_cast): Likewise.
3157 (gcc_jit_context_new_array_access): Likewise.
3158 (gcc_jit_lvalue_access_field): Likewise.
3159 (gcc_jit_rvalue_access_field): Likewise.
3160 (gcc_jit_rvalue_dereference_field): Likewise.
3161 (gcc_jit_rvalue_dereference): Likewise.
3162 (gcc_jit_lvalue_get_address): Likewise.
3163 (gcc_jit_function_new_local): Likewise.
3164 (gcc_jit_block_add_eval): Likewise.
3165 (gcc_jit_block_add_assignment): Likewise.
3166 (gcc_jit_block_add_assignment_op): Likewise.
3167 (gcc_jit_block_end_with_conditional): Likewise.
3168 (gcc_jit_block_add_comment): Likewise.
3169 (gcc_jit_block_end_with_jump): Likewise.
3170 (gcc_jit_block_end_with_return): Likewise.
3171 (gcc_jit_block_end_with_void_return): Likewise.
3172 (gcc_jit_context_set_str_option): Likewise.
3173 (gcc_jit_context_set_int_option): Likewise.
3174 (gcc_jit_context_set_bool_option): Likewise.
3175 (gcc_jit_context_enable_dump): Likewise.
3176 (gcc_jit_context_compile): Likewise. Also log the context,
3177 and the result.
3178 (gcc_jit_context_dump_to_file): Likewise.
3179 (gcc_jit_context_set_logfile): New function.
3180 (gcc_jit_context_get_first_error): Use JIT_LOG_FUNC to
3181 log entry/exit from the function body.
3182 (gcc_jit_result_get_code): Likewise. Also log the fnname)
3183 and the ptr to be returned.
3184 (gcc_jit_result_release): Likewise. Also log the result.
3185 * libgccjit.h: Include <stdio.h>, since we need FILE *.
3186 (gcc_jit_context_set_logfile): New declaration.
3187 * libgccjit.map (gcc_jit_context_set_logfile): New.
3188
c211cd23
DM
31892015-01-07 David Malcolm <dmalcolm@redhat.com>
3190
3191 * jit-recording.h (gcc::jit::recording::type::is_void): New
3192 virtual function.
3193 (gcc::jit::recording::memento_of_get_type::is_void): New
3194 function, overriding default implementation.
3195 * libgccjit.c (gcc_jit_rvalue_dereference): Verify that
3196 the underlying type is not "void".
3197
18146f45
DM
31982015-01-07 David Malcolm <dmalcolm@redhat.com>
3199
3200 * docs/topics/expressions.rst (Unary Operations): Add
3201 GCC_JIT_UNARY_OP_ABS.
3202 * jit-playback.c (gcc::jit::playback::context::new_unary_op):
3203 Likewise.
3204 * jit-recording.c (unary_op_strings): Likewise.
3205 * libgccjit.c (gcc_jit_context_new_unary_op): Update checking
3206 of "op" to reflect addition of GCC_JIT_UNARY_OP_ABS.
3207 * libgccjit.h (enum gcc_jit_unary_op): Add GCC_JIT_UNARY_OP_ABS.
3208 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3209
11af98ff
DM
32102015-01-07 David Malcolm <dmalcolm@redhat.com>
3211
3212 * jit-recording.h (gcc::jit::recording::memento_of_get_type): Fix
3213 typo in comment.
3214
433d16df
DM
32152015-01-07 David Malcolm <dmalcolm@redhat.com>
3216
3217 * TODO.rst (Test suite): Remove item about running C++ testcases.
3218 * docs/internals/index.rst (Working on the JIT library): Add
3219 "c++" to the enabled languages in the suggested "configure"
3220 invocation, and add a description of why this is necessary.
3221 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3222
50bb6c8e
DM
32232015-01-07 David Malcolm <dmalcolm@redhat.com>
3224
3225 * docs/internals/index.rst: Update to reflect that built
3226 testcases are now test-foo.c.exe, rather than test-foo.exe.
3227 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3228
1e3b6a3d
JJ
32292015-01-05 Jakub Jelinek <jakub@redhat.com>
3230
3231 Update copyright years.
3232
e8af59bc
DM
32332014-12-19 David Malcolm <dmalcolm@redhat.com>
3234
3235 * jit-playback.c (gcc::jit::playback::context::build_cast): In
3236 case BOOLEAN_TYPE, don't assume that the source expression is
3237 of type "int".
3238
5afd44e3
DM
32392014-12-19 David Malcolm <dmalcolm@redhat.com>
3240
3241 * jit-recording.c (gcc::jit::recording::context::context): When
3242 copying string options from a parent context, take a copy of the
3243 underlying buffers, rather than simply copying the pointer.
3244
1f0858d7
DM
32452014-12-19 David Malcolm <dmalcolm@redhat.com>
3246
3247 * jit-recording.c (gcc::jit::recording::context::set_str_option):
3248 Handle NULL.
3249
35291c7d
DM
32502014-12-11 David Malcolm <dmalcolm@redhat.com>
3251
3252 * docs/cp/topics/contexts.rst (gccjit::context::set_str_option):
3253 Document new function.
3254 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3255
7b31ff5e
DM
32562014-12-10 Ulrich Drepper <drepper@gmail.com>
3257
3258 Minor interface cleanups of libgccjit
3259 * jit-playback.c (convert_to_dso): Use auto_vec instead
3260 of automatic array to build up command line.
3261 * jit-recording.c (recording::context::set_str_option):
3262 Make copy of the string.
3263 (recording::context::~context): Free string options.
3264 * jit-recording.h (recording::context): Adjust type
3265 of m_str_options member.
3266 * libgccjit.h: Adjust comment about
3267 gcc_jit_context_set_str_option parameter being used after
3268 the call.
3269 Update comment now that all interfaces are copy strings
3270 if necessary.
3271 * libgccjit++.h (gccjit::context): Add set_str_option
3272 member function.
3273
29df5715
DM
32742014-12-10 David Malcolm <dmalcolm@redhat.com>
3275
3276 * docs/cp/index.rst: New file.
3277 * docs/cp/intro/index.rst: New file.
3278 * docs/cp/intro/tutorial01.rst: New file.
3279 * docs/cp/intro/tutorial02.rst: New file.
3280 * docs/cp/intro/tutorial03.rst: New file.
3281 * docs/cp/intro/tutorial04.rst: New file.
3282 * docs/cp/topics/contexts.rst: New file.
3283 * docs/cp/topics/expressions.rst: New file.
3284 * docs/cp/topics/functions.rst: New file.
3285 * docs/cp/topics/index.rst: New file.
3286 * docs/cp/topics/locations.rst: New file.
3287 * docs/cp/topics/objects.rst: New file.
3288 * docs/cp/topics/results.rst: New file.
3289 * docs/cp/topics/types.rst: New file.
3290 * docs/examples/tut01-hello-world.cc: New file.
3291 * docs/examples/tut02-square.c: Fix missing newline in output.
3292 * docs/examples/tut02-square.cc: New file.
3293 * docs/examples/tut03-sum-of-squares.cc: New file.
3294 * docs/examples/tut04-toyvm/toyvm.cc: New file.
3295 * docs/index.rst: Move summary to above the table of contents.
3296 Add text about the C vs C++ APIs.
3297 * docs/topics/contexts.rst: Fix a typo.
3298
3299 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3300 * docs/_build/texinfo/factorial1.png: New file.
3301 * docs/_build/texinfo/sum-of-squares1.png: New file.
3302
5cd614ce
DM
33032014-12-09 David Malcolm <dmalcolm@redhat.com>
3304
3305 * docs/examples/tut04-toyvm/toyvm.c (toyvm_function_compile): Move
3306 logic for determine "funcname" to new function...
3307 (get_function_name): ...here, adding logic to skip any leading
3308 path from the filename.
3309 (toyvm_function_parse): Use the filename for fn_filename, rather
3310 than "name", so that the debugger can locate the source .toy
3311 file.
3312 (toyvm_function_parse): Don't fclose a NULL FILE *.
3313
2712de78
DM
33142014-12-09 David Malcolm <dmalcolm@redhat.com>
3315
3316 PR jit/63854
3317 * docs/internals/index.rst (Running under valgrind): New
3318 subsection.
3319 (docs/_build/texinfo/libgccjit.texi): Regenerate.
3320
d1e5f2c7
DM
33212014-12-09 David Malcolm <dmalcolm@redhat.com>
3322
92a285c1 3323 PR jit/64206
d1e5f2c7
DM
3324 * Make-lang.in (jit_OBJS): Add jit/jit-tempdir.o.
3325 * jit-common.h (gcc::jit::tempdir): New forward decl.
3326 * jit-playback.c: Include jit-tempdir.h.
3327 (gcc::jit::playback::context::context): Initialize m_tempdir.
3328 (gcc::jit::playback::context::~context): Move tempdir
3329 cleanup to new file jit-tempdir.c
3330 (make_tempdir_path_template): Move to new file jit-tempdir.c.
3331 (gcc::jit::playback::context::compile): Move tempdir creation
3332 to new tempdir object in new file jit-tempdir.c.
3333 (gcc::jit::playback::context::make_fake_args): Get path from
3334 tempdir object rather than from member data.
3335 (gcc::jit::playback::context::convert_to_dso): Likewise.
3336 (gcc::jit::playback::context::dlopen_built_dso): Likewise.
3337 (gcc::jit::playback::context::dump_generated_code): Likewise.
3338 (gcc::jit::playback::context::get_path_c_file): New function.
3339 (gcc::jit::playback::context::get_path_s_file): New function.
3340 (gcc::jit::playback::context::get_path_so_file): New function.
3341 * jit-playback.h (gcc::jit::playback::context::get_path_c_file):
3342 New function.
3343 (gcc::jit::playback::context::get_path_s_file): New function.
3344 (gcc::jit::playback::context::get_path_so_file): New function.
3345 (gcc::jit::playback::context): Move fields "m_path_template",
3346 "m_path_tempdir", "m_path_c_file", "m_path_s_file",
3347 "m_path_so_file" to new jit::tempdir class; add field "m_tempdir".
3348 * jit-tempdir.c: New file.
3349 * jit-tempdir.h: New file.
3350
38771e4e
DM
33512014-12-09 David Malcolm <dmalcolm@redhat.com>
3352
3353 * jit-playback.c (gcc::jit::playback::context::compile): Acquire the
3354 mutex here, immediately before using toplev, and release it here, on
3355 each exit path after acquisition.
3356 (jit_mutex): Move this variable here, from jit-recording.c.
3357 (gcc::jit::playback::context::acquire_mutex): New function, based on
3358 code in jit-recording.c.
3359 (gcc::jit::playback::context::release_mutex): Likewise.
3360 * jit-playback.h (gcc::jit::playback::context::acquire_mutex): New
3361 function.
3362 (gcc::jit::playback::context::release_mutex): New function.
3363 * jit-recording.c (jit_mutex): Move this variable to jit-playback.c.
3364 (gcc::jit::recording::context::compile): Move mutex-handling from
3365 here into jit-playback.c's gcc::jit::playback::context::compile.
3366 * notes.txt: Update to show the new locations of ACQUIRE_MUTEX
3367 and RELEASE_MUTEX.
3368
38f4f641
DM
33692014-12-09 David Malcolm <dmalcolm@redhat.com>
3370
3371 * jit-playback.c (gcc::jit::playback::context::compile): Move the
3372 dlopen code into...
3373 (gcc::jit::playback::context::dlopen_built_dso): ...this new
3374 function.
3375 * jit-playback.h (gcc::jit::playback::context::dlopen_built_dso):
3376 New function.
3377
82e0c914
DM
33782014-12-09 David Malcolm <dmalcolm@redhat.com>
3379
3380 PR jit/64166
3381 * docs/topics/contexts.rst (Debugging): Add description of
3382 gcc_jit_context_enable_dump.
3383 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3384 * jit-playback.c: Include context.h.
3385 (class auto_argvec): New class.
3386 (auto_argvec::~auto_argvec): New function.
3387 (gcc::jit::playback::context::compile): Convert fake_args to be
3388 an auto_argvec, so that it can contain dynamically-allocated
3389 strings. Construct a vec of all requested dumps, and pass it to
3390 make_fake_args. Extract requested dumps between the calls to
3391 toplev::main and toplev::finalize.
3392 (gcc::jit::playback::context::make_fake_args): Convert param
3393 "argvec" to be a vec <char *>, and gain a "requested_dumps"
3394 param. Convert to dynamically-allocated arg strings by converting
3395 ADD_ARG to take a copy of the arg, and add ADD_ARG_TAKE_OWNERSHIP
3396 for args that are already a copy. Add args for all requested dumps.
3397 (gcc::jit::playback::context::extract_any_requested_dumps): New
3398 function.
3399 (gcc::jit::playback::context::read_dump_file): New function.
3400 * jit-playback.h (gcc::jit::playback::context::make_fake_args):
3401 Convert param "argvec" to be a vec <char *>, and gain a
3402 "requested_dumps" param.
3403 (gcc::jit::playback::context::extract_any_requested_dumps): New
3404 function.
3405 (gcc::jit::playback::context::read_dump_file): New function.
3406 * jit-recording.c (gcc::jit::recording::context::enable_dump): New
3407 function.
3408 (gcc::jit::recording::context::get_all_requested_dumps): New
3409 function.
3410 * jit-recording.h (gcc::jit::recording::requested_dump): New
3411 struct.
3412 (gcc::jit::recording::context::enable_dump): New function.
3413 (gcc::jit::recording::context::get_all_requested_dumps): New
3414 function.
3415 (gcc::jit::recording::context::m_requested_dumps): New field.
3416 * libgccjit.c (gcc_jit_context_enable_dump): New API entrypoint.
3417 * libgccjit.h (gcc_jit_context_enable_dump): New API entrypoint.
3418 * libgccjit.map (gcc_jit_context_enable_dump): New API entrypoint.
3419
53b730ff
DM
34202014-12-08 David Malcolm <dmalcolm@redhat.com>
3421
3422 * libgccjit++.h: Indent the forward declarations of the classes to
3423 show the inheritance hierarchy.
3424
0f379445
DM
34252014-12-08 David Malcolm <dmalcolm@redhat.com>
3426
3427 * notes.txt: Show the beginning and ending of
3428 recording::context::compile vs playback::context::compile. Show
3429 the creation and unlinking of the tempdir. Show toplev::finalize.
3430 Move "RELEASE MUTEX" to the correct location. Show
3431 gcc_jit_result_release, and indicate where the
3432 dlopen/dlsym/dlclose occur.
3433
81ba15f1
DM
34342014-12-01 David Malcolm <dmalcolm@redhat.com>
3435
3436 * docs/examples/tut02-square.c (main): Release the context
3437 earlier, to show that this is possible. Update error-handling
3438 to avoid a double-release of the context, and to avoid
3439 releasing a NULL result.
3440 * docs/intro/tutorial02.rst: Discuss gcc_jit_context_release.
3441 * docs/topics/functions.rst (GCC_JIT_FUNCTION_EXPORTED): Emphasize
3442 * docs/topics/results.rst (gcc_jit_result): Mention that this
3443 controls the lifetimes of machine code functions.
3444 (gcc_jit_result_get_code): Spell out the requirements for this
3445 to succeed, and the lifetime of the result.
3446 (gcc_jit_result_release): Mention that this invalidates any code
3447 that was obtained from the result.
3448 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3449
e250f0dc
DM
34502014-12-01 David Malcolm <dmalcolm@redhat.com>
3451
3452 PR jit/64018
3453 * docs/intro/tutorial02.rst: Spell out lifetime of generated code.
3454 Add description of error-handling, taken in part from...
3455 * docs/topics/contexts.rst (Error-handling): Expand, and move some
3456 content to tutorial02.rst.
3457 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3458
eeafb319
DM
34592014-12-01 David Malcolm <dmalcolm@redhat.com>
3460
3461 PR jit/64020
3462 * docs/topics/types.rst (Standard types) Add new enum values to
3463 the table of enum gcc_jit_types: GCC_JIT_TYPE_COMPLEX_FLOAT,
3464 GCC_JIT_TYPE_COMPLEX_DOUBLE, GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE.
3465 Widen the left-hand column so that
3466 GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE will fit.
3467 * docs/_build/texinfo/libgccjit.texi: Regenerate.
3468
3469 * jit-builtins.c: Include stringpool.h and jit-playback.h.
3470 Move everything out of the gcc::jit::recording namespace into
3471 just gcc::jit.
3472 (struct builtin_data): Add fields "fnclass", "attr", and
3473 "implicit_p".
3474 (DEF_BUILTIN): Update macro so populate the new fields.
3475 (builtins_manager::builtins_manager): Update for move out of
3476 recording namespace. Initialize the m_attributes array.
3477 (builtins_manager::get_builtin_function): Likewise.
3478 (builtins_manager::get_builtin_function_by_id): New function.
3479 (builtins_manager::make_builtin_function): Update for move out of
3480 recording namespace. Add fix for PR jit/64020 by detecting
3481 specific builtin ids and having them ensure that builtins for
3482 other ids are created as necessary.
3483 (builtins_manager::get_type): Update for move out of recording
3484 namespace.
3485 (builtins_manager::make_type): Likewise. Add some missing
3486 #undefs.
3487 (builtins_manager::make_primitive_type): Update for move out of
3488 recording namespace. Implement the three BT_COMPLEX_ cases and
3489 BT_DOUBLE_PTR.
3490 (builtins_manager::make_fn_type): Update for move out of recording
3491 namespace.
3492 (builtins_manager::make_ptr_type): Likewise.
3493 (builtins_manager::finish_playback): New function.
3494 (builtins_manager::get_class): New function.
3495 (builtins_manager::implicit_p): New function.
3496 (builtins_manager::get_attrs_tree): Two new functions.
3497 (builtins_manager::make_attrs_tree): New function.
3498
3499 * jit-builtins.h: Move everything out of the gcc::jit::recording
3500 namespace into just gcc::jit.
3501 (enum built_in_attribute): New.
3502 (builtins_manager::builtins_manager): Update decl for namespace
3503 change.
3504 (builtins_manager::get_builtin_function): Likewise.
3505 (builtins_manager::get_class): New.
3506 (builtins_manager::implicit_p): New.
3507 (builtins_manager::get_attrs_tree): Two new functions.
3508 (builtins_manager::make_attrs_tree): New function.
3509 (builtins_manager::finish_playback): New.
3510 (builtins_manager::get_builtin_function_by_id): New.
3511 (builtins_manager::make_builtin_function): Update decl for
3512 namespace change.
3513 (builtins_manager::get_type): Likewise.
3514 (builtins_manager::make_type): Likewise.
3515 (builtins_manager::make_primitive_type): Likewise.
3516 (builtins_manager::make_fn_type): Likewise.
3517 (builtins_manager::make_ptr_type): Likewise.
3518 (builtins_manager): Likewise for fields. Add new field
3519 "m_attributes".
3520
3521 * jit-common.h (NUM_GCC_JIT_TYPES): Update.
3522 (builtins_manager): Update forward decl to reflect namespace
3523 change.
3524
3525 * jit-playback.c: Include attribs.h and jit-builtins.h.
3526 (gcc::jit::playback::context::get_tree_node_for_type): Add cases
3527 for the new COMPLEX_ types.
3528 (gcc::jit::playback::context::new_function): If creating a
3529 builtin, set the DECL_BUILT_IN_CLASS and attributes on the fndecl,
3530 and call set_builtin_decl.
3531 (gcc::jit::playback::context::replay): If we have a
3532 builtins_manager, call its finish_playback method when we're done.
3533
3534 * jit-playback.h:
3535 (gcc::jit::playback::context::get_builtins_manager): New function.
3536
3537 * jit-recording.c
3538 (gcc::jit::recording::context::get_builtins_manager): New function.
3539 (gcc::jit::recording::get_builtin_function): Use
3540 get_builtins_manager, in case we're a child context.
3541 (gcc::jit::recording::memento_of_get_type::dereference): Add the
3542 COMPLEX_ types.
3543 (gcc::jit::recording::memento_of_get_type::is_int): Likewise.
3544 (gcc::jit::recording::memento_of_get_type::is_float): Likewise.
3545 (gcc::jit::recording::memento_of_get_type::is_bool): Likewise.
3546 (get_type_strings): Likewise.
3547
3548 * jit-recording.h
3549 (gcc::jit::recording::context::get_builtins_manager): New.
3550
3551 * libgccjit.h (enum gcc_jit_types): Add
3552 GCC_JIT_TYPE_COMPLEX_FLOAT, GCC_JIT_TYPE_COMPLEX_DOUBLE,
3553 GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE.
3554
23844fd7
DM
35552014-12-01 David Malcolm <dmalcolm@redhat.com>
3556
3557 * jit-builtins.c
3558 (gcc::jit::recording::builtins_manager::get_builtin_function):
3559 Check for NULL return from make_builtin_function.
3560 (gcc::jit::recording::builtins_manager::make_builtin_function):
3561 Check for NULL return from get_type.
3562
c6760a13
DM
35632014-12-01 David Malcolm <dmalcolm@redhat.com>
3564
3565 * jit-playback.c (gcc::jit::playback::context::compile): Move DSO
3566 creation code into...
3567 (gcc::jit::playback::context::convert_to_dso): New function.
3568 * jit-playback.h (gcc::jit::playback::context::convert_to_dso):
3569 New function.
3570
8f50ee3c
DM
35712014-12-01 David Malcolm <dmalcolm@redhat.com>
3572
3573 * jit-playback.c (gcc::jit::playback::context::compile): Use an
3574 auto_vec<const char *> rather than a const char *[20] for the
3575 top-level argv, and move the logic to build it to...
3576 (gcc::jit::playback::context::make_fake_args): New function.
3577 * jit-playback.h (gcc::jit::playback::context::make_fake_args):
3578 New function.
3579
56dea35f
DM
35802014-12-01 David Malcolm <dmalcolm@redhat.com>
3581
3582 * Make-lang.in (jit_OBJS): Add jit/jit-result.o.
3583 * jit-playback.c: Include new header jit-result.h.
3584 (gcc::jit::result::result): Move to new file jit-result.c.
3585 (gcc::jit::result::~result): Likewise.
3586 (gcc::jit::playback::result): Likewise.
3587 * jit-recording.h (class gcc::jit::result): Move to new
3588 header jit-result.h.
3589 * jit-result.c: New file, to contain...
3590 (gcc::jit::result::result): Move here from jit-playback.c,
3591 removing erroneous "playback" namespace from comment.
3592 (gcc::jit::result::~result): Likewise.
3593 (gcc::jit::playback::result): Likewise.
3594 * jit-result.h: New file, to contain...
3595 (class gcc::jit::result): Move from jit-recording.h.
3596 * libgccjit.c: Include jit-result.h.
3597 (gcc_jit_result_get_code): Update comment to reflect move
3598 of implementation.
3599 (gcc_jit_result_release): Likewise.
3600
52b9468f
DM
36012014-12-01 David Malcolm <dmalcolm@redhat.com>
3602
3603 PR jit/63854
3604 * docs/examples/tut04-toyvm/toyvm.c
3605 (toyvm_compiled_function): New typedef.
3606 (toyvm_compiled_func) Rename to...
3607 (toyvm_compiled_code) ...this.
3608 (struct toyvm_compiled_function): New struct.
3609 (toyvm_function_compile): Return a toyvm_compiled_function *
3610 rather than a toyvm_compiled_func, so that the caller can fully
3611 clean things up. Free "funcname".
3612 (test_script): Update for change to toyvm_function_compile.
3613 Clean up the toyvm_compiled_function.
3614 (main): Likewise.
3615 (docs/intro/tutorial04.rst): Update to reflect the above changes,
3616 and to better spell out the lifetime of the compiled code.
3617
c8d19a69
DM
36182014-12-01 David Malcolm <dmalcolm@redhat.com>
3619
3620 PR jit/63854
3621 * jit-builtins.c
3622 (gcc::jit::recording::builtins_manager::make_fn_type): Call the
3623 context's new_function_type method, rather than directly creating
3624 a function_type instance.
3625 * jit-recording.c
3626 (gcc::jit::recording::context::new_function_type): New method,
3627 adapted from part of...
3628 (gcc::jit::recording::context::new_function_ptr_type): ...this.
3629 Update to call new_function_type.
3630 * jit-recording.h
3631 (gcc::jit::recording::context::new_function_type): New method.
3632
c985705a
DM
36332014-12-01 David Malcolm <dmalcolm@redhat.com>
3634
3635 PR jit/63969
3636 * jit-playback.c: Ensure that ctxt_progname is non-NULL.
3637
b957b2e0
DM
36382014-11-19 David Malcolm <dmalcolm@redhat.com>
3639
3640 PR jit/63854
3641 * jit-playback.c (gcc::jit::playback::compound_type::set_fields):
3642 Convert param from const vec<playback::field *> & to
3643 const auto_vec<playback::field *> *.
3644 (gcc::jit::playback::context::new_function_type): Convert param
3645 "param_types" from vec<type *> * to const auto_vec<type *> *.
3646 (gcc::jit::playback::context::new_function): Convert param
3647 "params" from vec<param *> * to const auto_vec<param *> *.
3648 (gcc::jit::playback::context::build_call): Convert param "args"
3649 from vec<rvalue *> to const auto_vec<rvalue *> *.
3650 (gcc::jit::playback::context::new_call): Likewise.
3651 (gcc::jit::playback::context::new_call_through_ptr): Likewise.
3652 (wrapper_finalizer): New function.
3653 (gcc::jit::playback::wrapper::operator new): Call the finalizer
3654 variant of ggc_internal_cleared_alloc, supplying
3655 wrapper_finalizer.
3656 (gcc::jit::playback::function::finalizer): New.
3657 (gcc::jit::playback::block::finalizer): New.
3658 (gcc::jit::playback::source_file::finalizer): New.
3659 (gcc::jit::playback::source_line::finalizer): New.
3660
3661 * jit-playback.h
3662 (gcc::jit::playback::context::new_function_type): Convert param
3663 "param_types" from vec<type *> * to const auto_vec<type *> *.
3664 (gcc::jit::playback::context::new_function): Convert param
3665 "params" from vec<param *> * to const auto_vec<param *> *.
3666 (gcc::jit::playback::context::new_call): Convert param
3667 "args" from vec<rvalue *> to const auto_vec<rvalue *> *.
3668 (gcc::jit::playback::context::new_call_through_ptr): Likewise.
3669 (gcc::jit::playback::context::build_call): Likewise.
3670 (gcc::jit::playback::context): Convert fields "m_functions",
3671 "m_source_files", "m_cached_locations" from vec to auto_vec.
3672 (gcc::jit::playback::wrapper::finalizer): New virtual function.
3673 (gcc::jit::playback::compound_type::set_fields): Convert param fro
3674 const vec<playback::field *> & to
3675 const auto_vec<playback::field *> *.
3676 (gcc::jit::playback::function::finalizer): New.
3677 (gcc::jit::playback::block::finalizer): New.
3678 (gcc::jit::playback::source_file::finalizer): New.
3679 (gcc::jit::playback::source_line::finalizer): New.
3680
3681 * jit-recording.c
3682 (gcc::jit::recording::function_type::replay_into): Convert local
3683 from a vec into an auto_vec.
3684 (gcc::jit::recording::fields::replay_into): Likewise.
3685 (gcc::jit::recording::function::replay_into): Likewise.
3686 (gcc::jit::recording::call::replay_into): Likewise.
3687 (gcc::jit::recording::call_through_ptr::replay_into): Likewise.
3688
3689 * jit-recording.h (gcc::jit::recording::context): Convert fields
3690 "m_mementos", "m_compound_types", "m_functions" from vec<> to
3691 auto_vec <>.
3692 (gcc::jit::recording::function_type::get_param_types): Convert
3693 return type from vec<type *> to const vec<type *> &.
3694 (gcc::jit::recording::function_type): Convert field
3695 "m_param_types" from a vec<> to an auto_vec<>.
3696 (gcc::jit::recording::fields): Likewise for field "m_fields".
3697 (gcc::jit::recording::function::get_params): Convert return type
3698 from vec <param *> to const vec<param *> &.
3699 (gcc::jit::recording::function): Convert fields "m_params",
3700 "m_locals", "m_blocks" from vec<> to auto_vec<>.
3701 (gcc::jit::recording::block): Likewise for field "m_statements".
3702 vec<> to auto_vec<>.
3703 (gcc::jit::recording::call): Likewise for field "m_args".
3704 (gcc::jit::recording::call_through_ptr): Likewise.
3705
79cafc7a
DM
37062014-11-19 David Malcolm <dmalcolm@redhat.com>
3707
3708 PR jit/63854
3709 * jit-recording.c (recording::function::validate): Convert
3710 "worklist" from vec<> to autovec<> to fix a leak.
3711
35485da9
DM
37122014-11-11 David Malcolm <dmalcolm@redhat.com>
3713
3714 * ChangeLog.jit: New.
3715 * ChangeLog: New.
3716 * Make-lang.in: New.
3717 * TODO.rst: New.
3718 * config-lang.in: New.
3719 * docs/Makefile: New.
3720 * docs/_build/texinfo/Makefile: New.
3721 * docs/_build/texinfo/factorial.png: New.
3722 * docs/_build/texinfo/libgccjit.texi: New.
3723 * docs/_build/texinfo/sum-of-squares.png: New.
3724 * docs/conf.py: New.
3725 * docs/examples/tut01-hello-world.c: New.
3726 * docs/examples/tut02-square.c: New.
3727 * docs/examples/tut03-sum-of-squares.c: New.
3728 * docs/examples/tut04-toyvm/Makefile: New.
3729 * docs/examples/tut04-toyvm/factorial.toy: New.
3730 * docs/examples/tut04-toyvm/fibonacci.toy: New.
3731 * docs/examples/tut04-toyvm/toyvm.c: New.
3732 * docs/index.rst: New.
3733 * docs/internals/index.rst: New.
3734 * docs/intro/factorial.png: New.
3735 * docs/intro/index.rst: New.
3736 * docs/intro/sum-of-squares.png: New.
3737 * docs/intro/tutorial01.rst: New.
3738 * docs/intro/tutorial02.rst: New.
3739 * docs/intro/tutorial03.rst: New.
3740 * docs/intro/tutorial04.rst: New.
3741 * docs/topics/contexts.rst: New.
3742 * docs/topics/expressions.rst: New.
3743 * docs/topics/functions.rst: New.
3744 * docs/topics/index.rst: New.
3745 * docs/topics/locations.rst: New.
3746 * docs/topics/objects.rst: New.
3747 * docs/topics/results.rst: New.
3748 * docs/topics/types.rst: New.
3749 * dummy-frontend.c: New.
3750 * jit-builtins.c: New.
3751 * jit-builtins.h: New.
3752 * jit-common.h: New.
3753 * jit-playback.c: New.
3754 * jit-playback.h: New.
3755 * jit-recording.c: New.
3756 * jit-recording.h: New.
3757 * libgccjit++.h: New.
3758 * libgccjit.c: New.
3759 * libgccjit.h: New.
3760 * libgccjit.map: New.
3761 * notes.txt: New.
3762
37632013-07-26 David Malcolm <dmalcolm@redhat.com>
3764
3765 * Initial creation
818ab71a 3766\f
877e3c2a 3767Copyright (C) 2013-2022 Free Software Foundation, Inc.
35485da9
DM
3768
3769Copying and distribution of this file, with or without modification,
3770are permitted in any medium without royalty provided the copyright
3771notice and this notice are preserved.