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