145
|
1 2020-01-01 Jakub Jelinek <jakub@redhat.com>
|
|
2
|
|
3 Update copyright years.
|
|
4
|
|
5 2019-11-29 Julian Brown <julian@codesourcery.com>
|
|
6
|
|
7 * jit-builtins.c (BT_DFLOAT32_PTR, BT_DFLOAT64_PTR, BT_DFLOAT128_PTR):
|
|
8 Remove commented-out cases.
|
|
9
|
|
10 2019-11-20 David Malcolm <dmalcolm@redhat.com>
|
|
11
|
|
12 PR jit/92483
|
|
13 * jit-playback.c (gcc::jit::playback::context::make_fake_args):
|
|
14 Update GCC_JIT_BOOL_OPTION_SELFCHECK_GC for new --param syntax.
|
|
15
|
|
16 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
|
|
17
|
|
18 PR middle-end/91421
|
|
19 * jit-playback.c (new_function): Use set_decl_built_in_function.
|
|
20
|
|
21 2019-07-22 Andrea Corallo <andrea.corallo@arm.com>
|
|
22
|
|
23 * jit-recording.c (unary_op_reproducer_strings): Make it extern.
|
|
24 (binary_op_reproducer_strings): Likewise.
|
|
25 * jit-recording.h (unary_op_reproducer_strings): Likewise.
|
|
26 (binary_op_reproducer_strings): Likewise.
|
|
27 * libgccjit.c (gcc_jit_context_new_unary_op): Check result_type to be a
|
|
28 numeric type.
|
|
29 * libgccjit.c (gcc_jit_context_new_binary_op): Improve error message.
|
|
30
|
|
31 2019-07-04 Andrea Corallo <andrea.corallo@arm.com>
|
|
32
|
|
33 * libgccjit.c (gcc_jit_context_new_binary_op): Check result_type to be a
|
|
34 numeric type.
|
|
35
|
|
36 2019-07-04 Andrea Corallo <andrea.corallo@arm.com>
|
|
37
|
|
38 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_12): New ABI tag.
|
|
39 * docs/topics/types.rst: Add gcc_jit_context_new_bitfield.
|
|
40 * jit-common.h (namespace recording): Add class bitfield.
|
|
41 * jit-playback.c:
|
|
42 (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): Add macros.
|
|
43 (playback::context::new_bitfield): New method.
|
|
44 (playback::compound_type::set_fields): Add bitfield support.
|
|
45 (playback::lvalue::mark_addressable): Was jit_mark_addressable make this
|
|
46 a method of lvalue plus return a bool to communicate success.
|
|
47 (playback::lvalue::get_address): Check for jit_mark_addressable return
|
|
48 value.
|
|
49 * jit-playback.h (new_bitfield): New method.
|
|
50 (class bitfield): New class.
|
|
51 (class lvalue): Add jit_mark_addressable method.
|
|
52 * jit-recording.c (recording::context::new_bitfield): New method.
|
|
53 (recording::bitfield::replay_into): New method.
|
|
54 (recording::bitfield::write_to_dump): Likewise.
|
|
55 (recording::bitfield::make_debug_string): Likewise.
|
|
56 (recording::bitfield::write_reproducer): Likewise.
|
|
57 * jit-recording.h (class context): Add new_bitfield method.
|
|
58 (class field): Make it derivable by class bitfield.
|
|
59 (class bitfield): Add new class.
|
|
60 * libgccjit++.h (class context): Add new_bitfield method.
|
|
61 * libgccjit.c (struct gcc_jit_bitfield): New structure.
|
|
62 (gcc_jit_context_new_bitfield): New function.
|
|
63 * libgccjit.h
|
|
64 (LIBGCCJIT_HAVE_gcc_jit_context_new_bitfield) New macro.
|
|
65 (gcc_jit_context_new_bitfield): New function.
|
|
66 * libgccjit.map (LIBGCCJIT_ABI_12) New ABI tag.
|
|
67
|
|
68 2019-03-21 Jakub Jelinek <jakub@redhat.com>
|
|
69
|
|
70 * jit-recording.c (reproducer::m_set_identifiers): Use false as Lazy
|
|
71 in hash_set template param.
|
|
72
|
|
73 2019-02-05 Andrea Corallo <andrea.corallo@arm.com>
|
|
74
|
|
75 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_11): New ABI tag.
|
|
76 * docs/topics/contexts.rst (Additional driver options): New
|
|
77 section.
|
|
78 * jit-playback.c (invoke_driver): Add call to append_driver_options.
|
|
79 * jit-recording.c: Within namespace gcc::jit...
|
|
80 (recording::context::~context): Free the optnames within
|
|
81 m_driver_options.
|
|
82 (recording::context::add_driver_option): New method.
|
|
83 (recording::context::append_driver_options): New method.
|
|
84 (recording::context::dump_reproducer_to_file): Add driver
|
|
85 options.
|
|
86 * jit-recording.h: Within namespace gcc::jit...
|
|
87 (recording::context::add_driver_option): New method.
|
|
88 (recording::context::append_driver_options): New method.
|
|
89 (recording::context::m_driver_options): New field.
|
|
90 * libgccjit++.h (gccjit::context::add_driver_option): New
|
|
91 method.
|
|
92 * libgccjit.c (gcc_jit_context_add_driver_option): New API
|
|
93 entrypoint.
|
|
94 * libgccjit.h (gcc_jit_context_add_driver_option): New API
|
|
95 entrypoint.
|
|
96 (LIBGCCJIT_HAVE_gcc_jit_context_add_driver_option): New
|
|
97 macro.
|
|
98 * libgccjit.map (LIBGCCJIT_ABI_11): New ABI tag.
|
|
99
|
|
100 2019-01-01 Jakub Jelinek <jakub@redhat.com>
|
|
101
|
|
102 Update copyright years.
|
|
103
|
|
104 2018-11-15 David Malcolm <dmalcolm@redhat.com>
|
|
105
|
|
106 PR other/19165
|
|
107 * dummy-frontend.c (jit_begin_diagnostic): Add diagnostic_t param.
|
|
108
|
|
109 2018-11-13 David Malcolm <dmalcolm@redhat.com>
|
|
110
|
|
111 * jit-playback.c: Replace "source_location" with "location_t".
|
|
112
|
131
|
113 2018-10-17 David Malcolm <dmalcolm@redhat.com>
|
|
114
|
|
115 * Make-lang.in (selftest-jit): New.
|
|
116
|
|
117 2018-06-28 Martin Liska <mliska@suse.cz>
|
|
118
|
|
119 * jit-playback.c: Include opt-suggestions.h.
|
|
120
|
|
121 2018-06-28 Martin Liska <mliska@suse.cz>
|
|
122
|
|
123 * jit-playback.c (class auto_argvec): Moved to vec.h.
|
|
124 (auto_argvec::~auto_argvec): Likewise.
|
|
125 (compile): Use the renamed name.
|
|
126 (invoke_driver): Likewise.
|
|
127
|
|
128 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
|
|
129
|
|
130 PR jit/84288
|
|
131 * Make-lang.in ($(LIBGCCJIT_FILENAME)): Add $(EXTRA_GCC_LIBS).
|
|
132
|
|
133 2018-03-09 David Malcolm <dmalcolm@redhat.com>
|
|
134 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
|
135
|
|
136 PR jit/64089
|
|
137 PR jit/84288
|
|
138 * Make-lang.in (COMMA): New.
|
|
139 (LIBGCCJIT_VERSION_SCRIPT_OPTION): New.
|
|
140 (LIBGCCJIT_SONAME_OPTION): New.
|
|
141 (jit): Move --version-script and -soname linker options to the
|
|
142 above.
|
|
143
|
|
144 2018-01-25 David Malcolm <dmalcolm@redhat.com>
|
|
145
|
|
146 PR jit/81672
|
|
147 * jit-recording.h (gcc::jit::recording::union_): Remove fields
|
|
148 "m_loc" and "m_name".
|
|
149
|
|
150 2018-01-03 Jakub Jelinek <jakub@redhat.com>
|
|
151
|
|
152 Update copyright years.
|
|
153
|
|
154 2017-12-19 Jakub Jelinek <jakub@redhat.com>
|
|
155
|
|
156 * jit-playback.c (get_type, playback::compile_to_file::copy_file,
|
|
157 playback::context::acquire_mutex): Replace Yoda conditions with
|
|
158 typical order conditions.
|
|
159 * libgccjit.c (gcc_jit_context_new_struct_type,
|
|
160 gcc_jit_struct_set_fields, gcc_jit_context_new_union_type,
|
|
161 gcc_jit_context_new_function, gcc_jit_timer_pop): Likewise.
|
|
162 * jit-builtins.c (matches_builtin): Likewise.
|
|
163 * jit-recording.c (recording::compound_type::set_fields,
|
|
164 recording::fields::write_reproducer, recording::rvalue::set_scope,
|
|
165 recording::function::validate): Likewise.
|
|
166 * jit-logging.c (logger::decref): Likewise.
|
|
167
|
|
168 2017-11-30 Jakub Jelinek <jakub@redhat.com>
|
|
169
|
|
170 * jit-recording.c
|
|
171 (recording::memento_of_new_rvalue_from_const <long>::write_reproducer):
|
|
172 Use ; instead of ;;.
|
|
173
|
|
174 2017-11-28 Jakub Jelinek <jakub@redhat.com>
|
|
175
|
|
176 * jit-playback.c (add_switch): Build SWITCH_EXPR using build2 instead
|
|
177 of build3. Formatting fixes. Adjust funciton comment.
|
|
178
|
|
179 2017-11-23 Tom de Vries <tom@codesourcery.com>
|
|
180
|
|
181 * libgccjit.c (RETURN_NULL_IF_FAIL_NONNULL_NUMERIC_TYPE): Wrap in
|
|
182 JIT_{BEGIN,END}_STMT.
|
|
183
|
|
184 2017-10-31 David Malcolm <dmalcolm@redhat.com>
|
|
185
|
|
186 * docs/internals/index.rst (Running the test suite): Document
|
|
187 PRESERVE_EXECUTABLES.
|
|
188 (Running under valgrind): Add markup to RUN_UNDER_VALGRIND.
|
|
189 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
190
|
111
|
191 2017-10-04 David Malcolm <dmalcolm@redhat.com>
|
|
192
|
|
193 * docs/cp/topics/expressions.rst (Vector expressions): New
|
|
194 section.
|
|
195 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_10): New ABI tag.
|
|
196 * docs/topics/expressions.rst (Vector expressions): New section.
|
|
197 * docs/topics/types.rst (gcc_jit_type_get_vector): Add link to
|
|
198 gcc_jit_context_new_rvalue_from_vector.
|
|
199 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
200 * jit-common.h (gcc::jit:recording::vector_type): New forward
|
|
201 decl.
|
|
202 * jit-playback.c
|
|
203 (gcc::jit::playback::context::new_rvalue_from_vector): New method.
|
|
204 * jit-playback.h
|
|
205 (gcc::jit::playback::context::new_rvalue_from_vector): New method.
|
|
206 * jit-recording.c: In namespace gcc::jit::
|
|
207 (class comma_separated_string): New class.
|
|
208 (comma_separated_string::comma_separated_string): New ctor,
|
|
209 adapted from recording::call::make_debug_string.
|
|
210 (comma_separated_string::~comma_separated_string): New dtor.
|
|
211 In namespace gcc::jit::recording::
|
|
212 (context::new_rvalue_from_vector): New method.
|
|
213 (type::get_vector): Update for renaming of memento_of_get_vector.
|
|
214 (class memento_of_get_vector): Rename to...
|
|
215 (class vector_type): ..this.
|
|
216 (memento_of_new_rvalue_from_vector::memento_of_new_rvalue_from_vector):
|
|
217 New ctor.
|
|
218 (memento_of_new_rvalue_from_vector::replay_into): New method.
|
|
219 (memento_of_new_rvalue_from_vector::visit_children): New method.
|
|
220 (memento_of_new_rvalue_from_vector::make_debug_string): New
|
|
221 method.
|
|
222 (memento_of_new_rvalue_from_vector::write_reproducer): New method.
|
|
223 (call::make_debug_string): Split out arg-printing code into ctor
|
|
224 for comma_separated_string.
|
|
225 * jit-recording.h: In namespace gcc::jit::recording::
|
|
226 (context::new_rvalue_from_vector): New method.
|
|
227 (type::dyn_cast_vector_type): New virtual function.
|
|
228 (class memento_of_get_vector): Rename to...
|
|
229 (class vector_type): ...this.
|
|
230 (vector_type::unqualified): Remove this vfunc override in favor
|
|
231 of...
|
|
232 (vector_type::get_element_type): ...this new method.
|
|
233 (vector_type::get_num_units): New method.
|
|
234 (vector_type::dyn_cast_vector_type): New vfunc override.
|
|
235 (class memento_of_new_rvalue_from_vector): New class.
|
|
236 * libgccjit++.h (gccjit::context::new_rvalue): Add overload for
|
|
237 vector of rvalue.
|
|
238 * libgccjit.c (gcc_jit_context_new_binary_op): Strip off type
|
|
239 qualifications when checking that both operands have same type.
|
|
240 (gcc_jit_context_new_rvalue_from_vector): New API entrypoint.
|
|
241 * libgccjit.h
|
|
242 (LIBGCCJIT_HAVE_gcc_jit_context_new_rvalue_from_vector): New
|
|
243 macro.
|
|
244 (gcc_jit_context_new_rvalue_from_vector): New API entrypoint.
|
|
245 * libgccjit.map (LIBGCCJIT_ABI_10): New ABI tag.
|
|
246
|
|
247 2017-09-28 David Malcolm <dmalcolm@redhat.com>
|
|
248
|
|
249 * docs/topics/expressions.rst (Function calls): Add link to
|
|
250 gcc_jit_context_new_function_ptr_type.
|
|
251 (Function pointers): Convert to cross-references to
|
|
252 function-pointers.rst, moving material there.
|
|
253 * docs/topics/function-pointers.rst: New page.
|
|
254 * docs/topics/index.rst: Add function-pointers.rst.
|
|
255 * docs/topics/types.rst (Function pointer types): New section.
|
|
256 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
257
|
|
258 2017-09-28 David Malcolm <dmalcolm@redhat.com>
|
|
259
|
|
260 * jit-recording.c
|
|
261 (gcc::jit::recording::function_type::is_same_type_as): New function.
|
|
262 * jit-recording.h: In namespace gcc::jit::recording::
|
|
263 (type::accepts_writes_from): Use is_same_type_as rather than pointer
|
|
264 equality.
|
|
265 (type::is_same_type_as): New virtual function.
|
|
266 (function_type::is_same_type_as): New override.
|
|
267
|
|
268 2017-09-27 David Malcolm <dmalcolm@redhat.com>
|
|
269
|
|
270 * docs/cp/topics/expressions.rst (Function pointers): New section.
|
|
271 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_9): New tag.
|
|
272 * docs/topics/expressions.rst (Function pointers): New section.
|
|
273 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
274 * jit-common.h (class gcc::jit::recording::function_pointer): New
|
|
275 forward decl.
|
|
276 * jit-playback.c (gcc::jit::playback::function::get_address): New
|
|
277 method.
|
|
278 * jit-playback.h (gcc::jit::playback::function::get_address): New
|
|
279 method decl.
|
|
280 * jit-recording.c: Within namespace gcc::jit::recording...
|
|
281 (function::function): Initialize new field "m_fn_ptr_type".
|
|
282 (function::get_address): New method.
|
|
283 (function_pointer::replay_into): New method.
|
|
284 (function_pointer::visit_children): New method.
|
|
285 (function_pointer::make_debug_string): New method.
|
|
286 (function_pointer::write_reproducer): New method.
|
|
287 * jit-recording.h: Within namespace gcc::jit::recording...
|
|
288 (function::get_address): New method.
|
|
289 (function): Add field "m_fn_ptr_type".
|
|
290 (class function_pointer): New subclass of rvalue.
|
|
291 * libgccjit++.h (gccjit::function::get_address): New method.
|
|
292 * libgccjit.c (gcc_jit_function_get_address): New function.
|
|
293 * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_function_get_address): New
|
|
294 macro.
|
|
295 (gcc_jit_function_get_address): New API entrypoint.
|
|
296 * libgccjit.map (LIBGCCJIT_ABI_9): New tag.
|
|
297
|
|
298 2017-09-14 David Malcolm <dmalcolm@redhat.com>
|
|
299
|
|
300 PR jit/82174
|
|
301 * jit-builtins.c (matches_builtin): Ignore entries with a NULL
|
|
302 name.
|
|
303
|
|
304 2017-08-18 David Malcolm <dmalcolm@redhat.com>
|
|
305
|
|
306 PR tree-optimization/46805
|
|
307 * dummy-frontend.c (jit_langhook_parse_file): Handle vector types.
|
|
308
|
|
309 2017-08-18 David Malcolm <dmalcolm@redhat.com>
|
|
310
|
|
311 * jit-recording.c (class gcc::jit::reproducer): Rename field
|
|
312 "m_identifiers" to "m_map_memento_to_identifier". Add field
|
|
313 "m_set_identifiers" and struct hash_traits for it.
|
|
314 (gcc::jit::reproducer::reproducer): Update for above.
|
|
315 (convert_to_identifier): New function.
|
|
316 (gcc::jit::reproducer::ensure_identifier_is_unique): New method.
|
|
317 (gcc::jit::reproducer::make_identifier): Avoid appending the %p
|
|
318 unless necessary for uniqueness. Update for field renaming.
|
|
319 (gcc::jit::reproducer::get_identifier): Update for field renaming.
|
|
320
|
|
321 2017-08-09 David Malcolm <dmalcolm@redhat.com>
|
|
322
|
|
323 * docs/cp/topics/types.rst (Vector types): New section.
|
|
324 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_8): New tag.
|
|
325 * docs/topics/types.rst (gcc_jit_context_get_type): Fix typo in
|
|
326 example.
|
|
327 (Vector types): New section.
|
|
328 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
329 * jit-playback.c (gcc::jit::playback::type::get_vector): New
|
|
330 method.
|
|
331 * jit-playback.h (gcc::jit::playback::type::get_vector): New
|
|
332 method.
|
|
333 * jit-recording.c: In namespace gcc::jit::recording::
|
|
334 (type::get_vector): New method.
|
|
335 (memento_of_get_aligned::write_reproducer): Fix typo
|
|
336 in leading comment.
|
|
337 (memento_of_get_vector::replay_into): New method.
|
|
338 (memento_of_get_vector::make_debug_string): New method.
|
|
339 (memento_of_get_vector::write_reproducer): New method.
|
|
340 * jit-recording.h: In namespace gcc::jit::recording::
|
|
341 (type::get_vector): New
|
|
342 method.
|
|
343 (class memento_of_get_vector): New class.
|
|
344 * libgccjit++.h (gccjit::type::get_vector): New method.
|
|
345 * libgccjit.c (gcc_jit_type_get_vector): New public entrypoint.
|
|
346 * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_type_get_vector): New
|
|
347 define.
|
|
348 (gcc_jit_type_get_vector): New decl.
|
|
349 * libgccjit.map (LIBGCCJIT_ABI_8): New ABI tag.
|
|
350
|
|
351 2017-07-05 Richard Sandiford <richard.sandiford@linaro.org>
|
|
352 Alan Hayward <alan.hayward@arm.com>
|
|
353 David Sherwood <david.sherwood@arm.com>
|
|
354
|
|
355 * dummy-frontend.c (jit_langhook_type_for_mode): Remove "enum" before
|
|
356 "machine_mode".
|
|
357
|
|
358 2017-04-24 David Malcolm <dmalcolm@redhat.com>
|
|
359
|
|
360 * docs/cp/topics/types.rst (gccjit::type::get_const): Remove
|
|
361 comment.
|
|
362 (gccjit::type::get_aligned): Add.
|
|
363 * docs/topics/compatibility.rst: Add LIBGCCJIT_ABI_7.
|
|
364 * docs/topics/types.rst: Add gcc_jit_type_get_aligned.
|
|
365 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
366 * jit-playback.c (gcc::jit::playback::type::get_aligned): New
|
|
367 method.
|
|
368 * jit-playback.h (gcc::jit::playback::type::get_aligned): New
|
|
369 method.
|
|
370 * jit-recording.c: Within namespace gcc::jit::recording...
|
|
371 (type::get_aligned): New method.
|
|
372 (memento_of_get_aligned::replay_into): New method.
|
|
373 (memento_of_get_aligned::make_debug_string): New method.
|
|
374 (memento_of_get_aligned::write_reproducer): New method.
|
|
375 * jit-recording.h: Within namespace gcc::jit::recording...
|
|
376 (type::get_aligned): New method.
|
|
377 (type::accepts_writes_from): Strip off qualifications from
|
|
378 this when comparing pointer equality.
|
|
379 (decorated_type): New subclass of type, subsuming the
|
|
380 commonality between memento_of_get_const and
|
|
381 memento_of_get_volatile.
|
|
382 (memento_of_get_const): Make a subclass of decorated_type,
|
|
383 rather than type.
|
|
384 (memento_of_get_volatile): Likewise.
|
|
385 (memento_of_get_aligned): Likewise.
|
|
386 * libgccjit++.h: Within namespace gccjit...
|
|
387 (type::get_const): New method.
|
|
388 (type::get_aligned): New method.
|
|
389 * libgccjit.c (gcc_jit_type_get_aligned): New function.
|
|
390 * libgccjit.h (gcc_jit_type_get_aligned): New decl.
|
|
391 * libgccjit.map (LIBGCCJIT_ABI_7): New
|
|
392 (gcc_jit_type_get_aligned): Add.
|
|
393
|
|
394 2017-01-19 David Malcolm <dmalcolm@redhat.com>
|
|
395
|
|
396 * dummy-frontend.c (jit_langhook_type_for_size): Delete.
|
|
397 (LANG_HOOKS_TYPE_FOR_SIZE): Don't redefine.
|
|
398
|
|
399 2017-01-18 David Malcolm <dmalcolm@redhat.com>
|
|
400
|
|
401 * dummy-frontend.c (jit_langhook_type_for_size): Implement, using
|
|
402 lto's lto_type_for_size.
|
|
403
|
|
404 2017-01-01 Jakub Jelinek <jakub@redhat.com>
|
|
405
|
|
406 Update copyright years.
|
|
407
|
|
408 2016-05-20 David Malcolm <dmalcolm@redhat.com>
|
|
409
|
|
410 * docs/topics/compatibility.rst: Add LIBGCCJIT_ABI_6.
|
|
411 * docs/topics/expressions.rst (Function calls): Add documentation
|
|
412 of gcc_jit_rvalue_set_bool_require_tail_call.
|
|
413 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
414 * jit-common.h (gcc::jit::recording::base_call): Add forward decl.
|
|
415 * jit-playback.c: Within namespace gcc::jit::playback...
|
|
416 (context::build_call) Add "require_tail_call" param and use it
|
|
417 to set CALL_EXPR_MUST_TAIL_CALL.
|
|
418 (context::new_call): Add "require_tail_call" param.
|
|
419 (context::new_call_through_ptr): Likewise.
|
|
420 * jit-playback.h: Within namespace gcc::jit::playback...
|
|
421 (context::new_call: Add "require_tail_call" param.
|
|
422 (context::new_call_through_ptr): Likewise.
|
|
423 (context::build_call): Likewise.
|
|
424 * jit-recording.c: Within namespace gcc::jit::recording...
|
|
425 (base_call::base_call): New constructor.
|
|
426 (base_call::write_reproducer_tail_call): New method.
|
|
427 (call::call): Update for inheritance from base_call.
|
|
428 (call::replay_into): Provide m_require_tail_call to call
|
|
429 to new_call.
|
|
430 (call::write_reproducer): Call write_reproducer_tail_call.
|
|
431 (call_through_ptr::call_through_ptr): Update for inheritance from
|
|
432 base_call.
|
|
433 (call_through_ptr::replay_into): Provide m_require_tail_call to call
|
|
434 to new_call_through_ptr.
|
|
435 (recording::call_through_ptr::write_reproducer): Call
|
|
436 write_reproducer_tail_call.
|
|
437 * jit-recording.h: Within namespace gcc::jit::recording...
|
|
438 (rvalue::dyn_cast_base_call): New virtual function.
|
|
439 (class base_call): New subclass of class rvalue.
|
|
440 (class call): Inherit from base_call rather than directly from
|
|
441 rvalue, moving get_precedence and m_args to base_call.
|
|
442 (class call_through_ptr): Likewise.
|
|
443 * libgccjit.c (gcc_jit_rvalue_set_bool_require_tail_call): New
|
|
444 function.
|
|
445 * libgccjit.h
|
|
446 (LIBGCCJIT_HAVE_gcc_jit_rvalue_set_bool_require_tail_call): New
|
|
447 macro.
|
|
448 (gcc_jit_rvalue_set_bool_require_tail_call): New function.
|
|
449 * libgccjit.map (LIBGCCJIT_ABI_6): New.
|
|
450 (gcc_jit_rvalue_set_bool_require_tail_call): Add.
|
|
451
|
|
452 2016-05-17 David Malcolm <dmalcolm@redhat.com>
|
|
453
|
|
454 * dummy-frontend.c: Include diagnostic.h.
|
|
455 (jit_begin_diagnostic): New function.
|
|
456 (jit_end_diagnostic): New function.
|
|
457 (jit_langhook_init): Register jit_begin_diagnostic
|
|
458 and jit_end_diagnostic with the global_dc.
|
|
459 * jit-playback.c: Include diagnostic.h.
|
|
460 (gcc::jit::playback::context::add_diagnostic): New method.
|
|
461 * jit-playback.h (struct diagnostic_context): Add forward
|
|
462 declaration.
|
|
463 (gcc::jit::playback::context::add_diagnostic): New method.
|
|
464
|
|
465 2016-05-17 David Malcolm <dmalcolm@redhat.com>
|
|
466
|
|
467 * docs/topics/expressions.rst (Function calls): Document
|
|
468 gcc_jit_context_new_call_through_ptr.
|
|
469 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
470
|
|
471 2016-05-13 David Malcolm <dmalcolm@redhat.com>
|
|
472
|
|
473 * jit-playback.h: Within namespace gcc:jit::playback...
|
|
474 (compile_to_memory::postprocess): Mark with FINAL OVERRIDE.
|
|
475 (compile_to_file::postprocess): Likewise.
|
|
476 (function::finalizer): Likewise.
|
|
477 (block::finalizer): Likewise.
|
|
478 (source_file::finalizer): Likewise.
|
|
479 (source_line::finalizer): Likewise.
|
|
480 * jit-recording.c (gcc::jit::rvalue_usage_validator):: Likewise.
|
|
481 * jit-recording.h: Within namespace gcc::jit::recording...
|
|
482 (string::replay_into): Mark with FINAL OVERRIDE.
|
|
483 (string::make_debug_string): Likewise.
|
|
484 (string::write_reproducer): Likewise.
|
|
485 (location::replay_into): Likewise.
|
|
486 (location::dyn_cast_location): Likewise.
|
|
487 (location::make_debug_string): Likewise.
|
|
488 (location::write_reproducer): Likewise.
|
|
489 (memento_of_get_type::dereference): Likewise.
|
|
490 (memento_of_get_type::accepts_writes_from): Likewise.
|
|
491 (memento_of_get_type::is_int): Likewise.
|
|
492 (memento_of_get_type::is_float): Likewise.
|
|
493 (memento_of_get_type::is_bool): Likewise.
|
|
494 (memento_of_get_type::is_pointer): Likewise.
|
|
495 (memento_of_get_type::is_array): Likewise.
|
|
496 (memento_of_get_type::is_void): Likewise.
|
|
497 (memento_of_get_type::replay_into): Likewise.
|
|
498 (memento_of_get_type::make_debug_string): Likewise.
|
|
499 (memento_of_get_type::write_reproducer): Likewise.
|
|
500 (memento_of_get_pointer::dereference): Likewise.
|
|
501 (memento_of_get_pointer::accepts_writes_from): Likewise.
|
|
502 (memento_of_get_pointer::replay_into): Likewise.
|
|
503 (memento_of_get_pointer::is_int): Likewise.
|
|
504 (memento_of_get_pointer::is_float): Likewise.
|
|
505 (memento_of_get_pointer::is_bool): Likewise.
|
|
506 (memento_of_get_pointer::is_pointer): Likewise.
|
|
507 (memento_of_get_pointer::is_array): Likewise.
|
|
508 (memento_of_get_pointer::make_debug_string): Likewise.
|
|
509 (memento_of_get_pointer::write_reproducer): Likewise.
|
|
510 (memento_of_get_const::dereference): Likewise.
|
|
511 (memento_of_get_const::accepts_writes_from): Likewise.
|
|
512 (memento_of_get_const::unqualified): Likewise.
|
|
513 (memento_of_get_const::is_int): Likewise.
|
|
514 (memento_of_get_const::is_float): Likewise.
|
|
515 (memento_of_get_const::is_bool): Likewise.
|
|
516 (memento_of_get_const::is_pointer): Likewise.
|
|
517 (memento_of_get_const::is_array): Likewise.
|
|
518 (memento_of_get_const::void replay_into): Likewise;
|
|
519 (memento_of_get_const::make_debug_string): Likewise.
|
|
520 (memento_of_get_const::write_reproducer): Likewise.
|
|
521 (memento_of_get_volatile::dereference): Likewise.
|
|
522 (memento_of_get_volatile::unqualified): Likewise.
|
|
523 (memento_of_get_volatile::is_int): Likewise.
|
|
524 (memento_of_get_volatile::is_float): Likewise.
|
|
525 (memento_of_get_volatile::is_bool): Likewise.
|
|
526 (memento_of_get_volatile::is_pointer): Likewise.
|
|
527 (memento_of_get_volatile::is_array): Likewise.
|
|
528 (memento_of_get_volatile::replay_into): Likewise;
|
|
529 (memento_of_get_volatile::make_debug_string): Likewise.
|
|
530 (memento_of_get_volatile::write_reproducer): Likewise.
|
|
531 (array_type::dereference): Likewise.
|
|
532 (array_type::is_int): Likewise.
|
|
533 (array_type::is_float): Likewise.
|
|
534 (array_type::is_bool): Likewise.
|
|
535 (array_type::is_pointer): Likewise.
|
|
536 (array_type::is_array): Likewise.
|
|
537 (array_type::replay_into): Likewise;
|
|
538 (array_type::make_debug_string): Likewise.
|
|
539 (array_type::write_reproducer): Likewise.
|
|
540 (function_type::dereference): Likewise.
|
|
541 (function_type::function_dyn_cast_function_type): Likewise.
|
|
542 (function_type::function_as_a_function_type): Likewise.
|
|
543 (function_type::is_int): Likewise.
|
|
544 (function_type::is_float): Likewise.
|
|
545 (function_type::is_bool): Likewise.
|
|
546 (function_type::is_pointer): Likewise.
|
|
547 (function_type::is_array): Likewise.
|
|
548 (function_type::replay_into): Likewise;
|
|
549 (function_type::make_debug_string): Likewise.
|
|
550 (function_type::write_reproducer): Likewise.
|
|
551 (field::replay_into): Likewise;
|
|
552 (field::write_to_dump): Likewise.
|
|
553 (field::make_debug_string): Likewise.
|
|
554 (field::write_reproducer): Likewise.
|
|
555 (compound_type::dereference): Likewise.
|
|
556 (compound_type::is_int): Likewise.
|
|
557 (compound_type::is_float): Likewise.
|
|
558 (compound_type::is_bool): Likewise.
|
|
559 (compound_type::is_pointer): Likewise.
|
|
560 (compound_type::is_array): Likewise.
|
|
561 (compound_type::has_known_size): Likewise.
|
|
562 (struct_::dyn_cast_struct): Likewise.
|
|
563 (struct_::replay_into): Likewise.
|
|
564 (struct_::access_as_type): Likewise.
|
|
565 (struct_::make_debug_string): Likewise.
|
|
566 (struct_::write_reproducer): Likewise.
|
|
567 (fields::replay_into): Likewise.
|
|
568 (fields::write_to_dump): Likewise.
|
|
569 (fields::make_debug_string): Likewise.
|
|
570 (fields::write_reproducer): Likewise.
|
|
571 (union_::replay_into): Likewise.
|
|
572 (union_::make_debug_string): Likewise.
|
|
573 (union_::write_reproducer): Likewise.
|
|
574 (lvalue::access_as_rvalue): Mark with OVERRIDE.
|
|
575 (param::replay_into): Mark with FINAL OVERRIDE.
|
|
576 (param::visit_children): Likewise.
|
|
577 (param::dyn_cast_param): Likewise.
|
|
578 (param::access_as_rvalue): Likewise.
|
|
579 (param::access_as_lvalue): Likewise.
|
|
580 (param::make_debug_string): Likewise.
|
|
581 (param::write_reproducer): Likewise.
|
|
582 (param::get_precedence): Likewise.
|
|
583 (function::replay_into): Likewise.
|
|
584 (function::write_to_dump): Likewise.
|
|
585 (function::make_debug_string): Likewise.
|
|
586 (function::write_reproducer): Likewise.
|
|
587 (block::write_to_dump): Likewise.
|
|
588 (block::make_debug_string): Likewise.
|
|
589 (block::write_reproducer): Likewise.
|
|
590 (block::replay_into): Likewise.
|
|
591 (global::replay_into): Likewise;
|
|
592 (global::visit_children): Likewise.
|
|
593 (global::write_to_dump): Likewise.
|
|
594 (global::make_debug_string): Likewise.
|
|
595 (global::write_reproducer): Likewise.
|
|
596 (global::get_precedence): Likewise.
|
|
597 (memento_of_new_rvalue_from_const::replay_into): Likewise.
|
|
598 (memento_of_new_rvalue_from_const::visit_children): Likewise.
|
|
599 (memento_of_new_rvalue_from_const::is_constant): Likewise.
|
|
600 (memento_of_new_rvalue_from_const::get_wide_int): Likewise.
|
|
601 (memento_of_new_rvalue_from_const::make_debug_string): Likewise.
|
|
602 (memento_of_new_rvalue_from_const::write_reproducer): Likewise.
|
|
603 (memento_of_new_rvalue_from_const::get_precedence): Likewise.
|
|
604 (memento_of_new_string_literal::replay_into): Likewise.
|
|
605 (memento_of_new_string_literal::visit_children): Likewise.
|
|
606 (memento_of_new_string_literal::make_debug_string): Likewise.
|
|
607 (memento_of_new_string_literal::write_reproducer): Likewise.
|
|
608 (memento_of_new_string_literal::get_precedence): Likewise.
|
|
609 (unary_op::replay_into): Likewise.
|
|
610 (unary_op::visit_children): Likewise.
|
|
611 (unary_op::make_debug_string): Likewise.
|
|
612 (unary_op::write_reproducer): Likewise.
|
|
613 (unary_op::get_precedence): Likewise.
|
|
614 (binary_op::replay_into): Likewise.
|
|
615 (binary_op::visit_children): Likewise.
|
|
616 (binary_op::make_debug_string): Likewise.
|
|
617 (binary_op::write_reproducer): Likewise.
|
|
618 (binary_op::get_precedence): Likewise.
|
|
619 (comparison::replay_into): Likewise.
|
|
620 (comparison::visit_children): Likewise.
|
|
621 (comparison::make_debug_string): Likewise.
|
|
622 (comparison::write_reproducer): Likewise.
|
|
623 (comparison::get_precedence): Likewise.
|
|
624 (cast::replay_into): Likewise.
|
|
625 (cast::visit_children): Likewise.
|
|
626 (cast::make_debug_string): Likewise.
|
|
627 (cast::write_reproducer): Likewise.
|
|
628 (cast::get_precedence): Likewise.
|
|
629 (call::replay_into): Likewise.
|
|
630 (call::visit_children): Likewise.
|
|
631 (call::make_debug_string): Likewise.
|
|
632 (call::write_reproducer): Likewise.
|
|
633 (call::get_precedence): Likewise.
|
|
634 (call_through_ptr::replay_into): Likewise.
|
|
635 (call_through_ptr::visit_children): Likewise.
|
|
636 (call_through_ptr::make_debug_string): Likewise.
|
|
637 (call_through_ptr::write_reproducer): Likewise.
|
|
638 (call_through_ptr::get_precedence): Likewise.
|
|
639 (array_access::replay_into): Likewise.
|
|
640 (array_access::visit_children): Likewise.
|
|
641 (array_access::make_debug_string): Likewise.
|
|
642 (array_access::write_reproducer): Likewise.
|
|
643 (array_access::get_precedence): Likewise.
|
|
644 (access_field_of_lvalue::replay_into): Likewise.
|
|
645 (access_field_of_lvalue::visit_children): Likewise.
|
|
646 (access_field_of_lvalue::make_debug_string): Likewise.
|
|
647 (access_field_of_lvalue::write_reproducer): Likewise.
|
|
648 (access_field_of_lvalue::get_precedence): Likewise.
|
|
649 (access_field_rvalue::replay_into): Likewise.
|
|
650 (access_field_rvalue::visit_children): Likewise.
|
|
651 (access_field_rvalue::make_debug_string): Likewise.
|
|
652 (access_field_rvalue::write_reproducer): Likewise.
|
|
653 (access_field_rvalue::get_precedence): Likewise.
|
|
654 (dereference_field_rvalue::replay_into): Likewise.
|
|
655 (dereference_field_rvalue::visit_children): Likewise.
|
|
656 (dereference_field_rvalue::make_debug_string): Likewise.
|
|
657 (dereference_field_rvalue::write_reproducer): Likewise.
|
|
658 (dereference_field_rvalue::get_precedence): Likewise.
|
|
659 (dereference_rvalue::replay_into): Likewise.
|
|
660 (dereference_rvalue::visit_children): Likewise.
|
|
661 (dereference_rvalue::make_debug_string): Likewise.
|
|
662 (dereference_rvalue::write_reproducer): Likewise.
|
|
663 (dereference_rvalue::get_precedence): Likewise.
|
|
664 (get_address_of_lvalue::replay_into): Likewise.
|
|
665 (get_address_of_lvalue::visit_children): Likewise.
|
|
666 (get_address_of_lvalue::make_debug_string): Likewise.
|
|
667 (get_address_of_lvalue::write_reproducer): Likewise.
|
|
668 (get_address_of_lvalue::get_precedence): Likewise.
|
|
669 (local::replay_into): Likewise.
|
|
670 (local::visit_children): Likewise.
|
|
671 (local::write_to_dump): Likewise.
|
|
672 (local::make_debug_string): Likewise.
|
|
673 (local::write_reproducer): Likewise.
|
|
674 (local::get_precedence): Likewise.
|
|
675 (statement::write_to_dump): Likewise.
|
|
676 (eval::replay_into): Likewise.
|
|
677 (eval::make_debug_string): Likewise.
|
|
678 (eval::write_reproducer): Likewise.
|
|
679 (assignment::replay_into): Likewise.
|
|
680 (assignment::make_debug_string): Likewise.
|
|
681 (assignment::write_reproducer): Likewise.
|
|
682 (assignment_op::replay_into): Likewise.
|
|
683 (assignment_op::make_debug_string): Likewise.
|
|
684 (assignment_op::write_reproducer): Likewise.
|
|
685 (comment::replay_into): Likewise.
|
|
686 (comment::make_debug_string): Likewise.
|
|
687 (comment::write_reproducer): Likewise.
|
|
688 (conditional::replay_into): Likewise.
|
|
689 (conditional::get_successor_blocks): Likewise.
|
|
690 (conditional::make_debug_string): Likewise.
|
|
691 (conditional::write_reproducer): Likewise.
|
|
692 (jump::replay_into): Likewise.
|
|
693 (jump::get_successor_blocks): Likewise.
|
|
694 (jump::make_debug_string): Likewise.
|
|
695 (jump::write_reproducer): Likewise.
|
|
696 (return_::replay_into): Likewise.
|
|
697 (return_::get_successor_blocks): Likewise.
|
|
698 (return_::make_debug_string): Likewise.
|
|
699 (return_::write_reproducer): Likewise.
|
|
700 (case_::replay_into): Likewise.
|
|
701 (case_::write_reproducer): Likewise.
|
|
702 (case_::make_debug_string): Likewise.
|
|
703 (switch_::replay_into): Likewise.
|
|
704 (switch_::get_successor_blocks): Likewise.
|
|
705 (switch_::make_debug_string): Likewise.
|
|
706 (switch_::write_reproducer): Likewise.
|
|
707
|
|
708 2016-02-08 David Malcolm <dmalcolm@redhat.com>
|
|
709
|
|
710 * dummy-frontend.c (jit_langhook_init): Remove
|
|
711 second argument to build_common_tree_nodes to
|
|
712 track r233218.
|
|
713
|
|
714 2016-01-23 Iain Buclaw <ibuclaw@gdcproject.org>
|
|
715
|
|
716 * jit-playback.c: Include pthread.h.
|
|
717
|
|
718 2016-01-19 David Malcolm <dmalcolm@redhat.com>
|
|
719
|
|
720 PR jit/69144
|
|
721 * jit-playback.c (gcc::jit::playback::compile_to_file::postprocess):
|
|
722 Potentially add the temporary artifact to the tempdir's list of
|
|
723 tempfiles needing additional cleanup.
|
|
724 (gcc::jit::playback::context::extract_any_requested_dumps): Likewise
|
|
725 for the dumpfile.
|
|
726 * jit-tempdir.c (gcc::jit::tempdir::~tempdir): Clean up additional
|
|
727 tempfiles.
|
|
728 * jit-tempdir.h (gcc::jit::tempdir::add_temp_file): New method.
|
|
729 (gcc::jit::tempdir::m_tempfiles): New field.
|
|
730 * docs/cp/intro/tutorial04.rst: Update for changes to toyvm.cc.
|
|
731 * docs/examples/tut04-toyvm/toyvm.cc (class compilation_result):
|
|
732 New.
|
|
733 (toyvm_function::compile): Change return type from function ptr
|
|
734 to a compilation_result.
|
|
735 (toyvm_function::get_function_name): New accessor.
|
|
736 (toyvm_function::m_funcname): New field.
|
|
737 (get_function_name): Convert to...
|
|
738 (toyvm_function::make_function_name): ...this new method.
|
|
739 (toyvm_function::parse): Call make_function_name.
|
|
740 (toyvm_function::compile): Convert return type from function ptr
|
|
741 to a compilation_result. Use get_function_name.
|
|
742 (compilation_state::compile): Convert return type from
|
|
743 gcc_jit_result * to a compilation_result.
|
|
744 (test_script): Update for above changes, extracting the code from
|
|
745 the compilation_result.
|
|
746 (main): Likewise.
|
|
747 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
748
|
|
749 2016-01-04 Jakub Jelinek <jakub@redhat.com>
|
|
750
|
|
751 Update copyright years.
|
|
752
|
|
753 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
|
|
754
|
|
755 * dummy-frontend.c: Remove unused header files.
|
|
756 * jit-builtins.c: Likewise.
|
|
757 * jit-playback.c: Likewise.
|
|
758 * jit-recording.c: Likewise.
|
|
759 * jit-spec.c: Likewise.
|
|
760 * libgccjit.c: Likewise.
|
|
761
|
|
762 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
|
|
763
|
|
764 * jit-builtins.c: Don't undef DEF_BUILTIN.
|
|
765
|
|
766 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
|
|
767
|
|
768 * dummy-frontend.c: Reorder #include's and remove duplicates.
|
|
769 * jit-builtins.c: Likewise.
|
|
770 * jit-playback.c: Likewise.
|
|
771 * jit-recording.c: Likewise.
|
|
772 * libgccjit.c: Likewise.
|
|
773
|
|
774 2015-10-13 Jakub Jelinek <jakub@redhat.com>
|
|
775
|
|
776 * jit-builtins.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
|
|
777 DEF_FUNCTION_TYPE_11): Define.
|
|
778 * jit-builtins.h (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
|
|
779 DEF_FUNCTION_TYPE_11): Define.
|
|
780
|
|
781 2015-09-30 Thomas Schwinge <thomas@codesourcery.com>
|
|
782 Ulrich Drepper <drepper@gmail.com>
|
|
783
|
|
784 * jit-builtins.h: Undefine DEF_FUNCTION_TYPE_VAR_6 after use.
|
|
785
|
|
786 2015-09-30 Matthias Klose <doko@ubuntu.com>
|
|
787
|
|
788 * jit-builtins.h Define DEF_FUNCTION_TYPE_VAR_6,
|
|
789 remove DEF_FUNCTION_TYPE_VAR_11.
|
|
790 * jit-builtins.c (builtins_manager::make_type): Define and handle
|
|
791 DEF_FUNCTION_TYPE_VAR_6, remove DEF_FUNCTION_TYPE_VAR_11.
|
|
792
|
|
793 2015-08-25 David Malcolm <dmalcolm@redhat.com>
|
|
794
|
|
795 * docs/cp/topics/contexts.rst
|
|
796 (gccjit::context::set_bool_use_external_driver): New.
|
|
797 * docs/internals/test-hello-world.exe.log.txt: Update.
|
|
798 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_5): New.
|
|
799 * docs/topics/contexts.rst
|
|
800 (gcc_jit_context_set_bool_use_external_driver): New.
|
|
801 * jit-common.h (enum inner_bool_option): Add
|
|
802 INNER_BOOL_OPTION_USE_EXTERNAL_DRIVER.
|
|
803 * jit-playback.c (gcc_driver_name): New global.
|
|
804 (gcc:jit::playback::context::invoke_driver): Split out second
|
|
805 half into...
|
|
806 (gcc::jit::playback::context::invoke_embedded_driver): ...this new
|
|
807 function, and...
|
|
808 (gcc::jit::playback::context::invoke_external_driver): ...this new
|
|
809 function.
|
|
810 * jit-playback.h
|
|
811 (gcc::jit::playback::context::get_inner_bool_option): New.
|
|
812 (gcc::jit::playback::context::invoke_embedded_driver): New.
|
|
813 (gcc::jit::playback::context::invoke_external_driver): New.
|
|
814 * jit-recording.c (inner_bool_option_reproducer_strings):
|
|
815 Add entry for INNER_BOOL_OPTION_USE_EXTERNAL_DRIVER.
|
|
816 * libgccjit++.h
|
|
817 (gccjit::context::set_bool_use_external_driver): New.
|
|
818 * libgccjit.c (gcc_jit_context_set_bool_use_external_driver): New.
|
|
819 * libgccjit.h (gcc_jit_context_set_bool_use_external_driver): New.
|
|
820 (LIBGCCJIT_HAVE_gcc_jit_context_set_bool_use_external_driver):
|
|
821 New.
|
|
822 * libgccjit.map (LIBGCCJIT_ABI_5): New.
|
|
823 * notes.txt: Show invocation of embedded copy of driver.
|
|
824 * docs/internals/test-hello-world.exe.log.txt: Update
|
|
825
|
|
826 2015-08-13 David Malcolm <dmalcolm@redhat.com>
|
|
827
|
|
828 * jit-playback.c (invoke_driver): On OS X, add
|
|
829 "-Wl,-undefined,dynamic_lookup" to the driver arguments.
|
|
830
|
|
831 2015-08-03 David Malcolm <dmalcolm@redhat.com>
|
|
832
|
|
833 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_4): New.
|
|
834 * docs/topics/contexts.rst (GCC_JIT_BOOL_OPTION_DUMP_SUMMARY):
|
|
835 We no longer show a profile.
|
|
836 * docs/topics/index.rst (Topic Reference): Add performance.rst.
|
|
837 * docs/topics/performance.rst: New file.
|
|
838 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
839 * jit-playback.c (gcc::jit::playback::context::compile): Add timer
|
|
840 param when constructing the "toplev" instance.
|
|
841 (gcc::jit::playback::context::acquire_mutex): Add timer param when
|
|
842 constructing auto_timevar instance.
|
|
843 (gcc::jit::playback::context::make_fake_args): If we have a timer,
|
|
844 add "-ftime-report".
|
|
845 (gcc::jit::playback::context::invoke_driver): Add timer param when
|
|
846 constructing auto_timevar instance.
|
|
847 (gcc::jit::playback::context::dlopen_built_dso): Likewise.
|
|
848 * jit-playback.h (gcc::jit::playback::context::get_timer): New accessor.
|
|
849 * jit-recording.c: Include timevar.h.
|
|
850 (gcc::jit::recording::context::context): Initialize field "m_timer".
|
|
851 * jit-recording.h: Add forward declaration of class timer.
|
|
852 (gcc::jit::recording::context::set_timer): New method.
|
|
853 (gcc::jit::recording::context::get_timer): New method.
|
|
854 (gcc::jit::recording::context::m_timer): New field.
|
|
855 * libgccjit++.h (gccjit::timer): New class.
|
|
856 (gccjit::auto_time): New class.
|
|
857 (gccjit::context::set_timer): New method.
|
|
858 (gccjit::context::get_timer): New.
|
|
859 (gccjit::timer::timer): New.
|
|
860 (gccjit::timer::push): New.
|
|
861 (gccjit::timer::pop): New.
|
|
862 (timer::print): New.
|
|
863 (timer::get_inner_timer): New.
|
|
864 (timer::release): New.
|
|
865 (auto_time::auto_time): New.
|
|
866 (auto_time::~auto_time): New.
|
|
867 * libgccjit.c: Include timevar.h.
|
|
868 (struct gcc_jit_timer): New.
|
|
869 (gcc_jit_timer_new): New function.
|
|
870 (gcc_jit_timer_release): New function.
|
|
871 (gcc_jit_context_set_timer): New function.
|
|
872 (gcc_jit_context_get_timer): New function.
|
|
873 (gcc_jit_timer_push): New function.
|
|
874 (gcc_jit_timer_pop): New function.
|
|
875 (gcc_jit_timer_print): New function.
|
|
876 * libgccjit.h (LIBGCCJIT_HAVE_TIMING_API): New macro.
|
|
877 (gcc_jit_timer): New typedef.
|
|
878 (gcc_jit_timer_new): New function.
|
|
879 (gcc_jit_timer_release): New function.
|
|
880 (gcc_jit_context_set_timer): New function.
|
|
881 (gcc_jit_context_get_timer): New function.
|
|
882 (gcc_jit_timer_push): New function.
|
|
883 (gcc_jit_timer_pop): New function.
|
|
884 (gcc_jit_timer_print): New function.
|
|
885 * libgccjit.map (LIBGCCJIT_ABI_4): New.
|
|
886 (gcc_jit_timer_new): New function.
|
|
887 (gcc_jit_timer_release): New function.
|
|
888 (gcc_jit_context_set_timer): New function.
|
|
889 (gcc_jit_context_get_timer): New function.
|
|
890 (gcc_jit_timer_push): New function.
|
|
891 (gcc_jit_timer_pop): New function.
|
|
892 (gcc_jit_timer_print): New function.
|
|
893
|
|
894 2015-07-23 David Malcolm <dmalcolm@redhat.com>
|
|
895
|
|
896 * jit-playback.c (invoke_driver): Convert local "argvec"
|
|
897 to an auto_argvec, so that it owns copies of the strings,
|
|
898 rather than borrows them, updating ADD_ARG to use xstrdup
|
|
899 and special-casing the NULL terminator to avoid
|
|
900 xstrdup (NULL). Call add_multilib_driver_arguments at the front
|
|
901 of the arguments.
|
|
902 (MULTILIB_DEFAULTS): Provide a default definition.
|
|
903 (multilib_defaults_raw): New constant array.
|
|
904 (gcc::jit::playback::context::add_multilib_driver_arguments): New
|
|
905 method.
|
|
906 * jit-playback.h
|
|
907 (gcc::jit::playback::context::add_multilib_driver_arguments): New
|
|
908 method.
|
|
909 * docs/internals/test-hello-world.exe.log.txt: Update.
|
|
910 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
911
|
|
912 2015-07-16 David Malcolm <dmalcolm@redhat.com>
|
|
913
|
|
914 * docs/internals/index.rst (Overview of code structure): Add note
|
|
915 that the implementation is in C++, despite the .c extension.
|
|
916 (Submitting patches): New subsection.
|
|
917 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
918
|
|
919 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
|
|
920
|
|
921 * dummy-frontend.c: Adjust includes for flags.h changes.
|
|
922 * jit-common.h: Likewise.
|
|
923 * jit-playback.c: Likewise.
|
|
924
|
|
925 2015-07-08 David Malcolm <dmalcolm@redhat.com>
|
|
926
|
|
927 PR jit/66783
|
|
928 * libgccjit.c (gcc_jit_context_new_field): Show name of field in
|
|
929 "unknown size" error message.
|
|
930 (gcc_jit_struct_set_fields): Show name of struct in error message.
|
|
931 (gcc_jit_context_new_global): Show name of global in
|
|
932 "unknown size" error message.
|
|
933 (gcc_jit_function_new_local): Likewise for local.
|
|
934
|
|
935 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
|
|
936
|
|
937 * dummy-frontend.c: Adjust includes.
|
|
938 * jit-common.h: Likewise.
|
|
939 * jit-playback.c: Likewise.
|
|
940
|
|
941 2015-07-07 David Malcolm <dmalcolm@redhat.com>
|
|
942
|
|
943 PR jit/66783
|
|
944 * jit-recording.h: Within namespace gcc:jit::recording...
|
|
945 (type::has_known_size): New virtual function.
|
|
946 (struct_has_known_size): New function.
|
|
947 * libgccjit.c (gcc_jit_context_new_field): Verify that the type
|
|
948 has a known size.
|
|
949 (gcc_jit_context_new_global): Likewise.
|
|
950 (gcc_jit_function_new_local): Likewise.
|
|
951
|
|
952 2015-07-07 David Malcolm <dmalcolm@redhat.com>
|
|
953
|
|
954 PR jit/66779
|
|
955 * dummy-frontend.c (jit_langhook_type_for_mode): Ensure that we
|
|
956 handle modes QI, HI, SI, DI, TI.
|
|
957
|
|
958 2015-07-01 David Malcolm <dmalcolm@redhat.com>
|
|
959
|
|
960 PR jit/66700
|
|
961 * jit-playback.c (jit_mark_addressable): New function.
|
|
962 (gcc::jit::playback::lvalue::get_address): Call
|
|
963 jit_mark_addressable on the underlying tree.
|
|
964
|
|
965 2015-07-01 David Malcolm <dmalcolm@redhat.com>
|
|
966
|
|
967 * docs/topics/types.rst (gcc_jit_context_new_union_type): Add
|
|
968 documentation.
|
|
969 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
970
|
|
971 2015-07-01 David Malcolm <dmalcolm@redhat.com>
|
|
972
|
|
973 * docs/topics/contexts.rst (gcc_jit_context_set_bool_option):
|
|
974 Clarify lack of lifetime requirements on (const char *) parameter.
|
|
975 * docs/topics/expressions.rst
|
|
976 (gcc_jit_context_new_string_literal): Likewise.
|
|
977 (gcc_jit_context_new_global): Likewise.
|
|
978 * docs/topics/functions.rst (gcc_jit_context_new_param): Likewise.
|
|
979 (gcc_jit_context_new_function): Likewise.
|
|
980 (gcc_jit_function_new_block): Likewise.
|
|
981 (gcc_jit_block_add_comment): Likewise.
|
|
982 * docs/topics/locations.rst (gcc_jit_context_new_location):
|
|
983 Likewise.
|
|
984 * docs/topics/types.rst (gcc_jit_context_new_field): Likewise.
|
|
985 (gcc_jit_context_new_struct_type): Likewise.
|
|
986 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
987
|
|
988 2015-06-30 David Malcolm <dmalcolm@redhat.com>
|
|
989
|
|
990 * docs/cp/topics/functions.rst (Blocks): Add switch statements to
|
|
991 list of ways to terminate a block.
|
|
992 (gccjit::block::end_with_switch): Add function description.
|
|
993 (gccjit::case_): Add class.
|
|
994 (gccjit::context::new_case): Add function description.
|
|
995 * docs/cp/topics/objects.rst: Add "case_" to class hierarchy.
|
|
996 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_3): New.
|
|
997 * docs/topics/functions.rst (Blocks): Add switch statements to
|
|
998 list of ways to terminate a block.
|
|
999 (gcc_jit_block_end_with_switch): Add function description.
|
|
1000 (gcc_jit_case): Add type.
|
|
1001 (gcc_jit_context_new_case): Add function description.
|
|
1002 (gcc_jit_case_as_object): Add function description.
|
|
1003 * docs/topics/objects.rst: Add gcc_jit_case to class hierarchy.
|
|
1004 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
1005 * jit-common.h (gcc::jit::recording::case_): Add forward decl.
|
|
1006 (gcc::jit::playback::case_): Add forward decl.
|
|
1007 * jit-playback.c (add_case): New function.
|
|
1008 (gcc::jit::playback::block::add_switch): New function.
|
|
1009 * jit-playback.h (gcc::jit::playback::case_): New struct.
|
|
1010 (gcc::jit::playback::block::get_function): New method.
|
|
1011 (gcc::jit::playback::block::add_switch): New method.
|
|
1012 * jit-recording.c: Within namespace gcc::jit...
|
|
1013 (recording::context::new_case): New method.
|
|
1014 (recording::function::validate): Update for change to
|
|
1015 get_successor_blocks.
|
|
1016 (recording::block::end_with_switch): New method.
|
|
1017 (recording::block::get_successor_blocks): Update to support an
|
|
1018 arbitrary number of successor blocks.
|
|
1019 (recording::block::dump_edges_to_dot): Likewise.
|
|
1020 (memento_of_new_rvalue_from_const <int>::get_wide_int): New.
|
|
1021 (memento_of_new_rvalue_from_const <long>::get_wide_int): New.
|
|
1022 (memento_of_new_rvalue_from_const <double>::get_wide_int): New.
|
|
1023 (memento_of_new_rvalue_from_const <void *>::get_wide_int): New.
|
|
1024 (recording::statement::get_successor_blocks): Update to support an
|
|
1025 arbitrary number of successor blocks.
|
|
1026 (recording::conditional::get_successor_blocks): Likewise.
|
|
1027 (recording::jump::get_successor_blocks): Likewise.
|
|
1028 (recording::return_::get_successor_blocks): Likewise.
|
|
1029 (recording::case_::write_reproducer): New.
|
|
1030 (recording::case_::make_debug_string): New.
|
|
1031 (recording::switch_::switch_): New.
|
|
1032 (recording::switch_::replay_into): New.
|
|
1033 (recording::switch_::get_successor_blocks): New.
|
|
1034 (recording::switch_::make_debug_string): New.
|
|
1035 (recording::switch_::write_reproducer): New.
|
|
1036 * jit-recording.h: Within namespace gcc::jit::recording...
|
|
1037 (context::new_case): New.
|
|
1038 (rvalue::is_constant): New.
|
|
1039 (rvalue::get_wide_int): New.
|
|
1040 (block::end_with_switch): New.
|
|
1041 (block::get_successor_blocks): Update to support an arbitrary
|
|
1042 number of successor blocks.
|
|
1043 (memento_of_new_rvalue_from_const::is_constant): New.
|
|
1044 (memento_of_new_rvalue_from_const::get_wide_int): New.
|
|
1045 (statement::get_successor_blocks): Update to support an arbitrary
|
|
1046 number of successor blocks.
|
|
1047 (conditional::get_successor_blocks): Likewise.
|
|
1048 (jump::get_successor_blocks): Likewise.
|
|
1049 (return_::get_successor_blocks): Likewise.
|
|
1050 (case_): New subclass of memento.
|
|
1051 (switch_): New subclass of statement.
|
|
1052 * libgccjit++.h (gccjit::case_): New subclass of gccjit::object.
|
|
1053 (gccjit::context::new_case): New method.
|
|
1054 (gccjit::block::end_with_switch): New method.
|
|
1055 (gccjit::case_::case): New ctors.
|
|
1056 (gccjit::case_::get_inner_case): New method.
|
|
1057 * libgccjit.c: Include "typed-splay-tree.h"
|
|
1058 (struct gcc_jit_case): New.
|
|
1059 (gcc_jit_context_new_case): New function.
|
|
1060 (gcc_jit_case_as_object): New function.
|
|
1061 (valid_dest_for_switch): New function.
|
|
1062 (valid_case_for_switch): New function.
|
|
1063 (class api_call_validator): New class.
|
|
1064 (class case_range_validator): New class.
|
|
1065 (case_range_validator::case_range_validator): New.
|
|
1066 (case_range_validator::validate): New.
|
|
1067 (case_range_validator::case_compare): New.
|
|
1068 (case_range_validator::get_wide_int): new.
|
|
1069 (gcc_jit_block_end_with_switch): New.
|
|
1070 * libgccjit.h: Add gcc_jit_case to class hierarchy comment.
|
|
1071 (gcc_jit_case): New typedef.
|
|
1072 (gcc_jit_context_new_case): New function.
|
|
1073 (gcc_jit_case_as_object): New function.
|
|
1074 (gcc_jit_block_end_with_switch): New function.
|
|
1075 (LIBGCCJIT_HAVE_SWITCH_STATEMENTS): New.
|
|
1076 * libgccjit.map: Add gcc_jit_block_end_with_switch,
|
|
1077 gcc_jit_case_as_object and gcc_jit_context_new_case.
|
|
1078
|
|
1079 2015-06-30 David Malcolm <dmalcolm@redhat.com>
|
|
1080
|
|
1081 PR jit/66546
|
|
1082 * docs/cp/topics/contexts.rst
|
|
1083 (gccjit::context::set_bool_allow_unreachable_blocks): New.
|
|
1084 * docs/topics/compatibility.rst (LIBGCCJIT_ABI_2): New.
|
|
1085 * docs/topics/contexts.rst (Options): Add notes discussing the
|
|
1086 transition from enums to entrypoints for new options.
|
|
1087 (gcc_jit_context_set_bool_allow_unreachable_blocks): New.
|
|
1088 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
1089 * jit-common.h (gcc::jit::inner_bool_option): New enum.
|
|
1090 * jit-recording.c: Within namespace gcc::jit...
|
|
1091 (recording::context::context): Handle m_inner_bool_options.
|
|
1092 (recording::context::set_inner_bool_option): New.
|
|
1093 (inner_bool_option_reproducer_strings): New.
|
|
1094 (recording::context::log_all_options): Log the "inner" bool
|
|
1095 options.
|
|
1096 (recording::context::log_inner_bool_option): New.
|
|
1097 (recording::context::dump_reproducer_to_file): Write initializers
|
|
1098 for "inner" bool options.
|
|
1099 (recording::function::validate): Don't check for block
|
|
1100 reachability if INNER_BOOL_OPTION_ALLOW_UNREACHABLE_BLOCKS is set.
|
|
1101 * jit-recording.h: Within namespace gcc::jit...
|
|
1102 (recording::context::set_inner_bool_option): New.
|
|
1103 (recording::context::get_inner_bool_option): New.
|
|
1104 (recording::context::log_inner_bool_option): New.
|
|
1105 (recording::context::m_inner_bool_options): New.
|
|
1106 * libgccjit++.h
|
|
1107 (gccjit::context::set_bool_allow_unreachable_blocks): New.
|
|
1108 * libgccjit.c
|
|
1109 (gcc_jit_context_set_bool_allow_unreachable_blocks): New.
|
|
1110 * libgccjit.h: Add note about options present in the
|
|
1111 initial release of libgccjit.
|
|
1112 (gcc_jit_context_set_bool_allow_unreachable_blocks): New API
|
|
1113 entrypoint.
|
|
1114 (LIBGCCJIT_HAVE_gcc_jit_context_set_bool_allow_unreachable_blocks):
|
|
1115 New macro.
|
|
1116 * libgccjit.map (LIBGCCJIT_ABI_2): New, containing...
|
|
1117 (gcc_jit_context_set_bool_allow_unreachable_blocks): ...this new
|
|
1118 entrypoint.
|
|
1119
|
|
1120 2015-06-30 David Malcolm <dmalcolm@redhat.com>
|
|
1121
|
|
1122 PR jit/66628
|
|
1123 * docs/cp/topics/contexts.rst (Additional command-line options):
|
|
1124 New section.
|
|
1125 * docs/topics/compatibility.rst: New file.
|
|
1126 * docs/topics/contexts.rst (Additional command-line options): New
|
|
1127 section.
|
|
1128 * docs/topics/index.rst: Add compatibility.rst.
|
|
1129 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
1130 * jit-playback.c (make_fake_args): Add call to
|
|
1131 append_command_line_options.
|
|
1132 * jit-recording.c: Within namespace gcc::jit...
|
|
1133 (recording::context::~context): Free the optnames within
|
|
1134 m_command_line_options.
|
|
1135 (recording::context::set_bool_option): Likewise.
|
|
1136 (recording::context::add_command_line_option): New method.
|
|
1137 (recording::context::append_command_line_options): New method.
|
|
1138 (recording::context::dump_reproducer_to_file): Add command-line
|
|
1139 options.
|
|
1140 * jit-recording.h: Within namespace gcc::jit...
|
|
1141 (recording::context::add_command_line_option): New method.
|
|
1142 (recording::context::append_command_line_options): New method.
|
|
1143 (recording::context::m_command_line_options): New field.
|
|
1144 * libgccjit++.h (gccjit::context::add_command_line_option): New
|
|
1145 method.
|
|
1146 * libgccjit.c (gcc_jit_context_add_command_line_option): New API
|
|
1147 entrypoint.
|
|
1148 * libgccjit.h (gcc_jit_context_add_command_line_option): New API
|
|
1149 entrypoint.
|
|
1150 (LIBGCCJIT_HAVE_gcc_jit_context_add_command_line_option): New
|
|
1151 macro.
|
|
1152 * libgccjit.map: Put existing symbols within LIBGCCJIT_ABI_0; add
|
|
1153 LIBGCCJIT_ABI_1 and gcc_jit_context_add_command_line_option.
|
|
1154
|
|
1155 2015-06-30 David Malcolm <dmalcolm@redhat.com>
|
|
1156
|
|
1157 * jit-recording.c
|
|
1158 (gcc::jit::recording::context::dump_reproducer_to_file):
|
|
1159 Add pragma to generated reproducers to disable -Wunused-variable.
|
|
1160 Fix handling of NULL string options.
|
|
1161
|
|
1162 2015-06-30 David Malcolm <dmalcolm@redhat.com>
|
|
1163
|
|
1164 * docs/cp/topics/expressions.rst: Remove stray semicolon.
|
|
1165 * docs/cp/topics/functions.rst: Remove stray backslash.
|
|
1166 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
1167
|
|
1168 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
|
|
1169
|
|
1170 * dummy-frontend.c: Remove ipa-ref.h and plugin-api.h from include list.
|
|
1171 * jit-playback.c: Likewise.
|
|
1172
|
|
1173 2015-06-25 Andrew Macleod <amacleod@redhat.com>
|
|
1174
|
|
1175 * jit-common.h: Don't include alias.h.
|
|
1176
|
|
1177 2015-06-17 David Malcolm <dmalcolm@redhat.com>
|
|
1178
|
|
1179 * libgccjit.c (gcc_jit_lvalue_access_field): Verify that the field
|
|
1180 is for the correct struct.
|
|
1181 (gcc_jit_rvalue_access_field): Likewise.
|
|
1182
|
|
1183 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
|
|
1184
|
|
1185 * dummy-frontend.c: Do not include input.h, line-map.h or is-a.h.
|
|
1186 * jit-common.h: Likewise.
|
|
1187 * jit-playback.c: Likewise.
|
|
1188
|
|
1189 2015-06-16 David Malcolm <dmalcolm@redhat.com>
|
|
1190
|
|
1191 PR jit/66539
|
|
1192 * jit-recording.c: Within namespace gcc::jit::recording::
|
|
1193 (rvalue::get_debug_string_parens): New function.
|
|
1194 (binary_op::make_debug_string): Update to mimic C precedence
|
|
1195 rules.
|
|
1196 (binary_op_precedence): New array.
|
|
1197 (binary_op::get_precedence): New function.
|
|
1198 (comparison::make_debug_string): Update to mimic C precedence
|
|
1199 rules.
|
|
1200 (comparison_precedence): New array.
|
|
1201 (comparison::get_precedence): New function.
|
|
1202 (cast::make_debug_string): Update to mimic C precedence rules.
|
|
1203 (call::make_debug_string): Likewise.
|
|
1204 (call_through_ptr::make_debug_string): Likewise.
|
|
1205 (array_access::make_debug_string): Likewise.
|
|
1206 (access_field_of_lvalue::make_debug_string): Likewise.
|
|
1207 (access_field_rvalue::make_debug_string): Likewise.
|
|
1208 (dereference_field_rvalue::make_debug_string): Likewise.
|
|
1209 (dereference_rvalue::make_debug_string): Likewise.
|
|
1210 (get_address_of_lvalue::make_debug_string): Likewise.
|
|
1211 * jit-recording.h: Within namespace gcc::jit::recording::
|
|
1212 (precedence): New enum.
|
|
1213 (rvalue::rvalue): Initialize field "m_parenthesized_string".
|
|
1214 (rvalue::get_debug_string_parens): New method.
|
|
1215 (rvalue::get_precedence): New pure virtual function.
|
|
1216 (rvalue::m_parenthesized_string): New field.
|
|
1217 (param::get_precedence): New function.
|
|
1218 (global::get_precedence): New function.
|
|
1219 (memento_of_new_rvalue_from_const::get_precedence): New function.
|
|
1220 (memento_of_new_string_literal::get_precedence): New function.
|
|
1221 (unary_op::get_precedence): New function.
|
|
1222 (binary_op::get_precedence): New function.
|
|
1223 (comparison::get_precedence): New function.
|
|
1224 (cast::get_precedence): New function.
|
|
1225 (call::get_precedence): New function.
|
|
1226 (call_through_ptr::get_precedence): New function.
|
|
1227 (array_access::get_precedence): New function.
|
|
1228 (access_field_of_lvalue::get_precedence): New function.
|
|
1229 (access_field_rvalue::get_precedence): New function.
|
|
1230 (dereference_field_rvalue::get_precedence): New function.
|
|
1231 (dereference_rvalue::get_precedence): New function.
|
|
1232 (get_address_of_lvalue::get_precedence): New function.
|
|
1233 (local::get_precedence): New function.
|
|
1234
|
|
1235 2015-06-09 Matthias Klose <doko@ubuntu.com>
|
|
1236
|
|
1237 * Make-lang.in (jit.install-common): Install headers using INSTALL_DATA.
|
|
1238
|
|
1239 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
|
|
1240
|
|
1241 * dummy-frontend.c : Adjust include files.
|
|
1242 * jit-common.h : Likewise.
|
|
1243 * jit-playback.c : Likewise.
|
|
1244
|
|
1245 2015-06-05 David Malcolm <dmalcolm@redhat.com>
|
|
1246
|
|
1247 * dummy-frontend.c
|
|
1248 (jit_langhook_post_compilation_parsing_cleanups): Remove.
|
|
1249 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): Remove
|
|
1250 * jit-playback.c (gcc::jit::playback::context::new_global): Add
|
|
1251 call to varpool_node::finalize_decl.
|
|
1252 (gcc::jit::playback::context::finalize_global_decls): Remove.
|
|
1253 * jit-playback.h
|
|
1254 (gcc::jit::playback::context::finalize_global_decls): Remove.
|
|
1255
|
|
1256 2015-06-05 David Malcolm <dmalcolm@redhat.com>
|
|
1257
|
|
1258 * dummy-frontend.c (jit_langhook_write_globals): Rename to...
|
|
1259 (jit_langhook_post_compilation_parsing_cleanups): ...this, and
|
|
1260 eliminate calls to finalize_compilation_unit and
|
|
1261 write_global_decls_2.
|
|
1262 (LANG_HOOKS_WRITE_GLOBALS): Rename to...
|
|
1263 (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): ...this and
|
|
1264 redirect from jit_langhook_write_globals to
|
|
1265 jit_langhook_post_compilation_parsing_cleanups.
|
|
1266 * jit-playback.c
|
|
1267 (gcc::jit::playback::context::write_global_decls_1): Rename to...
|
|
1268 (gcc::jit::playback::context::finalize_global_decls): ...this.
|
|
1269 (gcc::jit::playback::context::write_global_decls_1): Delete.
|
|
1270 * jit-playback.h
|
|
1271 (gcc::jit::playback::context::write_global_decls_1): Rename to...
|
|
1272 (gcc::jit::playback::context::finalize_global_decls): ...this.
|
|
1273 (gcc::jit::playback::context::write_global_decls_1): Delete.
|
|
1274
|
|
1275 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
|
|
1276
|
|
1277 * dummy-frontend.c: Adjust includes for restructured coretypes.h.
|
|
1278 * jit-common.h: Likewise.
|
|
1279 * jit-playback.c: Likewise.
|
|
1280
|
|
1281 2015-05-12 David Malcolm <dmalcolm@redhat.com>
|
|
1282
|
|
1283 * jit-builtins.c: Include vec.h before target.h.
|
|
1284
|
|
1285 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
|
|
1286
|
|
1287 * Make-lang.in (jit.mostlyclean): Remove shared libraries and object
|
|
1288 files.
|
|
1289
|
|
1290 2015-04-09 David Malcolm <dmalcolm@redhat.com>
|
|
1291
|
|
1292 PR jit/65691
|
|
1293 * docs/cp/topics/expressions.rst (Simple expressions): Fix copy
|
|
1294 and paste error in description of gccjit::context::one.
|
|
1295 * docs/topics/expressions.rst (Simple expressions): Likewise in
|
|
1296 description of gcc_jit_context_one.
|
|
1297 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
1298
|
|
1299 2015-03-13 Uros Bizjak <ubizjak@gmail.com>
|
|
1300
|
|
1301 * jit-recording.c (dump::write): Also check vasprintf return value.
|
|
1302 (recording::context::add_error_va): Ditto.
|
|
1303 (recording::string::from_printf): Ditto.
|
|
1304
|
|
1305 2015-03-13 David Malcolm <dmalcolm@redhat.com>
|
|
1306
|
|
1307 * docs/internals/index.rst (Packaging notes): New section.
|
|
1308 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
1309
|
|
1310 2015-03-05 David Malcolm <dmalcolm@redhat.com>
|
|
1311
|
|
1312 * docs/cp/intro/tutorial03.rst: Add missing arguments to
|
|
1313 gccjit::block::end_with_conditional call. Add on_true/on_false
|
|
1314 comments. Tweak the wording.
|
|
1315 * docs/intro/tutorial03.rst: Add missing arguments to
|
|
1316 gcc_jit_block_end_with_conditional call. Add some clarifying
|
|
1317 comments.
|
|
1318 * docs/topics/compilation.rst: Tweak the wording to avoid an
|
|
1319 ambiguous use of "this".
|
|
1320 * docs/topics/contexts.rst: Fix a typo.
|
|
1321 * docs/topics/expressions.rst (GCC_JIT_BINARY_OP_MINUS): Remove
|
|
1322 a stray backtick.
|
|
1323 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
1324
|
|
1325 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
|
|
1326
|
|
1327 PR libgomp/64625
|
|
1328 * jit-builtins.c (DEF_FUNCTION_TYPE_VAR_8)
|
|
1329 (DEF_FUNCTION_TYPE_VAR_12): Remove macros.
|
|
1330 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
|
|
1331 * jit-builtins.h (DEF_FUNCTION_TYPE_VAR_8)
|
|
1332 (DEF_FUNCTION_TYPE_VAR_12): Remove macros.
|
|
1333 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
|
|
1334
|
|
1335 2015-02-04 David Malcolm <dmalcolm@redhat.com>
|
|
1336
|
|
1337 PR jit/64257
|
|
1338 * docs/conf.py (html_theme): Change from 'pyramid'
|
|
1339 to 'sphinxdoc'.
|
|
1340
|
|
1341 2015-02-04 David Malcolm <dmalcolm@redhat.com>
|
|
1342
|
|
1343 * docs/topics/contexts.rst (gcc_jit_context_acquire): Fix
|
|
1344 typo.
|
|
1345 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
1346
|
|
1347 2015-02-03 David Malcolm <dmalcolm@redhat.com>
|
|
1348
|
|
1349 * jit-logging.h (gcc::jit::log_user::log): Make const.
|
|
1350 * jit-recording.c (gcc::jit::recording::context::set_str_option):
|
|
1351 Log the new value of the option.
|
|
1352 (gcc::jit::recording::context::set_int_option): Likewise.
|
|
1353 (gcc::jit::recording::context::set_bool_option): Likewise.
|
|
1354 (gcc::jit::recording::context::compile): Log the value of all
|
|
1355 options.
|
|
1356 (gcc::jit::recording::context::compile_to_file): Likewise.
|
|
1357 (gcc::jit::recording::context::log_all_options): New function.
|
|
1358 (gcc::jit::recording::context::log_str_option): New function.
|
|
1359 (gcc::jit::recording::context::log_int_option): New function.
|
|
1360 (gcc::jit::recording::context::log_bool_option): New function.
|
|
1361 * jit-recording.h (gcc::jit::recording::context::log_all_options):
|
|
1362 New function.
|
|
1363 (gcc::jit::recording::context::log_str_option): New function.
|
|
1364 (gcc::jit::recording::context::log_int_option): New function.
|
|
1365 (gcc::jit::recording::context::log_bool_option): New function.
|
|
1366 * docs/internals/test-hello-world.exe.log.txt: Update for above
|
|
1367 changes.
|
|
1368 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
1369
|
|
1370 2015-02-03 David Malcolm <dmalcolm@redhat.com>
|
|
1371
|
|
1372 PR jit/64810
|
|
1373 * Make-lang.in (jit_OBJS): Add jit/jit-spec.o and gcc.o.
|
|
1374 (LIBGCCJIT_FILENAME): Add EXTRA_GCC_OBJS.
|
|
1375 * jit-playback.c: Include gcc.h.
|
|
1376 (gcc::jit::playback::context::compile): Move mutex acquisition
|
|
1377 to before the call to make_fake_args.
|
|
1378 (append_arg_from_driver): New function.
|
|
1379 (gcc::jit::playback::context::make_fake_args): On the first call,
|
|
1380 call into driver_get_configure_time_options to get configure-time
|
|
1381 default options and cache them. Add them to the args for
|
|
1382 toplev::main.
|
|
1383 * jit-spec.c: New source file.
|
|
1384 * docs/internals/test-hello-world.exe.log.txt: Update to reflect
|
|
1385 above changes.
|
|
1386 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
1387
|
|
1388 2015-02-02 David Malcolm <dmalcolm@redhat.com>
|
|
1389
|
|
1390 PR jit/64810
|
|
1391 * dummy-frontend.c (jit_langhook_type_for_mode): Support
|
|
1392 TYPE_MODE (long_long_integer_type_node).
|
|
1393
|
|
1394 2015-01-27 David Malcolm <dmalcolm@redhat.com>
|
|
1395
|
|
1396 * docs/internals/test-hello-world.exe.log.txt: Add example version
|
|
1397 lines.
|
|
1398 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
1399 * jit-common.h (gcc::jit::dump::get_file): New accessor.
|
|
1400 * jit-logging.c: Include toplev.h.
|
|
1401 (gcc::jit::logger::logger): Log the GCC version.
|
|
1402 * jit-recording.c: Include toplev.h.
|
|
1403 (gcc:jit::recording::context::dump_reproducer_to_file): Log the
|
|
1404 GCC version.
|
|
1405
|
|
1406 2015-01-26 David Malcolm <dmalcolm@redhat.com>
|
|
1407
|
|
1408 * docs/topics/compilation.rst (gcc_jit_result_get_code): Fix typo.
|
|
1409 * docs/topics/contexts.rst (gcc_jit_context_get_last_error): The
|
|
1410 error buffer is only valid until the next call to the context.
|
|
1411 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
1412 * libgccjit.h (gcc_jit_context_get_first_error): Reword the
|
|
1413 comment to omit mention of compiling.
|
|
1414 (gcc_jit_context_get_last_error): The error buffer is only valid
|
|
1415 until the next call to the context.
|
|
1416
|
|
1417 2015-01-26 David Malcolm <dmalcolm@redhat.com>
|
|
1418
|
|
1419 PR jit/64708
|
|
1420 * config-lang.in (compilers): Drop "libgccjit.so".
|
|
1421
|
|
1422 2015-01-23 David Malcolm <dmalcolm@redhat.com>
|
|
1423
|
|
1424 PR jit/64721
|
|
1425 * jit-playback.c (gcc::jit::playback::context::compile): Construct
|
|
1426 toplev instances with init_signals=false.
|
|
1427
|
|
1428 2015-01-19 David Malcolm <dmalcolm@redhat.com>
|
|
1429
|
|
1430 * docs/cp/topics/results.rst: Rename to...
|
|
1431 * docs/cp/topics/compilation.rst: ...this, and add section on
|
|
1432 ahead-of-time compilation.
|
|
1433 * docs/cp/topics/index.rst: Update for renaming of results.rst
|
|
1434 to compilation.rst.
|
|
1435 * docs/examples/emit-alphabet.bf: New file, a sample "brainf"
|
|
1436 script.
|
|
1437 * docs/examples/tut05-bf.c: New file, implementing a compiler
|
|
1438 for "brainf".
|
|
1439 * docs/internals/test-hello-world.exe.log.txt: Update to reflect
|
|
1440 changes to logger output.
|
|
1441 * docs/intro/index.rst: Add tutorial05.rst
|
|
1442 * docs/intro/tutorial05.rst: New file.
|
|
1443 * docs/topics/results.rst: Rename to...
|
|
1444 * docs/topics/compilation.rst: ...this, and add section on
|
|
1445 ahead-of-time compilation.
|
|
1446 * docs/topics/index.rst: Update for renaming of results.rst to
|
|
1447 compilation.rst.
|
|
1448 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
1449 * jit-playback.c (gcc::jit::playback::context::compile): Convert
|
|
1450 return type from result * to void. Move the code to convert to
|
|
1451 dso and dlopen the result to a new pure virtual "postprocess"
|
|
1452 method.
|
|
1453 (gcc::jit::playback::compile_to_memory::compile_to_memory): New
|
|
1454 function.
|
|
1455 (gcc::jit::playback::compile_to_memory::postprocess): New
|
|
1456 function, based on playback::context::compile.
|
|
1457 (gcc::jit::playback::compile_to_file::compile_to_file): New
|
|
1458 function.
|
|
1459 (gcc::jit::playback::compile_to_file::postprocess): New function.
|
|
1460 (gcc::jit::playback::compile_to_file::copy_file): New function.
|
|
1461 (gcc::jit::playback::context::convert_to_dso): Move internals
|
|
1462 to...
|
|
1463 (gcc::jit::playback::context::invoke_driver): New method. Add
|
|
1464 "-shared" and "-c" options to driver's argv as needed.
|
|
1465 * jit-playback.h: Include "timevar.h".
|
|
1466 (gcc::jit::playback::context::compile): Convert return type from
|
|
1467 result * to void.
|
|
1468 (gcc::jit::playback::context::postprocess): New pure virtual
|
|
1469 function, making this an abstract base class.
|
|
1470 (gcc::jit::playback::context::get_tempdir): New accessor.
|
|
1471 (gcc::jit::playback::context::invoke_driver): New function.
|
|
1472 (class gcc::jit::playback::compile_to_memory): New subclass of
|
|
1473 playback::context.
|
|
1474 (class gcc::jit::playback::compile_to_file): Likewise.
|
|
1475 * jit-recording.c (gcc::jit::recording::context::compile): Use a
|
|
1476 playback::compile_to_memory, and extract its result.
|
|
1477 (gcc::jit::recording::context::compile_to_file): New function.
|
|
1478 * jit-recording.h (gcc::jit::recording::context::compile_to_file):
|
|
1479 New function.
|
|
1480 * libgccjit++.h (gccjit::context::compile_to_file): New method.
|
|
1481 * libgccjit.c (gcc_jit_context_compile): Update log message to
|
|
1482 clarify that this is an in-memory compile.
|
|
1483 (gcc_jit_context_compile_to_file): New function.
|
|
1484 * libgccjit.h (gcc_jit_context): Clarify that you can compile
|
|
1485 a context more than once, and that you can compile to a file
|
|
1486 as well as to memory.
|
|
1487 (gcc_jit_result): Clarify that this is the result of an
|
|
1488 in-memory compilation.
|
|
1489 (gcc_jit_context_compile): Clarify that you can compile, and that
|
|
1490 this is an in-memory compilation.
|
|
1491 (enum gcc_jit_output_kind): New enum.
|
|
1492 (gcc_jit_context_compile_to_file): New function.
|
|
1493 (gcc_jit_context_enable_dump): Clarify comment to cover both forms
|
|
1494 of compilation.
|
|
1495 * libgccjit.map (gcc_jit_context_compile_to_file): New API
|
|
1496 entrypoint.
|
|
1497 * notes.txt: Update to show the playback::context::postprocess
|
|
1498 virtual function.
|
|
1499
|
|
1500 2015-01-19 David Malcolm <dmalcolm@redhat.com>
|
|
1501
|
|
1502 * jit-recording.c
|
|
1503 (gcc::jit::recording::memento_of_new_string_literal::make_debug_string):
|
|
1504 Add missing format string.
|
|
1505
|
|
1506 2015-01-16 David Malcolm <dmalcolm@redhat.com>
|
|
1507
|
|
1508 * Make-lang.in (lang_checks_parallelized): Add "check-jit".
|
|
1509 (check_jit_parallelize): Set this to an arbitrary value (10).
|
|
1510
|
|
1511 2015-01-16 Jakub Jelinek <jakub@redhat.com>
|
|
1512
|
|
1513 * jit-builtins.h (DEF_FUNCTION_TYPE_VAR_5): Fix spelling of
|
|
1514 last argument.
|
|
1515 (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12): Define and
|
|
1516 undef afterwards.
|
|
1517 * jit-builtins.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
|
|
1518 Likewise.
|
|
1519
|
|
1520 2015-01-15 Richard Sandiford <richard.sandiford@arm.com>
|
|
1521
|
|
1522 Update copyright years in docs/.
|
|
1523
|
|
1524 2015-01-15 David Malcolm <dmalcolm@redhat.com>
|
|
1525
|
|
1526 * libgccjit.c (gcc_jit_block_add_assignment_op): Check that the
|
|
1527 lvalue and the rvalue are of compatible type.
|
|
1528
|
|
1529 2015-01-13 David Malcolm <dmalcolm@redhat.com>
|
|
1530
|
|
1531 * docs/cp/topics/contexts.rst (Debugging): Add
|
|
1532 gccjit::context::dump_reproducer_to_file.
|
|
1533 * docs/internals/index.rst (Design notes): New section,
|
|
1534 discussing input validation and
|
|
1535 gcc_jit_context_dump_reproducer_to_file.
|
|
1536 * docs/topics/contexts.rst (Debugging): Add
|
|
1537 gcc_jit_context_dump_reproducer_to_file.
|
|
1538 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
1539 * jit-common.h (gcc::jit::dump::get_context): New accessor.
|
|
1540 * jit-recording.c: Include "hash-map.h".
|
|
1541 Within namespace ::gcc::jit...
|
|
1542 (dump::write): Flush each line.
|
|
1543 (dump::make_location): Pass false for new param "created_by_user".
|
|
1544 (class allocator): New class.
|
|
1545 (allocator::~allocator): New function.
|
|
1546 (allocator::xstrdup_printf): New function.
|
|
1547 (allocator::xstrdup_printf_va): New function.
|
|
1548 (class reproducer): New subclass of dump.
|
|
1549 (reproducer::reproducer): New function.
|
|
1550 (reproducer::write_params): New function.
|
|
1551 (reproducer::write_args): New function.
|
|
1552 (reproducer::make_identifier): New function.
|
|
1553 (reproducer::make_tmp_identifier): New function.
|
|
1554 (reproducer::get_identifier): New pair of functions.
|
|
1555 (reproducer::get_identifier_as_rvalue): New function.
|
|
1556 (reproducer::get_identifier_as_lvalue): New function.
|
|
1557 (reproducer::get_identifier_as_type): New function.
|
|
1558 (reproducer::xstrdup_printf): New function.
|
|
1559 (recording::context::context): Initialize m_toplevel_ctxt.
|
|
1560 (recording::context::new_location): Add param created_by_user.
|
|
1561 (str_option_reproducer_strings): New table of strings.
|
|
1562 (int_option_reproducer_strings): Likewise.
|
|
1563 (bool_option_reproducer_strings): Likewise.
|
|
1564 (get_type_enum_strings): Likewise.
|
|
1565 (names_of_function_kinds): Likewise.
|
|
1566 (global_kind_reproducer_strings): Likewise.
|
|
1567 (unary_op_reproducer_strings): Likewise.
|
|
1568 (binary_op_reproducer_strings): Likewise.
|
|
1569 (comparison_reproducer_strings): Likewise.
|
|
1570 Within namespace ::gcc::jit::recording::...
|
|
1571 (context::dump_reproducer_to_file): New function.
|
|
1572 (string::write_reproducer): Likewise.
|
|
1573 (location::write_reproducer): Likewise.
|
|
1574 (type::access_as_type): Likewise.
|
|
1575 (memento_of_get_type::write_reproducer): Likewise.
|
|
1576 (memento_of_get_pointer::write_reproducer): Likewise.
|
|
1577 (memento_of_get_const::write_reproducer): Likewise.
|
|
1578 (memento_of_get_volatile::write_reproducer): Likewise.
|
|
1579 (array_type::write_reproducer): Likewise.
|
|
1580 (function_type::write_reproducer): Likewise.
|
|
1581 (function_type::write_deferred_reproducer): Likewise.
|
|
1582 (field::write_reproducer): Likewise.
|
|
1583 (struct_::access_as_type): Likewise.
|
|
1584 (struct_::write_reproducer): Likewise.
|
|
1585 (union_::write_reproducer): Likewise.
|
|
1586 (fields::write_reproducer): Likewise.
|
|
1587 (rvalue::access_as_rvalue): Likewise.
|
|
1588 (lvalue::access_as_rvalue): Likewise.
|
|
1589 (lvalue::access_as_lvalue): Likewise.
|
|
1590 (param::access_as_rvalue): Likewise.
|
|
1591 (param::access_as_lvalue): Likewise.
|
|
1592 (param::write_reproducer): Likewise.
|
|
1593 (function::write_reproducer): Likewise.
|
|
1594 (block::write_reproducer): Likewise.
|
|
1595 (global::write_reproducer): Likewise.
|
|
1596 (memento_of_new_rvalue_from_const <int>::write_reproducer):
|
|
1597 Likewise.
|
|
1598 (memento_of_new_rvalue_from_const <long>::write_reproducer):
|
|
1599 Likewise.
|
|
1600 (memento_of_new_rvalue_from_const <double>::write_reproducer):
|
|
1601 Likewise.
|
|
1602 (memento_of_new_rvalue_from_const <void *>::write_reproducer):
|
|
1603 Likewise.
|
|
1604 (memento_of_new_string_literal::write_reproducer): Likewise.
|
|
1605 (unary_op::write_reproducer): Likewise.
|
|
1606 (binary_op::write_reproducer): Likewise.
|
|
1607 (comparison::write_reproducer): Likewise.
|
|
1608 (cast::write_reproducer): Likewise.
|
|
1609 (call::write_reproducer): Likewise.
|
|
1610 (call_through_ptr::write_reproducer): Likewise.
|
|
1611 (array_access::write_reproducer): Likewise.
|
|
1612 (access_field_of_lvalue::write_reproducer): Likewise.
|
|
1613 (access_field_rvalue::write_reproducer): Likewise.
|
|
1614 (dereference_field_rvalue::write_reproducer): Likewise.
|
|
1615 (dereference_rvalue::write_reproducer): Likewise.
|
|
1616 (get_address_of_lvalue::write_reproducer): Likewise.
|
|
1617 (local::write_reproducer): Likewise.
|
|
1618 (eval::write_reproducer): Likewise.
|
|
1619 (assignment::write_reproducer): Likewise.
|
|
1620 (assignment_op::write_reproducer): Likewise.
|
|
1621 (comment::write_reproducer): Likewise.
|
|
1622 (conditional::write_reproducer): Likewise.
|
|
1623 (jump::write_reproducer): Likewise.
|
|
1624 (return_::write_reproducer): Likewise.
|
|
1625 * jit-recording.h (gcc::jit::reproducer): New forward declararion.
|
|
1626 Within namespace ::gcc::jit::recording::...
|
|
1627 (context::new_location): Add "created_by_user" param.
|
|
1628 (context::dump_reproducer_to_file): New method.
|
|
1629 (context::m_toplevel_ctxt): New field.
|
|
1630 (memento::write_reproducer): New pure virtual function.
|
|
1631 (memento::dyn_cast_location): New virtual function.
|
|
1632 (string::write_reproducer):
|
|
1633 (location::location): Add "created_by_user" param.
|
|
1634 (location::dyn_cast_location): New function.
|
|
1635 (location::created_by_user): New accessor.
|
|
1636 (location::write_reproducer): New function.
|
|
1637 (location::m_created_by_user): New field.
|
|
1638 (type::access_as_type): New virtual function.
|
|
1639 (location::write_reproducer): Likewise.
|
|
1640 (type::access_as_type): Likewise.
|
|
1641 (memento_of_get_type::write_reproducer): Likewise.
|
|
1642 (memento_of_get_pointer::write_reproducer): Likewise.
|
|
1643 (memento_of_get_const::write_reproducer): Likewise.
|
|
1644 (memento_of_get_volatile::write_reproducer): Likewise.
|
|
1645 (array_type::write_reproducer): Likewise.
|
|
1646 (function_type::write_reproducer): Likewise.
|
|
1647 (function_type::write_deferred_reproducer): Likewise.
|
|
1648 (field::write_reproducer): Likewise.
|
|
1649 (struct_::access_as_type): Likewise.
|
|
1650 (struct_::write_reproducer): Likewise.
|
|
1651 (union_::write_reproducer): Likewise.
|
|
1652 (union_::m_fields): Remove stray unused field.
|
|
1653 (fields::length): New accessor.
|
|
1654 (fields::get_field): New accessor.
|
|
1655 (fields::write_reproducer): New function.
|
|
1656 (rvalue::access_as_rvalue): Likewise.
|
|
1657 (lvalue::access_as_rvalue): Likewise.
|
|
1658 (lvalue::access_as_lvalue): Likewise.
|
|
1659 (param::access_as_rvalue): Likewise.
|
|
1660 (param::access_as_lvalue): Likewise.
|
|
1661 (param::write_reproducer): Likewise.
|
|
1662 (function::write_reproducer): Likewise.
|
|
1663 (block::write_reproducer): Likewise.
|
|
1664 (global::write_reproducer): Likewise.
|
|
1665 (memento_of_new_rvalue_from_const <HOST_TYPE>::write_reproducer):
|
|
1666 Likewise.
|
|
1667 (memento_of_new_string_literal::write_reproducer): Likewise.
|
|
1668 (unary_op::write_reproducer): Likewise.
|
|
1669 (binary_op::write_reproducer): Likewise.
|
|
1670 (comparison::write_reproducer): Likewise.
|
|
1671 (cast::write_reproducer): Likewise.
|
|
1672 (call::write_reproducer): Likewise.
|
|
1673 (call_through_ptr::write_reproducer): Likewise.
|
|
1674 (array_access::write_reproducer): Likewise.
|
|
1675 (access_field_of_lvalue::write_reproducer): Likewise.
|
|
1676 (access_field_rvalue::write_reproducer): Likewise.
|
|
1677 (dereference_field_rvalue::write_reproducer): Likewise.
|
|
1678 (dereference_rvalue::write_reproducer): Likewise.
|
|
1679 (get_address_of_lvalue::write_reproducer): Likewise.
|
|
1680 (local::write_reproducer): Likewise.
|
|
1681 (eval::write_reproducer): Likewise.
|
|
1682 (assignment::write_reproducer): Likewise.
|
|
1683 (assignment_op::write_reproducer): Likewise.
|
|
1684 (comment::write_reproducer): Likewise.
|
|
1685 (conditional::write_reproducer): Likewise.
|
|
1686 (jump::write_reproducer): Likewise.
|
|
1687 (return_::write_reproducer): Likewise.
|
|
1688 * libgccjit++.h (gccjit::context::dump_reproducer_to_file): New.
|
|
1689 * libgccjit.c (gcc_jit_context_new_location): Pass "true" as
|
|
1690 param "created_by_user".
|
|
1691 (gcc_jit_context_dump_reproducer_to_file): New API entrypoint.
|
|
1692 * libgccjit.h (gcc_jit_context_dump_reproducer_to_file): New API
|
|
1693 entrypoint.
|
|
1694 * libgccjit.map (gcc_jit_context_dump_reproducer_to_file): New API
|
|
1695 entrypoint.
|
|
1696
|
|
1697 2015-01-12 David Malcolm <dmalcolm@redhat.com>
|
|
1698
|
|
1699 * jit-recording.c (class gcc::jit::rvalue_usage_validator): New.
|
|
1700 (gcc::jit::rvalue_usage_validator::rvalue_usage_validator): New
|
|
1701 ctor.
|
|
1702 (gcc::jit::rvalue_usage_validator::visit): New function.
|
|
1703 (gcc::jit::recording::rvalue::verify_valid_within_stmt): New
|
|
1704 function.
|
|
1705 (gcc::jit::recording::rvalue::set_scope): New function.
|
|
1706 (gcc::jit::recording::function::function): Call set_scope on each
|
|
1707 param, issuing errors for any params that already have a function.
|
|
1708 (gcc::jit::recording::block::add_eval): Return the new statement;
|
|
1709 update the comment given that some error-checking now happens after
|
|
1710 this returns.
|
|
1711 (gcc::jit::recording::block::add_assignment): Likewise.
|
|
1712 (gcc::jit::recording::block::add_assignment_op): Likewise.
|
|
1713 (gcc::jit::recording::block::add_comment): Likewise.
|
|
1714 (gcc::jit::recording::block::end_with_conditional): Likewise.
|
|
1715 (gcc::jit::recording::block::end_with_jump): Likewise.
|
|
1716 (gcc::jit::recording::block::end_with_return): Likewise.
|
|
1717 (gcc::jit::recording::block::validate): Add a comment.
|
|
1718 (gcc::jit::recording::unary_op::visit_children): New function.
|
|
1719 (gcc::jit::recording::binary_op::visit_children): New function.
|
|
1720 (gcc::jit::recording::comparison::visit_children): New function.
|
|
1721 (gcc::jit::recording::cast::visit_children): New function.
|
|
1722 (gcc::jit::recording::call::visit_children): New function.
|
|
1723 (gcc::jit::recording::call_through_ptr::visit_children): New function.
|
|
1724 (gcc::jit::recording::array_access::visit_children): New function.
|
|
1725 (gcc::jit::recording::access_field_of_lvalue::visit_children): New
|
|
1726 function.
|
|
1727 (gcc::jit::recording::access_field_rvalue::visit_children): New
|
|
1728 function.
|
|
1729 (gcc::jit::recording::dereference_field_rvalue::visit_children):
|
|
1730 New function.
|
|
1731 (gcc::jit::recording::dereference_rvalue::visit_children): New
|
|
1732 function.
|
|
1733 (gcc::jit::recording::get_address_of_lvalue::visit_children): New
|
|
1734 function.
|
|
1735 * jit-recording.h: Within namespace gcc::jit::recording...
|
|
1736 (class rvalue_visitor): New.
|
|
1737 (rvalue::rvalue): Initialize m_scope.
|
|
1738 (rvalue::get_loc): New accessor.
|
|
1739 (rvalue::verify_valid_within_stmt): New function.
|
|
1740 (rvalue::visit_children): New pure virtual function.
|
|
1741 (rvalue::set_scope): New function.
|
|
1742 (rvalue::get_scope): New function.
|
|
1743 (rvalue::dyn_cast_param): New function.
|
|
1744 (rvalue::m_scope): New field.
|
|
1745 (param::visit_children): New empty function.
|
|
1746 (param::dyn_cast_param): New function.
|
|
1747 (function::get_loc): New function.
|
|
1748 (block::add_eval): Return the new statement.
|
|
1749 (block::add_assignment): Likewise.
|
|
1750 (block::add_assignment_op): Likewise.
|
|
1751 (block::add_comment): Likewise.
|
|
1752 (block::end_with_conditional): Likewise.
|
|
1753 (block::end_with_jump): Likewise.
|
|
1754 (block::end_with_return): Likewise.
|
|
1755 (global::visit_children): New function.
|
|
1756 (memento_of_new_rvalue_from_const<HOST_TYPE>::visit_children):
|
|
1757 New function.
|
|
1758 (memento_of_new_string_literal::visit_children): New function.
|
|
1759 (unary_op::visit_children): New function.
|
|
1760 (binary_op::visit_children): New function.
|
|
1761 (comparison::visit_children): New function.
|
|
1762 (cast::visit_children): New function.
|
|
1763 (call::visit_children): New function.
|
|
1764 (call_through_ptr::visit_children): New function.
|
|
1765 (array_access::visit_children): New function.
|
|
1766 (access_field_of_lvalue::visit_children): New function.
|
|
1767 (access_field_rvalue::visit_children): New function.
|
|
1768 (dereference_field_rvalue::visit_children): New function.
|
|
1769 (dereference_rvalue::visit_children): New function.
|
|
1770 (get_address_of_lvalue::visit_children): New function.
|
|
1771 (local::local): Call set_scope.
|
|
1772 (local::visit_children): New function.
|
|
1773 (statement::get_block): Make public.
|
|
1774 * libgccjit.c (RETURN_VAL_IF_FAIL_PRINTF5): New macro.
|
|
1775 (RETURN_NULL_IF_FAIL_PRINTF5): New macro.
|
|
1776 (gcc_jit_context_new_function): Verify that each param has
|
|
1777 not yet been used for creating another function.
|
|
1778 (gcc_jit_block_add_eval): After creating the stmt, verify
|
|
1779 that the rvalue expression tree is valid to use within it.
|
|
1780 (gcc_jit_block_add_assignment): Likewise for the lvalue and
|
|
1781 rvalue expression trees.
|
|
1782 (gcc_jit_block_add_assignment_op): Likewise.
|
|
1783 (gcc_jit_block_end_with_conditional): Likewise for the boolval
|
|
1784 expression tree.
|
|
1785 (gcc_jit_block_end_with_return): Likewise for the rvalue
|
|
1786 expression tree.
|
|
1787 (gcc_jit_block_end_with_void_return): Remove return of "void",
|
|
1788 now that block::end_with_return is now non-void.
|
|
1789
|
|
1790 2015-01-12 David Malcolm <dmalcolm@redhat.com>
|
|
1791
|
|
1792 * jit-playback.c (gcc::jit::playback::context::read_dump_file):
|
|
1793 Add missing fclose on error-handling path.
|
|
1794
|
|
1795 2015-01-12 David Malcolm <dmalcolm@redhat.com>
|
|
1796
|
|
1797 * docs/cp/topics/expressions.rst (Global variables): Add
|
|
1798 enum gcc_jit_global_kind param to gccjit::context::new_global.
|
|
1799 * docs/topics/expressions.rst (Global variables): Likewise.
|
|
1800 Document the new enum.
|
|
1801 * docs/topics/results.rst (Compilation results): Document
|
|
1802 globals-handling.
|
|
1803 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
1804 * dummy-frontend.c (jit_langhook_write_globals): Call into the
|
|
1805 playback context's write_global_decls_1 and write_global_decls_2
|
|
1806 before and after calling symtab->finalize_compilation_unit ().
|
|
1807 * jit-playback.c: Include "debug.h".
|
|
1808 (gcc::jit::playback::context::new_global): Add "kind" param and
|
|
1809 use it to set TREE_PUBLIC, TREE_STATIC and DECL_EXTERNAL on the
|
|
1810 underlying VAR_DECL. Call varpool_node::get_create on the
|
|
1811 VAR_DECL, and add it to m_globals.
|
|
1812 (gcc::jit::playback::context::write_global_decls_1): New function.
|
|
1813 (gcc::jit::playback::context::write_global_decls_2): New function.
|
|
1814 * jit-playback.h (gcc::jit::playback::context::context): Call
|
|
1815 create on m_globals.
|
|
1816 (gcc::jit::playback::context::new_global): Add "kind" param.
|
|
1817 (gcc::jit::playback::context::write_global_decls_1): New function.
|
|
1818 (gcc::jit::playback::context::write_global_decls_2): New function.
|
|
1819 (gcc::jit::playback::context::m_globals): New field.
|
|
1820 * jit-recording.c (gcc::jit::recording::context::context):
|
|
1821 Initialize m_globals.
|
|
1822 (gcc::jit::recording::context::new_global): Add param "kind".
|
|
1823 Add the new global to m_globals.
|
|
1824 (gcc::jit::recording::context::dump_to_file): Dump the globals.
|
|
1825 (gcc::jit::recording::global::replay_into): Add field m_kind.
|
|
1826 (gcc::jit::recording::global::write_to_dump): New override.
|
|
1827 * jit-recording.h (gcc::jit::recording::context::new_global): Add
|
|
1828 param "kind".
|
|
1829 (gcc::jit::recording::context::m_globals): New field.
|
|
1830 (gcc::jit::recording::global::global): Add param kind.
|
|
1831 (gcc::jit::recording::global::write_to_dump): New override.
|
|
1832 (gcc::jit::recording::global::m_kind): New field.
|
|
1833 * jit-result.c (gcc::jit::result::get_global): New function.
|
|
1834 * jit-result.h (gcc::jit::result::get_global): New function.
|
|
1835 * libgccjit++.h (gccjit::context::new_global): Add "kind" param.
|
|
1836 * libgccjit.c (gcc_jit_context_new_global): Likewise.
|
|
1837 (gcc_jit_result_get_global): New API entrypoint.
|
|
1838 * libgccjit.h (gcc_jit_result_get_global): New API entrypoint.
|
|
1839 (enum gcc_jit_global_kind): New enum.
|
|
1840 (gcc_jit_context_new_global): API change: add "kind" param.
|
|
1841 * libgccjit.map (gcc_jit_result_get_global): New symbol.
|
|
1842
|
|
1843 2015-01-09 David Malcolm <dmalcolm@redhat.com>
|
|
1844
|
|
1845 * dummy-frontend.c: Include "fixed-value.h", "alias.h", "flags.h",
|
|
1846 "symtab.h", "inchash.h". Move include of "hash-set.h" much
|
|
1847 earlier.
|
|
1848 * jit-builtins.c: Remove redundant includes of "opts.h" and
|
|
1849 "tree.h".
|
|
1850 * jit-common.h: Include "hash-set.h", "input.h", "vec.h",
|
|
1851 "double-int.h", "alias.h", "flags.h", "symtab.h", "inchash.h".
|
|
1852 * jit-playback.c: Include "hashtab.h", "machmode.h", "input.h",
|
|
1853 "statistics.h", "vec.h", "double-int.h", "real.h",
|
|
1854 "fixed-value.h", "alias.h", "flags.h", "symtab.h", "tree-core.h",
|
|
1855 "inchash.h", "fold-const.h". Move include of "hash-set.h" to
|
|
1856 earlier.
|
|
1857 * jit-recording.c: Remove redundant includes of "opts.h" and
|
|
1858 "tree.h".
|
|
1859
|
|
1860 2015-01-09 David Malcolm <dmalcolm@redhat.com>
|
|
1861
|
|
1862 * docs/cp/topics/expressions.rst (Simple expressions): Use
|
|
1863 ":c:type:" for C types. Document new overload of
|
|
1864 gcc::jit::context::new_rvalue.
|
|
1865 * docs/topics/expressions.rst (Simple expressions): Use
|
|
1866 ":c:type:" for C types. Document new entrypoint
|
|
1867 gcc_jit_context_new_rvalue_from_long.
|
|
1868 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
1869 * jit-playback.c: Within namespace gcc::jit::playback...
|
|
1870 (context::new_rvalue_from_int): Eliminate in favor of...
|
|
1871 (context::new_rvalue_from_const <int>): ...this.
|
|
1872 (context::new_rvalue_from_double): Eliminate in favor of...
|
|
1873 (context::new_rvalue_from_const <double>): ...this.
|
|
1874 (context::new_rvalue_from_const <long>): New.
|
|
1875 (context::new_rvalue_from_ptr): Eliminate in favor of...
|
|
1876 (context::new_rvalue_from_const <void *>): ...this.
|
|
1877 * jit-playback.h: Within namespace gcc::jit::playback...
|
|
1878 (context::new_rvalue_from_int): Eliminate in favor of...
|
|
1879 (context::new_rvalue_from_const <HOST_TYPE>): ...this.
|
|
1880 (context::new_rvalue_from_double): Likewise.
|
|
1881 (context::new_rvalue_from_ptr): Likewise.
|
|
1882 * jit-recording.c: Within namespace gcc::jit::recording...
|
|
1883 (context::new_rvalue_from_int): Eliminate.
|
|
1884 (context::new_rvalue_from_double): Likewise.
|
|
1885 (context::new_rvalue_from_ptr): Likewise.
|
|
1886 (class memento_of_new_rvalue_from_const <int>):
|
|
1887 Add explicit specialization.
|
|
1888 (class memento_of_new_rvalue_from_const <long>):
|
|
1889 Likewise.
|
|
1890 (class memento_of_new_rvalue_from_const <double>):
|
|
1891 Likewise.
|
|
1892 (class memento_of_new_rvalue_from_const <void *>):
|
|
1893 Likewise.
|
|
1894 (memento_of_new_rvalue_from_int::replay_into):
|
|
1895 Generalize into...
|
|
1896 (memento_of_new_rvalue_from_const <HOST_TYPE>::replay_into):
|
|
1897 ...this...
|
|
1898 (memento_of_new_rvalue_from_double::replay_into):
|
|
1899 ...allowing this...
|
|
1900 (memento_of_new_rvalue_from_ptr::replay_into):
|
|
1901 ...and this to be deleted.
|
|
1902 (memento_of_new_rvalue_from_int::make_debug_string):
|
|
1903 Convert to...
|
|
1904 (memento_of_new_rvalue_from_const <int>::make_debug_string):
|
|
1905 ...this.
|
|
1906 (memento_of_new_rvalue_from_double::make_debug_string):
|
|
1907 Convert to...
|
|
1908 (memento_of_new_rvalue_from_const <double>::make_debug_string):
|
|
1909 ...this.
|
|
1910 (memento_of_new_rvalue_from_ptr::make_debug_string)
|
|
1911 Convert to...
|
|
1912 (memento_of_new_rvalue_from_const <void *>::make_debug_string):
|
|
1913 ...this.
|
|
1914 (memento_of_new_rvalue_from_const <long>::make_debug_string):
|
|
1915 New function.
|
|
1916 * jit-recording.h: Within namespace gcc::jit::recording...
|
|
1917 (context::new_rvalue_from_int): Eliminate.
|
|
1918 (context::new_rvalue_from_double): Likewise.
|
|
1919 (context::new_rvalue_from_ptr): Likewise, all in favor of...
|
|
1920 (context::new_rvalue_from_const <HOST_TYPE>): New family of
|
|
1921 methods.
|
|
1922 (class memento_of_new_rvalue_from_int): Eliminate.
|
|
1923 (class memento_of_new_rvalue_from_double): Likewise.
|
|
1924 (class memento_of_new_rvalue_from_ptr): Likewise.
|
|
1925 (class memento_of_new_rvalue_from_const <HOST_TYPE>): New family
|
|
1926 of rvalue subclasses.
|
|
1927 * libgccjit++.h (gccjit::context::new_rvalue): New overload, for
|
|
1928 "long".
|
|
1929 * libgccjit.c (gcc_jit_context_new_rvalue_from_int): Update for
|
|
1930 rewriting of recording::context::new_rvalue_from_int to
|
|
1931 recording::context::new_rvalue_from_const <int>.
|
|
1932 (gcc_jit_context_new_rvalue_from_long): New API entrypoint.
|
|
1933 (gcc_jit_context_new_rvalue_from_double): Update for
|
|
1934 rewriting of recording::context::new_rvalue_from_double to
|
|
1935 recording::context::new_rvalue_from_const <double>.
|
|
1936 (gcc_jit_context_new_rvalue_from_ptr): Update for
|
|
1937 rewriting of recording::context::new_rvalue_from_ptr to
|
|
1938 recording::context::new_rvalue_from_const <void *>.
|
|
1939 * libgccjit.h (gcc_jit_context_new_rvalue_from_long): New API
|
|
1940 entrypoint.
|
|
1941 * libgccjit.map (gcc_jit_context_new_rvalue_from_long): Likewise.
|
|
1942
|
|
1943 2015-01-09 David Malcolm <dmalcolm@redhat.com>
|
|
1944
|
|
1945 PR jit/64206
|
|
1946 * docs/internals/test-hello-world.exe.log.txt: Update, the log now
|
|
1947 shows tempdir creation/cleanup.
|
|
1948 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
1949 * jit-logging.h (class gcc::jit::log_user): Add gcc::jit::tempdir
|
|
1950 to the list of subclasses in the comment.
|
|
1951 * jit-playback.c (gcc::jit::playback::context::context): Add a
|
|
1952 comment clarifying when the tempdir gets cleaned up.
|
|
1953 (gcc::jit::playback::context::compile): Pass the context's logger,
|
|
1954 if any, to the tempdir.
|
|
1955 (gcc::jit::playback::context::dlopen_built_dso): When creating the
|
|
1956 gcc::jit::result, if GCC_JIT_BOOL_OPTION_DEBUGINFO is set, hand
|
|
1957 over ownership of the tempdir to it.
|
|
1958 * jit-result.c: Include "jit-tempdir.h".
|
|
1959 (gcc::jit::result::result): Add tempdir param, saving it as
|
|
1960 m_tempdir.
|
|
1961 (gcc::jit::result::~result): Delete m_tempdir.
|
|
1962 * jit-result.h (gcc::jit::result::result): Add tempdir param.
|
|
1963 (gcc::jit::result::m_tempdir): New field.
|
|
1964 * jit-tempdir.c (gcc::jit::tempdir::tempdir): Add logger param;
|
|
1965 add JIT_LOG_SCOPE.
|
|
1966 (gcc::jit::tempdir::create): Add JIT_LOG_SCOPE to log entry/exit,
|
|
1967 and log m_path_template and m_path_tempdir.
|
|
1968 (gcc::jit::tempdir::~tempdir): Add JIT_LOG_SCOPE to log
|
|
1969 entry/exit, and log the unlink and rmdir calls.
|
|
1970 * jit-tempdir.h: Include "jit-logging.h".
|
|
1971 (class gcc::jit::tempdir): Make this be a subclass of log_user.
|
|
1972 (gcc::jit::tempdir::tempdir): Add logger param.
|
|
1973 * notes.txt: Update to show the two possible places where the
|
|
1974 tempdir can be cleaned up.
|
|
1975
|
|
1976 2015-01-08 David Malcolm <dmalcolm@redhat.com>
|
|
1977
|
|
1978 * libgccjit.h (struct gcc_jit_context): Rewrite the descriptive
|
|
1979 comment.
|
|
1980
|
|
1981 2015-01-08 David Malcolm <dmalcolm@redhat.com>
|
|
1982
|
|
1983 * docs/topics/contexts.rst (Error-handling): Document new
|
|
1984 entrypoint gcc_jit_context_get_last_error.
|
|
1985 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
1986 * jit-recording.c (gcc::jit::recording::context::context):
|
|
1987 Initialize new fields "m_last_error_str" and
|
|
1988 "m_owns_last_error_str".
|
|
1989 (gcc::jit::recording::context::~context): Clean up
|
|
1990 m_last_error_str, if needed.
|
|
1991 (gcc::jit::recording::context::add_error_va): Update
|
|
1992 m_last_error_str and m_owns_last_error_str, freeing the old
|
|
1993 value if appropriate.
|
|
1994 (gcc::jit::recording::context::get_last_error): New function.
|
|
1995 * jit-recording.h (gcc::jit::recording::context::get_last_error):
|
|
1996 New function.
|
|
1997 (gcc::jit::recording::context): New fields m_last_error_str and
|
|
1998 m_owns_last_error_str.
|
|
1999 * libgccjit.c (gcc_jit_context_get_last_error): New function.
|
|
2000 * libgccjit.h (gcc_jit_context_get_last_error): New declaration.
|
|
2001 * libgccjit.map (gcc_jit_context_get_last_error): New function.
|
|
2002
|
|
2003 2015-01-08 David Malcolm <dmalcolm@redhat.com>
|
|
2004
|
|
2005 * Make-lang.in (jit_OBJS): Add jit/jit-logging.o.
|
|
2006 * docs/internals/index.rst (Overview of code structure): Mention
|
|
2007 gcc_jit_context_set_logfile, and embed the example logfile.
|
|
2008 * docs/internals/test-hello-world.exe.log.txt: New file: example
|
|
2009 of a logfile.
|
|
2010 * docs/topics/contexts.rst (Debugging): Add documentation
|
|
2011 for gcc_jit_context_set_logfile.
|
|
2012 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
2013 * dummy-frontend.c: Include "jit-logging.h".
|
|
2014 (jit_langhook_init): Assert that there is an active playback
|
|
2015 context. If it has a logger, log entry/exit to this function.
|
|
2016 (jit_langhook_write_globals): Likewise.
|
|
2017 * jit-common.h (gcc::jit::logger): New forward declaration.
|
|
2018 * jit-logging.c: New file.
|
|
2019 * jit-logging.h: New file.
|
|
2020 * jit-playback.c: Include "jit-logging.h".
|
|
2021 (gcc::jit::playback::context::context): Initialize the log_user
|
|
2022 base class from the recording context's logger (if any). Use
|
|
2023 JIT_LOG_SCOPE to log entry/exit from the function body.
|
|
2024 (gcc::jit::playback::context::~context): Use JIT_LOG_SCOPE to
|
|
2025 log entry/exit from the function body.
|
|
2026 (gcc::jit::playback::build_stmt_list): Likewise.
|
|
2027 (gcc::jit::playback::function::postprocess): Likewise.
|
|
2028 (gcc::jit::playback::context::compile): Likewise. Log the
|
|
2029 entry/exit to toplev::main and toplev::finalize. Log the
|
|
2030 fake argv passed to toplev::main.
|
|
2031 (gcc::jit::playback::context::acquire_mutex): Use JIT_LOG_SCOPE to
|
|
2032 log entry/exit from the function body.
|
|
2033 (gcc::jit::playback::context::release_mutex): Likewise.
|
|
2034 (gcc::jit::playback::context::make_fake_args): Likewise.
|
|
2035 (gcc::jit::playback::context::extract_any_requested_dumps):
|
|
2036 Likewise.
|
|
2037 (gcc::jit::playback::context::convert_to_dso): Likewise. Also,
|
|
2038 log the arguments that the driver is invoked with.
|
|
2039 (gcc::jit::playback::context::dlopen_built_dso): Likewise. Pass
|
|
2040 the logger to the result object.
|
|
2041 (gcc::jit::playback::context::replay): Use JIT_LOG_SCOPE to
|
|
2042 log entry/exit from the function body.
|
|
2043 (gcc::jit::playback::context::dump_generated_code): Likewise.
|
|
2044 (gcc::jit::playback::context::handle_locations): Likewise.
|
|
2045 * jit-playback.h (gcc::jit::playback::context): Make this be
|
|
2046 a subclass of gcc::jit::log_user.
|
|
2047 * jit-recording.c: Include "jit-logging.h".
|
|
2048 (gcc::jit::recording::context::context: Initialize the logger to
|
|
2049 NULL for root contexts, or to the parent's logger for child
|
|
2050 contexts.
|
|
2051 (gcc::jit::recording::context::~context): Use JIT_LOG_SCOPE to
|
|
2052 log entry/exit from the function body.
|
|
2053 (gcc::jit::recording::context::replay_into): Likewise.
|
|
2054 (gcc::jit::recording::context::disassociate_from_playback):
|
|
2055 Likewise.
|
|
2056 (gcc::jit::recording::context::compile): Likewise.
|
|
2057 (recording::context::add_error_va): Likewise. Also, log the
|
|
2058 error.
|
|
2059 (gcc::jit::recording::context::validate): Use JIT_LOG_SCOPE to
|
|
2060 log entry/exit from the function body.
|
|
2061 * jit-recording.h: Include "jit-logging.h".
|
|
2062 (gcc::jit::recording::context): Make this be a subclass of
|
|
2063 gcc::jit::log_user.
|
|
2064 * jit-result.c: Include "jit-common.h" and "jit-logging.h".
|
|
2065 (gcc::jit::result::result): Add logger param, recording it.
|
|
2066 Use JIT_LOG_SCOPE to log entry/exit from the function body.
|
|
2067 (gcc::jit::result::~result(): Use JIT_LOG_SCOPE to
|
|
2068 log entry/exit from the function body.
|
|
2069 (gcc::jit::result::get_code): Likewise.
|
|
2070 * jit-result.h (gcc::jit::result): Make this be a subclass of
|
|
2071 gcc::jit::log_user.
|
|
2072 (gcc::jit::result::result): Add logger parameter.
|
|
2073 * libgccjit++.h (gccjit::context::set_logfile): New function.
|
|
2074 * libgccjit.c: Include "jit-logging.h".
|
|
2075 (gcc_jit_context_acquire): Log the context.
|
|
2076 (gcc_jit_context_release): Use JIT_LOG_FUNC to
|
|
2077 log entry/exit from the function body, and log the context.
|
|
2078 (gcc_jit_context_new_child_context): Likewise, logging both
|
|
2079 contexts.
|
|
2080 (gcc_jit_context_new_location): Use JIT_LOG_FUNC to
|
|
2081 log entry/exit from the function body.
|
|
2082 (gcc_jit_context_get_type): Likewise.
|
|
2083 (gcc_jit_context_get_int_type): Likewise.
|
|
2084 (gcc_jit_context_new_array_type): Likewise.
|
|
2085 (gcc_jit_context_new_field): Likewise.
|
|
2086 (gcc_jit_context_new_struct_type): Likewise.
|
|
2087 (gcc_jit_context_new_opaque_struct): Likewise.
|
|
2088 (gcc_jit_struct_set_fields): Likewise.
|
|
2089 (gcc_jit_context_new_union_type): Likewise.
|
|
2090 (gcc_jit_context_new_function_ptr_type): Likewise.
|
|
2091 (gcc_jit_context_new_param): Likewise.
|
|
2092 (gcc_jit_context_new_function): Likewise.
|
|
2093 (gcc_jit_context_get_builtin_function): Likewise.
|
|
2094 (gcc_jit_function_get_param): Likewise.
|
|
2095 (gcc_jit_function_dump_to_dot): Likewise.
|
|
2096 (gcc_jit_function_new_block): Likewise.
|
|
2097 (gcc_jit_context_new_global): Likewise.
|
|
2098 (gcc_jit_context_new_rvalue_from_int): Likewise.
|
|
2099 (gcc_jit_context_zero): Likewise.
|
|
2100 (gcc_jit_context_one): Likewise.
|
|
2101 (gcc_jit_context_new_rvalue_from_double): Likewise.
|
|
2102 (gcc_jit_context_new_rvalue_from_ptr): Likewise.
|
|
2103 (gcc_jit_context_null): Likewise.
|
|
2104 (gcc_jit_context_new_string_literal): Likewise.
|
|
2105 (gcc_jit_context_new_unary_op): Likewise.
|
|
2106 (gcc_jit_context_new_binary_op): Likewise.
|
|
2107 (gcc_jit_context_new_comparison): Likewise.
|
|
2108 (gcc_jit_context_new_call): Likewise.
|
|
2109 (gcc_jit_context_new_call_through_ptr): Likewise.
|
|
2110 (gcc_jit_context_new_cast): Likewise.
|
|
2111 (gcc_jit_context_new_array_access): Likewise.
|
|
2112 (gcc_jit_lvalue_access_field): Likewise.
|
|
2113 (gcc_jit_rvalue_access_field): Likewise.
|
|
2114 (gcc_jit_rvalue_dereference_field): Likewise.
|
|
2115 (gcc_jit_rvalue_dereference): Likewise.
|
|
2116 (gcc_jit_lvalue_get_address): Likewise.
|
|
2117 (gcc_jit_function_new_local): Likewise.
|
|
2118 (gcc_jit_block_add_eval): Likewise.
|
|
2119 (gcc_jit_block_add_assignment): Likewise.
|
|
2120 (gcc_jit_block_add_assignment_op): Likewise.
|
|
2121 (gcc_jit_block_end_with_conditional): Likewise.
|
|
2122 (gcc_jit_block_add_comment): Likewise.
|
|
2123 (gcc_jit_block_end_with_jump): Likewise.
|
|
2124 (gcc_jit_block_end_with_return): Likewise.
|
|
2125 (gcc_jit_block_end_with_void_return): Likewise.
|
|
2126 (gcc_jit_context_set_str_option): Likewise.
|
|
2127 (gcc_jit_context_set_int_option): Likewise.
|
|
2128 (gcc_jit_context_set_bool_option): Likewise.
|
|
2129 (gcc_jit_context_enable_dump): Likewise.
|
|
2130 (gcc_jit_context_compile): Likewise. Also log the context,
|
|
2131 and the result.
|
|
2132 (gcc_jit_context_dump_to_file): Likewise.
|
|
2133 (gcc_jit_context_set_logfile): New function.
|
|
2134 (gcc_jit_context_get_first_error): Use JIT_LOG_FUNC to
|
|
2135 log entry/exit from the function body.
|
|
2136 (gcc_jit_result_get_code): Likewise. Also log the fnname)
|
|
2137 and the ptr to be returned.
|
|
2138 (gcc_jit_result_release): Likewise. Also log the result.
|
|
2139 * libgccjit.h: Include <stdio.h>, since we need FILE *.
|
|
2140 (gcc_jit_context_set_logfile): New declaration.
|
|
2141 * libgccjit.map (gcc_jit_context_set_logfile): New.
|
|
2142
|
|
2143 2015-01-07 David Malcolm <dmalcolm@redhat.com>
|
|
2144
|
|
2145 * jit-recording.h (gcc::jit::recording::type::is_void): New
|
|
2146 virtual function.
|
|
2147 (gcc::jit::recording::memento_of_get_type::is_void): New
|
|
2148 function, overriding default implementation.
|
|
2149 * libgccjit.c (gcc_jit_rvalue_dereference): Verify that
|
|
2150 the underlying type is not "void".
|
|
2151
|
|
2152 2015-01-07 David Malcolm <dmalcolm@redhat.com>
|
|
2153
|
|
2154 * docs/topics/expressions.rst (Unary Operations): Add
|
|
2155 GCC_JIT_UNARY_OP_ABS.
|
|
2156 * jit-playback.c (gcc::jit::playback::context::new_unary_op):
|
|
2157 Likewise.
|
|
2158 * jit-recording.c (unary_op_strings): Likewise.
|
|
2159 * libgccjit.c (gcc_jit_context_new_unary_op): Update checking
|
|
2160 of "op" to reflect addition of GCC_JIT_UNARY_OP_ABS.
|
|
2161 * libgccjit.h (enum gcc_jit_unary_op): Add GCC_JIT_UNARY_OP_ABS.
|
|
2162 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
2163
|
|
2164 2015-01-07 David Malcolm <dmalcolm@redhat.com>
|
|
2165
|
|
2166 * jit-recording.h (gcc::jit::recording::memento_of_get_type): Fix
|
|
2167 typo in comment.
|
|
2168
|
|
2169 2015-01-07 David Malcolm <dmalcolm@redhat.com>
|
|
2170
|
|
2171 * TODO.rst (Test suite): Remove item about running C++ testcases.
|
|
2172 * docs/internals/index.rst (Working on the JIT library): Add
|
|
2173 "c++" to the enabled languages in the suggested "configure"
|
|
2174 invocation, and add a description of why this is necessary.
|
|
2175 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
2176
|
|
2177 2015-01-07 David Malcolm <dmalcolm@redhat.com>
|
|
2178
|
|
2179 * docs/internals/index.rst: Update to reflect that built
|
|
2180 testcases are now test-foo.c.exe, rather than test-foo.exe.
|
|
2181 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
2182
|
|
2183 2015-01-05 Jakub Jelinek <jakub@redhat.com>
|
|
2184
|
|
2185 Update copyright years.
|
|
2186
|
|
2187 2014-12-19 David Malcolm <dmalcolm@redhat.com>
|
|
2188
|
|
2189 * jit-playback.c (gcc::jit::playback::context::build_cast): In
|
|
2190 case BOOLEAN_TYPE, don't assume that the source expression is
|
|
2191 of type "int".
|
|
2192
|
|
2193 2014-12-19 David Malcolm <dmalcolm@redhat.com>
|
|
2194
|
|
2195 * jit-recording.c (gcc::jit::recording::context::context): When
|
|
2196 copying string options from a parent context, take a copy of the
|
|
2197 underlying buffers, rather than simply copying the pointer.
|
|
2198
|
|
2199 2014-12-19 David Malcolm <dmalcolm@redhat.com>
|
|
2200
|
|
2201 * jit-recording.c (gcc::jit::recording::context::set_str_option):
|
|
2202 Handle NULL.
|
|
2203
|
|
2204 2014-12-11 David Malcolm <dmalcolm@redhat.com>
|
|
2205
|
|
2206 * docs/cp/topics/contexts.rst (gccjit::context::set_str_option):
|
|
2207 Document new function.
|
|
2208 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
2209
|
|
2210 2014-12-10 Ulrich Drepper <drepper@gmail.com>
|
|
2211
|
|
2212 Minor interface cleanups of libgccjit
|
|
2213 * jit-playback.c (convert_to_dso): Use auto_vec instead
|
|
2214 of automatic array to build up command line.
|
|
2215 * jit-recording.c (recording::context::set_str_option):
|
|
2216 Make copy of the string.
|
|
2217 (recording::context::~context): Free string options.
|
|
2218 * jit-recording.h (recording::context): Adjust type
|
|
2219 of m_str_options member.
|
|
2220 * libgccjit.h: Adjust comment about
|
|
2221 gcc_jit_context_set_str_option parameter being used after
|
|
2222 the call.
|
|
2223 Update comment now that all interfaces are copy strings
|
|
2224 if necessary.
|
|
2225 * libgccjit++.h (gccjit::context): Add set_str_option
|
|
2226 member function.
|
|
2227
|
|
2228 2014-12-10 David Malcolm <dmalcolm@redhat.com>
|
|
2229
|
|
2230 * docs/cp/index.rst: New file.
|
|
2231 * docs/cp/intro/index.rst: New file.
|
|
2232 * docs/cp/intro/tutorial01.rst: New file.
|
|
2233 * docs/cp/intro/tutorial02.rst: New file.
|
|
2234 * docs/cp/intro/tutorial03.rst: New file.
|
|
2235 * docs/cp/intro/tutorial04.rst: New file.
|
|
2236 * docs/cp/topics/contexts.rst: New file.
|
|
2237 * docs/cp/topics/expressions.rst: New file.
|
|
2238 * docs/cp/topics/functions.rst: New file.
|
|
2239 * docs/cp/topics/index.rst: New file.
|
|
2240 * docs/cp/topics/locations.rst: New file.
|
|
2241 * docs/cp/topics/objects.rst: New file.
|
|
2242 * docs/cp/topics/results.rst: New file.
|
|
2243 * docs/cp/topics/types.rst: New file.
|
|
2244 * docs/examples/tut01-hello-world.cc: New file.
|
|
2245 * docs/examples/tut02-square.c: Fix missing newline in output.
|
|
2246 * docs/examples/tut02-square.cc: New file.
|
|
2247 * docs/examples/tut03-sum-of-squares.cc: New file.
|
|
2248 * docs/examples/tut04-toyvm/toyvm.cc: New file.
|
|
2249 * docs/index.rst: Move summary to above the table of contents.
|
|
2250 Add text about the C vs C++ APIs.
|
|
2251 * docs/topics/contexts.rst: Fix a typo.
|
|
2252
|
|
2253 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
2254 * docs/_build/texinfo/factorial1.png: New file.
|
|
2255 * docs/_build/texinfo/sum-of-squares1.png: New file.
|
|
2256
|
|
2257 2014-12-09 David Malcolm <dmalcolm@redhat.com>
|
|
2258
|
|
2259 * docs/examples/tut04-toyvm/toyvm.c (toyvm_function_compile): Move
|
|
2260 logic for determine "funcname" to new function...
|
|
2261 (get_function_name): ...here, adding logic to skip any leading
|
|
2262 path from the filename.
|
|
2263 (toyvm_function_parse): Use the filename for fn_filename, rather
|
|
2264 than "name", so that the debugger can locate the source .toy
|
|
2265 file.
|
|
2266 (toyvm_function_parse): Don't fclose a NULL FILE *.
|
|
2267
|
|
2268 2014-12-09 David Malcolm <dmalcolm@redhat.com>
|
|
2269
|
|
2270 PR jit/63854
|
|
2271 * docs/internals/index.rst (Running under valgrind): New
|
|
2272 subsection.
|
|
2273 (docs/_build/texinfo/libgccjit.texi): Regenerate.
|
|
2274
|
|
2275 2014-12-09 David Malcolm <dmalcolm@redhat.com>
|
|
2276
|
131
|
2277 PR jit/64206
|
111
|
2278 * Make-lang.in (jit_OBJS): Add jit/jit-tempdir.o.
|
|
2279 * jit-common.h (gcc::jit::tempdir): New forward decl.
|
|
2280 * jit-playback.c: Include jit-tempdir.h.
|
|
2281 (gcc::jit::playback::context::context): Initialize m_tempdir.
|
|
2282 (gcc::jit::playback::context::~context): Move tempdir
|
|
2283 cleanup to new file jit-tempdir.c
|
|
2284 (make_tempdir_path_template): Move to new file jit-tempdir.c.
|
|
2285 (gcc::jit::playback::context::compile): Move tempdir creation
|
|
2286 to new tempdir object in new file jit-tempdir.c.
|
|
2287 (gcc::jit::playback::context::make_fake_args): Get path from
|
|
2288 tempdir object rather than from member data.
|
|
2289 (gcc::jit::playback::context::convert_to_dso): Likewise.
|
|
2290 (gcc::jit::playback::context::dlopen_built_dso): Likewise.
|
|
2291 (gcc::jit::playback::context::dump_generated_code): Likewise.
|
|
2292 (gcc::jit::playback::context::get_path_c_file): New function.
|
|
2293 (gcc::jit::playback::context::get_path_s_file): New function.
|
|
2294 (gcc::jit::playback::context::get_path_so_file): New function.
|
|
2295 * jit-playback.h (gcc::jit::playback::context::get_path_c_file):
|
|
2296 New function.
|
|
2297 (gcc::jit::playback::context::get_path_s_file): New function.
|
|
2298 (gcc::jit::playback::context::get_path_so_file): New function.
|
|
2299 (gcc::jit::playback::context): Move fields "m_path_template",
|
|
2300 "m_path_tempdir", "m_path_c_file", "m_path_s_file",
|
|
2301 "m_path_so_file" to new jit::tempdir class; add field "m_tempdir".
|
|
2302 * jit-tempdir.c: New file.
|
|
2303 * jit-tempdir.h: New file.
|
|
2304
|
|
2305 2014-12-09 David Malcolm <dmalcolm@redhat.com>
|
|
2306
|
|
2307 * jit-playback.c (gcc::jit::playback::context::compile): Acquire the
|
|
2308 mutex here, immediately before using toplev, and release it here, on
|
|
2309 each exit path after acquisition.
|
|
2310 (jit_mutex): Move this variable here, from jit-recording.c.
|
|
2311 (gcc::jit::playback::context::acquire_mutex): New function, based on
|
|
2312 code in jit-recording.c.
|
|
2313 (gcc::jit::playback::context::release_mutex): Likewise.
|
|
2314 * jit-playback.h (gcc::jit::playback::context::acquire_mutex): New
|
|
2315 function.
|
|
2316 (gcc::jit::playback::context::release_mutex): New function.
|
|
2317 * jit-recording.c (jit_mutex): Move this variable to jit-playback.c.
|
|
2318 (gcc::jit::recording::context::compile): Move mutex-handling from
|
|
2319 here into jit-playback.c's gcc::jit::playback::context::compile.
|
|
2320 * notes.txt: Update to show the new locations of ACQUIRE_MUTEX
|
|
2321 and RELEASE_MUTEX.
|
|
2322
|
|
2323 2014-12-09 David Malcolm <dmalcolm@redhat.com>
|
|
2324
|
|
2325 * jit-playback.c (gcc::jit::playback::context::compile): Move the
|
|
2326 dlopen code into...
|
|
2327 (gcc::jit::playback::context::dlopen_built_dso): ...this new
|
|
2328 function.
|
|
2329 * jit-playback.h (gcc::jit::playback::context::dlopen_built_dso):
|
|
2330 New function.
|
|
2331
|
|
2332 2014-12-09 David Malcolm <dmalcolm@redhat.com>
|
|
2333
|
|
2334 PR jit/64166
|
|
2335 * docs/topics/contexts.rst (Debugging): Add description of
|
|
2336 gcc_jit_context_enable_dump.
|
|
2337 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
2338 * jit-playback.c: Include context.h.
|
|
2339 (class auto_argvec): New class.
|
|
2340 (auto_argvec::~auto_argvec): New function.
|
|
2341 (gcc::jit::playback::context::compile): Convert fake_args to be
|
|
2342 an auto_argvec, so that it can contain dynamically-allocated
|
|
2343 strings. Construct a vec of all requested dumps, and pass it to
|
|
2344 make_fake_args. Extract requested dumps between the calls to
|
|
2345 toplev::main and toplev::finalize.
|
|
2346 (gcc::jit::playback::context::make_fake_args): Convert param
|
|
2347 "argvec" to be a vec <char *>, and gain a "requested_dumps"
|
|
2348 param. Convert to dynamically-allocated arg strings by converting
|
|
2349 ADD_ARG to take a copy of the arg, and add ADD_ARG_TAKE_OWNERSHIP
|
|
2350 for args that are already a copy. Add args for all requested dumps.
|
|
2351 (gcc::jit::playback::context::extract_any_requested_dumps): New
|
|
2352 function.
|
|
2353 (gcc::jit::playback::context::read_dump_file): New function.
|
|
2354 * jit-playback.h (gcc::jit::playback::context::make_fake_args):
|
|
2355 Convert param "argvec" to be a vec <char *>, and gain a
|
|
2356 "requested_dumps" param.
|
|
2357 (gcc::jit::playback::context::extract_any_requested_dumps): New
|
|
2358 function.
|
|
2359 (gcc::jit::playback::context::read_dump_file): New function.
|
|
2360 * jit-recording.c (gcc::jit::recording::context::enable_dump): New
|
|
2361 function.
|
|
2362 (gcc::jit::recording::context::get_all_requested_dumps): New
|
|
2363 function.
|
|
2364 * jit-recording.h (gcc::jit::recording::requested_dump): New
|
|
2365 struct.
|
|
2366 (gcc::jit::recording::context::enable_dump): New function.
|
|
2367 (gcc::jit::recording::context::get_all_requested_dumps): New
|
|
2368 function.
|
|
2369 (gcc::jit::recording::context::m_requested_dumps): New field.
|
|
2370 * libgccjit.c (gcc_jit_context_enable_dump): New API entrypoint.
|
|
2371 * libgccjit.h (gcc_jit_context_enable_dump): New API entrypoint.
|
|
2372 * libgccjit.map (gcc_jit_context_enable_dump): New API entrypoint.
|
|
2373
|
|
2374 2014-12-08 David Malcolm <dmalcolm@redhat.com>
|
|
2375
|
|
2376 * libgccjit++.h: Indent the forward declarations of the classes to
|
|
2377 show the inheritance hierarchy.
|
|
2378
|
|
2379 2014-12-08 David Malcolm <dmalcolm@redhat.com>
|
|
2380
|
|
2381 * notes.txt: Show the beginning and ending of
|
|
2382 recording::context::compile vs playback::context::compile. Show
|
|
2383 the creation and unlinking of the tempdir. Show toplev::finalize.
|
|
2384 Move "RELEASE MUTEX" to the correct location. Show
|
|
2385 gcc_jit_result_release, and indicate where the
|
|
2386 dlopen/dlsym/dlclose occur.
|
|
2387
|
|
2388 2014-12-01 David Malcolm <dmalcolm@redhat.com>
|
|
2389
|
|
2390 * docs/examples/tut02-square.c (main): Release the context
|
|
2391 earlier, to show that this is possible. Update error-handling
|
|
2392 to avoid a double-release of the context, and to avoid
|
|
2393 releasing a NULL result.
|
|
2394 * docs/intro/tutorial02.rst: Discuss gcc_jit_context_release.
|
|
2395 * docs/topics/functions.rst (GCC_JIT_FUNCTION_EXPORTED): Emphasize
|
|
2396 * docs/topics/results.rst (gcc_jit_result): Mention that this
|
|
2397 controls the lifetimes of machine code functions.
|
|
2398 (gcc_jit_result_get_code): Spell out the requirements for this
|
|
2399 to succeed, and the lifetime of the result.
|
|
2400 (gcc_jit_result_release): Mention that this invalidates any code
|
|
2401 that was obtained from the result.
|
|
2402 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
2403
|
|
2404 2014-12-01 David Malcolm <dmalcolm@redhat.com>
|
|
2405
|
|
2406 PR jit/64018
|
|
2407 * docs/intro/tutorial02.rst: Spell out lifetime of generated code.
|
|
2408 Add description of error-handling, taken in part from...
|
|
2409 * docs/topics/contexts.rst (Error-handling): Expand, and move some
|
|
2410 content to tutorial02.rst.
|
|
2411 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
2412
|
|
2413 2014-12-01 David Malcolm <dmalcolm@redhat.com>
|
|
2414
|
|
2415 PR jit/64020
|
|
2416 * docs/topics/types.rst (Standard types) Add new enum values to
|
|
2417 the table of enum gcc_jit_types: GCC_JIT_TYPE_COMPLEX_FLOAT,
|
|
2418 GCC_JIT_TYPE_COMPLEX_DOUBLE, GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE.
|
|
2419 Widen the left-hand column so that
|
|
2420 GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE will fit.
|
|
2421 * docs/_build/texinfo/libgccjit.texi: Regenerate.
|
|
2422
|
|
2423 * jit-builtins.c: Include stringpool.h and jit-playback.h.
|
|
2424 Move everything out of the gcc::jit::recording namespace into
|
|
2425 just gcc::jit.
|
|
2426 (struct builtin_data): Add fields "fnclass", "attr", and
|
|
2427 "implicit_p".
|
|
2428 (DEF_BUILTIN): Update macro so populate the new fields.
|
|
2429 (builtins_manager::builtins_manager): Update for move out of
|
|
2430 recording namespace. Initialize the m_attributes array.
|
|
2431 (builtins_manager::get_builtin_function): Likewise.
|
|
2432 (builtins_manager::get_builtin_function_by_id): New function.
|
|
2433 (builtins_manager::make_builtin_function): Update for move out of
|
|
2434 recording namespace. Add fix for PR jit/64020 by detecting
|
|
2435 specific builtin ids and having them ensure that builtins for
|
|
2436 other ids are created as necessary.
|
|
2437 (builtins_manager::get_type): Update for move out of recording
|
|
2438 namespace.
|
|
2439 (builtins_manager::make_type): Likewise. Add some missing
|
|
2440 #undefs.
|
|
2441 (builtins_manager::make_primitive_type): Update for move out of
|
|
2442 recording namespace. Implement the three BT_COMPLEX_ cases and
|
|
2443 BT_DOUBLE_PTR.
|
|
2444 (builtins_manager::make_fn_type): Update for move out of recording
|
|
2445 namespace.
|
|
2446 (builtins_manager::make_ptr_type): Likewise.
|
|
2447 (builtins_manager::finish_playback): New function.
|
|
2448 (builtins_manager::get_class): New function.
|
|
2449 (builtins_manager::implicit_p): New function.
|
|
2450 (builtins_manager::get_attrs_tree): Two new functions.
|
|
2451 (builtins_manager::make_attrs_tree): New function.
|
|
2452
|
|
2453 * jit-builtins.h: Move everything out of the gcc::jit::recording
|
|
2454 namespace into just gcc::jit.
|
|
2455 (enum built_in_attribute): New.
|
|
2456 (builtins_manager::builtins_manager): Update decl for namespace
|
|
2457 change.
|
|
2458 (builtins_manager::get_builtin_function): Likewise.
|
|
2459 (builtins_manager::get_class): New.
|
|
2460 (builtins_manager::implicit_p): New.
|
|
2461 (builtins_manager::get_attrs_tree): Two new functions.
|
|
2462 (builtins_manager::make_attrs_tree): New function.
|
|
2463 (builtins_manager::finish_playback): New.
|
|
2464 (builtins_manager::get_builtin_function_by_id): New.
|
|
2465 (builtins_manager::make_builtin_function): Update decl for
|
|
2466 namespace change.
|
|
2467 (builtins_manager::get_type): Likewise.
|
|
2468 (builtins_manager::make_type): Likewise.
|
|
2469 (builtins_manager::make_primitive_type): Likewise.
|
|
2470 (builtins_manager::make_fn_type): Likewise.
|
|
2471 (builtins_manager::make_ptr_type): Likewise.
|
|
2472 (builtins_manager): Likewise for fields. Add new field
|
|
2473 "m_attributes".
|
|
2474
|
|
2475 * jit-common.h (NUM_GCC_JIT_TYPES): Update.
|
|
2476 (builtins_manager): Update forward decl to reflect namespace
|
|
2477 change.
|
|
2478
|
|
2479 * jit-playback.c: Include attribs.h and jit-builtins.h.
|
|
2480 (gcc::jit::playback::context::get_tree_node_for_type): Add cases
|
|
2481 for the new COMPLEX_ types.
|
|
2482 (gcc::jit::playback::context::new_function): If creating a
|
|
2483 builtin, set the DECL_BUILT_IN_CLASS and attributes on the fndecl,
|
|
2484 and call set_builtin_decl.
|
|
2485 (gcc::jit::playback::context::replay): If we have a
|
|
2486 builtins_manager, call its finish_playback method when we're done.
|
|
2487
|
|
2488 * jit-playback.h:
|
|
2489 (gcc::jit::playback::context::get_builtins_manager): New function.
|
|
2490
|
|
2491 * jit-recording.c
|
|
2492 (gcc::jit::recording::context::get_builtins_manager): New function.
|
|
2493 (gcc::jit::recording::get_builtin_function): Use
|
|
2494 get_builtins_manager, in case we're a child context.
|
|
2495 (gcc::jit::recording::memento_of_get_type::dereference): Add the
|
|
2496 COMPLEX_ types.
|
|
2497 (gcc::jit::recording::memento_of_get_type::is_int): Likewise.
|
|
2498 (gcc::jit::recording::memento_of_get_type::is_float): Likewise.
|
|
2499 (gcc::jit::recording::memento_of_get_type::is_bool): Likewise.
|
|
2500 (get_type_strings): Likewise.
|
|
2501
|
|
2502 * jit-recording.h
|
|
2503 (gcc::jit::recording::context::get_builtins_manager): New.
|
|
2504
|
|
2505 * libgccjit.h (enum gcc_jit_types): Add
|
|
2506 GCC_JIT_TYPE_COMPLEX_FLOAT, GCC_JIT_TYPE_COMPLEX_DOUBLE,
|
|
2507 GCC_JIT_TYPE_COMPLEX_LONG_DOUBLE.
|
|
2508
|
|
2509 2014-12-01 David Malcolm <dmalcolm@redhat.com>
|
|
2510
|
|
2511 * jit-builtins.c
|
|
2512 (gcc::jit::recording::builtins_manager::get_builtin_function):
|
|
2513 Check for NULL return from make_builtin_function.
|
|
2514 (gcc::jit::recording::builtins_manager::make_builtin_function):
|
|
2515 Check for NULL return from get_type.
|
|
2516
|
|
2517 2014-12-01 David Malcolm <dmalcolm@redhat.com>
|
|
2518
|
|
2519 * jit-playback.c (gcc::jit::playback::context::compile): Move DSO
|
|
2520 creation code into...
|
|
2521 (gcc::jit::playback::context::convert_to_dso): New function.
|
|
2522 * jit-playback.h (gcc::jit::playback::context::convert_to_dso):
|
|
2523 New function.
|
|
2524
|
|
2525 2014-12-01 David Malcolm <dmalcolm@redhat.com>
|
|
2526
|
|
2527 * jit-playback.c (gcc::jit::playback::context::compile): Use an
|
|
2528 auto_vec<const char *> rather than a const char *[20] for the
|
|
2529 top-level argv, and move the logic to build it to...
|
|
2530 (gcc::jit::playback::context::make_fake_args): New function.
|
|
2531 * jit-playback.h (gcc::jit::playback::context::make_fake_args):
|
|
2532 New function.
|
|
2533
|
|
2534 2014-12-01 David Malcolm <dmalcolm@redhat.com>
|
|
2535
|
|
2536 * Make-lang.in (jit_OBJS): Add jit/jit-result.o.
|
|
2537 * jit-playback.c: Include new header jit-result.h.
|
|
2538 (gcc::jit::result::result): Move to new file jit-result.c.
|
|
2539 (gcc::jit::result::~result): Likewise.
|
|
2540 (gcc::jit::playback::result): Likewise.
|
|
2541 * jit-recording.h (class gcc::jit::result): Move to new
|
|
2542 header jit-result.h.
|
|
2543 * jit-result.c: New file, to contain...
|
|
2544 (gcc::jit::result::result): Move here from jit-playback.c,
|
|
2545 removing erroneous "playback" namespace from comment.
|
|
2546 (gcc::jit::result::~result): Likewise.
|
|
2547 (gcc::jit::playback::result): Likewise.
|
|
2548 * jit-result.h: New file, to contain...
|
|
2549 (class gcc::jit::result): Move from jit-recording.h.
|
|
2550 * libgccjit.c: Include jit-result.h.
|
|
2551 (gcc_jit_result_get_code): Update comment to reflect move
|
|
2552 of implementation.
|
|
2553 (gcc_jit_result_release): Likewise.
|
|
2554
|
|
2555 2014-12-01 David Malcolm <dmalcolm@redhat.com>
|
|
2556
|
|
2557 PR jit/63854
|
|
2558 * docs/examples/tut04-toyvm/toyvm.c
|
|
2559 (toyvm_compiled_function): New typedef.
|
|
2560 (toyvm_compiled_func) Rename to...
|
|
2561 (toyvm_compiled_code) ...this.
|
|
2562 (struct toyvm_compiled_function): New struct.
|
|
2563 (toyvm_function_compile): Return a toyvm_compiled_function *
|
|
2564 rather than a toyvm_compiled_func, so that the caller can fully
|
|
2565 clean things up. Free "funcname".
|
|
2566 (test_script): Update for change to toyvm_function_compile.
|
|
2567 Clean up the toyvm_compiled_function.
|
|
2568 (main): Likewise.
|
|
2569 (docs/intro/tutorial04.rst): Update to reflect the above changes,
|
|
2570 and to better spell out the lifetime of the compiled code.
|
|
2571
|
|
2572 2014-12-01 David Malcolm <dmalcolm@redhat.com>
|
|
2573
|
|
2574 PR jit/63854
|
|
2575 * jit-builtins.c
|
|
2576 (gcc::jit::recording::builtins_manager::make_fn_type): Call the
|
|
2577 context's new_function_type method, rather than directly creating
|
|
2578 a function_type instance.
|
|
2579 * jit-recording.c
|
|
2580 (gcc::jit::recording::context::new_function_type): New method,
|
|
2581 adapted from part of...
|
|
2582 (gcc::jit::recording::context::new_function_ptr_type): ...this.
|
|
2583 Update to call new_function_type.
|
|
2584 * jit-recording.h
|
|
2585 (gcc::jit::recording::context::new_function_type): New method.
|
|
2586
|
|
2587 2014-12-01 David Malcolm <dmalcolm@redhat.com>
|
|
2588
|
|
2589 PR jit/63969
|
|
2590 * jit-playback.c: Ensure that ctxt_progname is non-NULL.
|
|
2591
|
|
2592 2014-11-19 David Malcolm <dmalcolm@redhat.com>
|
|
2593
|
|
2594 PR jit/63854
|
|
2595 * jit-playback.c (gcc::jit::playback::compound_type::set_fields):
|
|
2596 Convert param from const vec<playback::field *> & to
|
|
2597 const auto_vec<playback::field *> *.
|
|
2598 (gcc::jit::playback::context::new_function_type): Convert param
|
|
2599 "param_types" from vec<type *> * to const auto_vec<type *> *.
|
|
2600 (gcc::jit::playback::context::new_function): Convert param
|
|
2601 "params" from vec<param *> * to const auto_vec<param *> *.
|
|
2602 (gcc::jit::playback::context::build_call): Convert param "args"
|
|
2603 from vec<rvalue *> to const auto_vec<rvalue *> *.
|
|
2604 (gcc::jit::playback::context::new_call): Likewise.
|
|
2605 (gcc::jit::playback::context::new_call_through_ptr): Likewise.
|
|
2606 (wrapper_finalizer): New function.
|
|
2607 (gcc::jit::playback::wrapper::operator new): Call the finalizer
|
|
2608 variant of ggc_internal_cleared_alloc, supplying
|
|
2609 wrapper_finalizer.
|
|
2610 (gcc::jit::playback::function::finalizer): New.
|
|
2611 (gcc::jit::playback::block::finalizer): New.
|
|
2612 (gcc::jit::playback::source_file::finalizer): New.
|
|
2613 (gcc::jit::playback::source_line::finalizer): New.
|
|
2614
|
|
2615 * jit-playback.h
|
|
2616 (gcc::jit::playback::context::new_function_type): Convert param
|
|
2617 "param_types" from vec<type *> * to const auto_vec<type *> *.
|
|
2618 (gcc::jit::playback::context::new_function): Convert param
|
|
2619 "params" from vec<param *> * to const auto_vec<param *> *.
|
|
2620 (gcc::jit::playback::context::new_call): Convert param
|
|
2621 "args" from vec<rvalue *> to const auto_vec<rvalue *> *.
|
|
2622 (gcc::jit::playback::context::new_call_through_ptr): Likewise.
|
|
2623 (gcc::jit::playback::context::build_call): Likewise.
|
|
2624 (gcc::jit::playback::context): Convert fields "m_functions",
|
|
2625 "m_source_files", "m_cached_locations" from vec to auto_vec.
|
|
2626 (gcc::jit::playback::wrapper::finalizer): New virtual function.
|
|
2627 (gcc::jit::playback::compound_type::set_fields): Convert param fro
|
|
2628 const vec<playback::field *> & to
|
|
2629 const auto_vec<playback::field *> *.
|
|
2630 (gcc::jit::playback::function::finalizer): New.
|
|
2631 (gcc::jit::playback::block::finalizer): New.
|
|
2632 (gcc::jit::playback::source_file::finalizer): New.
|
|
2633 (gcc::jit::playback::source_line::finalizer): New.
|
|
2634
|
|
2635 * jit-recording.c
|
|
2636 (gcc::jit::recording::function_type::replay_into): Convert local
|
|
2637 from a vec into an auto_vec.
|
|
2638 (gcc::jit::recording::fields::replay_into): Likewise.
|
|
2639 (gcc::jit::recording::function::replay_into): Likewise.
|
|
2640 (gcc::jit::recording::call::replay_into): Likewise.
|
|
2641 (gcc::jit::recording::call_through_ptr::replay_into): Likewise.
|
|
2642
|
|
2643 * jit-recording.h (gcc::jit::recording::context): Convert fields
|
|
2644 "m_mementos", "m_compound_types", "m_functions" from vec<> to
|
|
2645 auto_vec <>.
|
|
2646 (gcc::jit::recording::function_type::get_param_types): Convert
|
|
2647 return type from vec<type *> to const vec<type *> &.
|
|
2648 (gcc::jit::recording::function_type): Convert field
|
|
2649 "m_param_types" from a vec<> to an auto_vec<>.
|
|
2650 (gcc::jit::recording::fields): Likewise for field "m_fields".
|
|
2651 (gcc::jit::recording::function::get_params): Convert return type
|
|
2652 from vec <param *> to const vec<param *> &.
|
|
2653 (gcc::jit::recording::function): Convert fields "m_params",
|
|
2654 "m_locals", "m_blocks" from vec<> to auto_vec<>.
|
|
2655 (gcc::jit::recording::block): Likewise for field "m_statements".
|
|
2656 vec<> to auto_vec<>.
|
|
2657 (gcc::jit::recording::call): Likewise for field "m_args".
|
|
2658 (gcc::jit::recording::call_through_ptr): Likewise.
|
|
2659
|
|
2660 2014-11-19 David Malcolm <dmalcolm@redhat.com>
|
|
2661
|
|
2662 PR jit/63854
|
|
2663 * jit-recording.c (recording::function::validate): Convert
|
|
2664 "worklist" from vec<> to autovec<> to fix a leak.
|
|
2665
|
|
2666 2014-11-11 David Malcolm <dmalcolm@redhat.com>
|
|
2667
|
|
2668 * ChangeLog.jit: New.
|
|
2669 * ChangeLog: New.
|
|
2670 * Make-lang.in: New.
|
|
2671 * TODO.rst: New.
|
|
2672 * config-lang.in: New.
|
|
2673 * docs/Makefile: New.
|
|
2674 * docs/_build/texinfo/Makefile: New.
|
|
2675 * docs/_build/texinfo/factorial.png: New.
|
|
2676 * docs/_build/texinfo/libgccjit.texi: New.
|
|
2677 * docs/_build/texinfo/sum-of-squares.png: New.
|
|
2678 * docs/conf.py: New.
|
|
2679 * docs/examples/tut01-hello-world.c: New.
|
|
2680 * docs/examples/tut02-square.c: New.
|
|
2681 * docs/examples/tut03-sum-of-squares.c: New.
|
|
2682 * docs/examples/tut04-toyvm/Makefile: New.
|
|
2683 * docs/examples/tut04-toyvm/factorial.toy: New.
|
|
2684 * docs/examples/tut04-toyvm/fibonacci.toy: New.
|
|
2685 * docs/examples/tut04-toyvm/toyvm.c: New.
|
|
2686 * docs/index.rst: New.
|
|
2687 * docs/internals/index.rst: New.
|
|
2688 * docs/intro/factorial.png: New.
|
|
2689 * docs/intro/index.rst: New.
|
|
2690 * docs/intro/sum-of-squares.png: New.
|
|
2691 * docs/intro/tutorial01.rst: New.
|
|
2692 * docs/intro/tutorial02.rst: New.
|
|
2693 * docs/intro/tutorial03.rst: New.
|
|
2694 * docs/intro/tutorial04.rst: New.
|
|
2695 * docs/topics/contexts.rst: New.
|
|
2696 * docs/topics/expressions.rst: New.
|
|
2697 * docs/topics/functions.rst: New.
|
|
2698 * docs/topics/index.rst: New.
|
|
2699 * docs/topics/locations.rst: New.
|
|
2700 * docs/topics/objects.rst: New.
|
|
2701 * docs/topics/results.rst: New.
|
|
2702 * docs/topics/types.rst: New.
|
|
2703 * dummy-frontend.c: New.
|
|
2704 * jit-builtins.c: New.
|
|
2705 * jit-builtins.h: New.
|
|
2706 * jit-common.h: New.
|
|
2707 * jit-playback.c: New.
|
|
2708 * jit-playback.h: New.
|
|
2709 * jit-recording.c: New.
|
|
2710 * jit-recording.h: New.
|
|
2711 * libgccjit++.h: New.
|
|
2712 * libgccjit.c: New.
|
|
2713 * libgccjit.h: New.
|
|
2714 * libgccjit.map: New.
|
|
2715 * notes.txt: New.
|
|
2716
|
|
2717 2013-07-26 David Malcolm <dmalcolm@redhat.com>
|
|
2718
|
|
2719 * Initial creation
|
|
2720
|
145
|
2721 Copyright (C) 2013-2020 Free Software Foundation, Inc.
|
111
|
2722
|
|
2723 Copying and distribution of this file, with or without modification,
|
|
2724 are permitted in any medium without royalty provided the copyright
|
|
2725 notice and this notice are preserved.
|