1 /* Internals of libgccjit: classes for recording calls made to the JIT API.
2 Copyright (C) 2013-2015 Free Software Foundation, Inc.
3 Contributed by David Malcolm <dmalcolm@redhat.com>.
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
12 GCC is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>. */
21 #ifndef JIT_RECORDING_H
22 #define JIT_RECORDING_H
24 #include "jit-common.h"
25 #include "jit-logging.h"
34 /**********************************************************************
36 **********************************************************************/
41 playback_location (replayer
*r
, location
*loc
);
44 playback_string (string
*str
);
47 playback_block (block
*b
);
49 /* A recording of a call to gcc_jit_context_enable_dump. */
52 const char *m_dumpname
;
56 /* A JIT-compilation context. */
57 class context
: public log_user
60 context (context
*parent_ctxt
);
64 get_builtins_manager ();
66 void record (memento
*m
);
67 void replay_into (replayer
*r
);
68 void disassociate_from_playback ();
71 new_string (const char *text
);
74 new_location (const char *filename
,
79 get_type (enum gcc_jit_types type
);
82 get_int_type (int num_bytes
, int is_signed
);
85 new_array_type (location
*loc
,
90 new_field (location
*loc
,
95 new_struct_type (location
*loc
,
99 new_union_type (location
*loc
,
103 new_function_type (type
*return_type
,
109 new_function_ptr_type (location
*loc
,
116 new_param (location
*loc
,
121 new_function (location
*loc
,
122 enum gcc_jit_function_kind kind
,
128 enum built_in_function builtin_id
);
131 get_builtin_function (const char *name
);
134 new_global (location
*loc
,
139 new_rvalue_from_int (type
*numeric_type
,
143 new_rvalue_from_double (type
*numeric_type
,
147 new_rvalue_from_ptr (type
*pointer_type
,
151 new_string_literal (const char *value
);
154 new_unary_op (location
*loc
,
155 enum gcc_jit_unary_op op
,
160 new_binary_op (location
*loc
,
161 enum gcc_jit_binary_op op
,
163 rvalue
*a
, rvalue
*b
);
166 new_comparison (location
*loc
,
167 enum gcc_jit_comparison op
,
168 rvalue
*a
, rvalue
*b
);
171 new_call (location
*loc
,
173 int numargs
, rvalue
**args
);
176 new_call_through_ptr (location
*loc
,
178 int numargs
, rvalue
**args
);
181 new_cast (location
*loc
,
186 new_array_access (location
*loc
,
191 set_str_option (enum gcc_jit_str_option opt
,
195 set_int_option (enum gcc_jit_int_option opt
,
199 set_bool_option (enum gcc_jit_bool_option opt
,
203 enable_dump (const char *dumpname
,
207 get_str_option (enum gcc_jit_str_option opt
) const
209 return m_str_options
[opt
];
213 get_int_option (enum gcc_jit_int_option opt
) const
215 return m_int_options
[opt
];
219 get_bool_option (enum gcc_jit_bool_option opt
) const
221 return m_bool_options
[opt
];
228 add_error (location
*loc
, const char *fmt
, ...)
232 add_error_va (location
*loc
, const char *fmt
, va_list ap
)
236 get_first_error () const;
239 get_last_error () const;
241 bool errors_occurred () const
244 if (m_parent_ctxt
->errors_occurred ())
246 return m_error_count
;
249 type
*get_opaque_FILE_type ();
251 void dump_to_file (const char *path
, bool update_locations
);
254 get_all_requested_dumps (vec
<recording::requested_dump
> *out
);
260 context
*m_parent_ctxt
;
264 char *m_first_error_str
;
265 bool m_owns_first_error_str
;
267 char *m_last_error_str
;
268 bool m_owns_last_error_str
;
270 char *m_str_options
[GCC_JIT_NUM_STR_OPTIONS
];
271 int m_int_options
[GCC_JIT_NUM_INT_OPTIONS
];
272 bool m_bool_options
[GCC_JIT_NUM_BOOL_OPTIONS
];
274 /* Dumpfiles that were requested via gcc_jit_context_enable_dump. */
275 auto_vec
<requested_dump
> m_requested_dumps
;
277 /* Recorded API usage. */
278 auto_vec
<memento
*> m_mementos
;
280 /* Specific recordings, for use by dump_to_file. */
281 auto_vec
<compound_type
*> m_compound_types
;
282 auto_vec
<function
*> m_functions
;
284 type
*m_basic_types
[NUM_GCC_JIT_TYPES
];
287 builtins_manager
*m_builtins_manager
; // lazily created
291 /* An object with lifetime managed by the context i.e.
292 it lives until the context is released, at which
293 point it itself is cleaned up. */
298 virtual ~memento () {}
300 /* Hook for replaying this. */
301 virtual void replay_into (replayer
*r
) = 0;
303 void set_playback_obj (void *obj
) { m_playback_obj
= obj
; }
306 /* Get the context that owns this object.
308 Implements the post-error-checking part of
309 gcc_jit_object_get_context. */
310 context
*get_context () { return m_ctxt
; }
313 as_object () { return this; }
315 /* Debugging hook, for use in generating error messages etc.
316 Implements the post-error-checking part of
317 gcc_jit_object_get_debug_string. */
321 virtual void write_to_dump (dump
&d
);
324 memento (context
*ctxt
)
326 m_playback_obj (NULL
),
327 m_debug_string (NULL
)
332 string
*new_string (const char *text
) { return m_ctxt
->new_string (text
); }
335 virtual string
* make_debug_string () = 0;
341 void *m_playback_obj
;
344 string
*m_debug_string
;
347 /* or just use std::string? */
348 class string
: public memento
351 string (context
*ctxt
, const char *text
);
354 const char *c_str () { return m_buffer
; }
356 static string
* from_printf (context
*ctxt
, const char *fmt
, ...)
359 void replay_into (replayer
*) {}
362 string
* make_debug_string ();
369 class location
: public memento
372 location (context
*ctxt
, string
*filename
, int line
, int column
)
374 m_filename (filename
),
379 void replay_into (replayer
*r
);
382 playback_location (replayer
*r
)
384 /* Normally during playback, we can walk forwards through the list of
385 recording objects, playing them back. The ordering of recording
386 ensures that everything that a recording object refers to has
387 already been played back, so we can simply look up the relevant
390 Locations are an exception, due to the "write_to_dump" method of
391 recording::statement. This method can set a new location on a
392 statement after the statement is created, and thus the location
393 appears in the context's memento list *after* the statement that
396 In such circumstances, the statement is replayed *before* the location,
397 when the latter doesn't yet have a playback object.
399 Hence we need to ensure that locations have playback objects. */
404 gcc_assert (m_playback_obj
);
405 return static_cast <playback::location
*> (m_playback_obj
);
409 string
* make_debug_string ();
417 class type
: public memento
420 type
*get_pointer ();
422 type
*get_volatile ();
424 /* Get the type obtained when dereferencing this type.
426 This will return NULL if it's not valid to dereference this type.
427 The caller is responsible for setting an error. */
428 virtual type
*dereference () = 0;
431 virtual function_type
*dyn_cast_function_type () { return NULL
; }
432 virtual function_type
*as_a_function_type() { gcc_unreachable (); return NULL
; }
433 virtual struct_
*dyn_cast_struct () { return NULL
; }
435 /* Is it typesafe to copy to this type from rtype? */
436 virtual bool accepts_writes_from (type
*rtype
)
439 return this == rtype
->unqualified ();
442 /* Strip off "const" etc */
443 virtual type
*unqualified ()
448 virtual bool is_int () const = 0;
449 virtual bool is_float () const = 0;
450 virtual bool is_bool () const = 0;
451 virtual type
*is_pointer () = 0;
452 virtual type
*is_array () = 0;
453 virtual bool is_void () const { return false; }
455 bool is_numeric () const
457 return is_int () || is_float () || is_bool ();
463 return static_cast <playback::type
*> (m_playback_obj
);
469 m_pointer_to_this_type (NULL
)
473 type
*m_pointer_to_this_type
;
476 /* Result of "gcc_jit_context_get_type". */
477 class memento_of_get_type
: public type
480 memento_of_get_type (context
*ctxt
,
481 enum gcc_jit_types kind
)
485 type
*dereference ();
487 bool accepts_writes_from (type
*rtype
)
489 if (m_kind
== GCC_JIT_TYPE_VOID_PTR
)
490 if (rtype
->is_pointer ())
492 /* LHS (this) is type (void *), and the RHS is a pointer:
497 return type::accepts_writes_from (rtype
);
500 bool is_int () const;
501 bool is_float () const;
502 bool is_bool () const;
503 type
*is_pointer () { return dereference (); }
504 type
*is_array () { return NULL
; }
505 bool is_void () const { return m_kind
== GCC_JIT_TYPE_VOID
; }
508 void replay_into (replayer
*r
);
511 string
* make_debug_string ();
514 enum gcc_jit_types m_kind
;
517 /* Result of "gcc_jit_type_get_pointer". */
518 class memento_of_get_pointer
: public type
521 memento_of_get_pointer (type
*other_type
)
522 : type (other_type
->m_ctxt
),
523 m_other_type (other_type
) {}
525 type
*dereference () { return m_other_type
; }
527 bool accepts_writes_from (type
*rtype
);
529 void replay_into (replayer
*r
);
531 bool is_int () const { return false; }
532 bool is_float () const { return false; }
533 bool is_bool () const { return false; }
534 type
*is_pointer () { return m_other_type
; }
535 type
*is_array () { return NULL
; }
538 string
* make_debug_string ();
544 /* Result of "gcc_jit_type_get_const". */
545 class memento_of_get_const
: public type
548 memento_of_get_const (type
*other_type
)
549 : type (other_type
->m_ctxt
),
550 m_other_type (other_type
) {}
552 type
*dereference () { return m_other_type
->dereference (); }
554 bool accepts_writes_from (type */
*rtype*/
)
556 /* Can't write to a "const". */
560 /* Strip off the "const", giving the underlying type. */
561 type
*unqualified () { return m_other_type
; }
563 bool is_int () const { return m_other_type
->is_int (); }
564 bool is_float () const { return m_other_type
->is_float (); }
565 bool is_bool () const { return m_other_type
->is_bool (); }
566 type
*is_pointer () { return m_other_type
->is_pointer (); }
567 type
*is_array () { return m_other_type
->is_array (); }
569 void replay_into (replayer
*);
572 string
* make_debug_string ();
578 /* Result of "gcc_jit_type_get_volatile". */
579 class memento_of_get_volatile
: public type
582 memento_of_get_volatile (type
*other_type
)
583 : type (other_type
->m_ctxt
),
584 m_other_type (other_type
) {}
586 type
*dereference () { return m_other_type
->dereference (); }
588 /* Strip off the "volatile", giving the underlying type. */
589 type
*unqualified () { return m_other_type
; }
591 bool is_int () const { return m_other_type
->is_int (); }
592 bool is_float () const { return m_other_type
->is_float (); }
593 bool is_bool () const { return m_other_type
->is_bool (); }
594 type
*is_pointer () { return m_other_type
->is_pointer (); }
595 type
*is_array () { return m_other_type
->is_array (); }
597 void replay_into (replayer
*);
600 string
* make_debug_string ();
606 class array_type
: public type
609 array_type (context
*ctxt
,
615 m_element_type (element_type
),
616 m_num_elements (num_elements
)
619 type
*dereference ();
621 bool is_int () const { return false; }
622 bool is_float () const { return false; }
623 bool is_bool () const { return false; }
624 type
*is_pointer () { return NULL
; }
625 type
*is_array () { return m_element_type
; }
627 void replay_into (replayer
*);
630 string
* make_debug_string ();
634 type
*m_element_type
;
638 class function_type
: public type
641 function_type (context
*ctxt
,
647 type
*dereference ();
648 function_type
*dyn_cast_function_type () { return this; }
649 function_type
*as_a_function_type () { return this; }
651 bool is_int () const { return false; }
652 bool is_float () const { return false; }
653 bool is_bool () const { return false; }
654 type
*is_pointer () { return NULL
; }
655 type
*is_array () { return NULL
; }
657 void replay_into (replayer
*);
659 type
* get_return_type () const { return m_return_type
; }
660 const vec
<type
*> &get_param_types () const { return m_param_types
; }
661 int is_variadic () const { return m_is_variadic
; }
663 string
* make_debug_string_with_ptr ();
666 string
* make_debug_string ();
667 string
* make_debug_string_with (const char *);
671 auto_vec
<type
*> m_param_types
;
675 class field
: public memento
678 field (context
*ctxt
,
689 type
* get_type () const { return m_type
; }
691 compound_type
* get_container () const { return m_container
; }
692 void set_container (compound_type
*c
) { m_container
= c
; }
694 void replay_into (replayer
*);
696 void write_to_dump (dump
&d
);
699 playback_field () const
701 return static_cast <playback::field
*> (m_playback_obj
);
705 string
* make_debug_string ();
711 compound_type
*m_container
;
714 /* Base class for struct_ and union_ */
715 class compound_type
: public type
718 compound_type (context
*ctxt
,
722 string
*get_name () const { return m_name
; }
723 location
*get_loc () const { return m_loc
; }
724 fields
* get_fields () { return m_fields
; }
727 set_fields (location
*loc
,
731 type
*dereference ();
733 bool is_int () const { return false; }
734 bool is_float () const { return false; }
735 bool is_bool () const { return false; }
736 type
*is_pointer () { return NULL
; }
737 type
*is_array () { return NULL
; }
739 playback::compound_type
*
740 playback_compound_type ()
742 return static_cast <playback::compound_type
*> (m_playback_obj
);
751 class struct_
: public compound_type
754 struct_ (context
*ctxt
,
758 struct_
*dyn_cast_struct () { return this; }
761 as_type () { return this; }
763 void replay_into (replayer
*r
);
766 string
* make_debug_string ();
770 // memento of struct_::set_fields
771 class fields
: public memento
774 fields (compound_type
*struct_or_union
,
778 void replay_into (replayer
*r
);
780 void write_to_dump (dump
&d
);
783 string
* make_debug_string ();
786 compound_type
*m_struct_or_union
;
787 auto_vec
<field
*> m_fields
;
790 class union_
: public compound_type
793 union_ (context
*ctxt
,
797 void replay_into (replayer
*r
);
800 string
* make_debug_string ();
808 class rvalue
: public memento
811 rvalue (context
*ctxt
,
821 /* Get the recording::type of this rvalue.
823 Implements the post-error-checking part of
824 gcc_jit_rvalue_get_type. */
825 type
* get_type () const { return m_type
; }
828 playback_rvalue () const
830 return static_cast <playback::rvalue
*> (m_playback_obj
);
833 access_field (location
*loc
,
837 dereference_field (location
*loc
,
841 dereference (location
*loc
);
848 class lvalue
: public rvalue
851 lvalue (context
*ctxt
,
854 : rvalue (ctxt
, loc
, type_
)
858 playback_lvalue () const
860 return static_cast <playback::lvalue
*> (m_playback_obj
);
864 access_field (location
*loc
,
868 get_address (location
*loc
);
871 as_rvalue () { return this; }
874 class param
: public lvalue
877 param (context
*ctxt
,
881 : lvalue (ctxt
, loc
, type
),
885 as_lvalue () { return this; }
887 void replay_into (replayer
*r
);
890 playback_param () const
892 return static_cast <playback::param
*> (m_playback_obj
);
896 string
* make_debug_string () { return m_name
; }
902 class function
: public memento
905 function (context
*ctxt
,
907 enum gcc_jit_function_kind kind
,
913 enum built_in_function builtin_id
);
915 void replay_into (replayer
*r
);
918 playback_function () const
920 return static_cast <playback::function
*> (m_playback_obj
);
923 enum gcc_jit_function_kind
get_kind () const { return m_kind
; }
926 new_local (location
*loc
,
931 new_block (const char *name
);
933 type
*get_return_type () const { return m_return_type
; }
934 string
* get_name () const { return m_name
; }
935 const vec
<param
*> &get_params () const { return m_params
; }
937 /* Get the given param by index.
938 Implements the post-error-checking part of
939 gcc_jit_function_get_param. */
940 param
*get_param (int i
) const { return m_params
[i
]; }
942 bool is_variadic () const { return m_is_variadic
; }
944 void write_to_dump (dump
&d
);
948 void dump_to_dot (const char *path
);
951 string
* make_debug_string ();
955 enum gcc_jit_function_kind m_kind
;
958 auto_vec
<param
*> m_params
;
960 enum built_in_function m_builtin_id
;
961 auto_vec
<local
*> m_locals
;
962 auto_vec
<block
*> m_blocks
;
965 class block
: public memento
968 block (function
*func
, int index
, string
*name
)
969 : memento (func
->m_ctxt
),
974 m_has_been_terminated (false),
975 m_is_reachable (false)
979 /* Get the recording::function containing this block.
980 Implements the post-error-checking part of
981 gcc_jit_block_get_function. */
982 function
*get_function () { return m_func
; }
984 bool has_been_terminated () { return m_has_been_terminated
; }
985 bool is_reachable () { return m_is_reachable
; }
988 add_eval (location
*loc
,
992 add_assignment (location
*loc
,
997 add_assignment_op (location
*loc
,
999 enum gcc_jit_binary_op op
,
1003 add_comment (location
*loc
,
1007 end_with_conditional (location
*loc
,
1013 end_with_jump (location
*loc
,
1017 end_with_return (location
*loc
,
1021 playback_block () const
1023 return static_cast <playback::block
*> (m_playback_obj
);
1026 void write_to_dump (dump
&d
);
1030 location
*get_loc () const;
1032 statement
*get_first_statement () const;
1033 statement
*get_last_statement () const;
1035 int get_successor_blocks (block
**next1
, block
**next2
) const;
1038 string
* make_debug_string ();
1040 void replay_into (replayer
*r
);
1042 void dump_to_dot (pretty_printer
*pp
);
1043 void dump_edges_to_dot (pretty_printer
*pp
);
1049 auto_vec
<statement
*> m_statements
;
1050 bool m_has_been_terminated
;
1051 bool m_is_reachable
;
1053 friend class function
;
1056 class global
: public lvalue
1059 global (context
*ctxt
,
1063 : lvalue (ctxt
, loc
, type
),
1067 void replay_into (replayer
*);
1070 string
* make_debug_string () { return m_name
; }
1076 class memento_of_new_rvalue_from_int
: public rvalue
1079 memento_of_new_rvalue_from_int (context
*ctxt
,
1083 : rvalue (ctxt
, loc
, numeric_type
),
1086 void replay_into (replayer
*r
);
1089 string
* make_debug_string ();
1095 class memento_of_new_rvalue_from_double
: public rvalue
1098 memento_of_new_rvalue_from_double (context
*ctxt
,
1102 : rvalue (ctxt
, loc
, numeric_type
),
1106 void replay_into (replayer
*);
1109 string
* make_debug_string ();
1115 class memento_of_new_rvalue_from_ptr
: public rvalue
1118 memento_of_new_rvalue_from_ptr (context
*ctxt
,
1122 : rvalue (ctxt
, loc
, pointer_type
),
1126 void replay_into (replayer
*);
1129 string
* make_debug_string ();
1135 class memento_of_new_string_literal
: public rvalue
1138 memento_of_new_string_literal (context
*ctxt
,
1141 : rvalue (ctxt
, loc
, ctxt
->get_type (GCC_JIT_TYPE_CONST_CHAR_PTR
)),
1144 void replay_into (replayer
*r
);
1147 string
* make_debug_string ();
1153 class unary_op
: public rvalue
1156 unary_op (context
*ctxt
,
1158 enum gcc_jit_unary_op op
,
1161 : rvalue (ctxt
, loc
, result_type
),
1166 void replay_into (replayer
*r
);
1169 string
* make_debug_string ();
1172 enum gcc_jit_unary_op m_op
;
1176 class binary_op
: public rvalue
1179 binary_op (context
*ctxt
,
1181 enum gcc_jit_binary_op op
,
1183 rvalue
*a
, rvalue
*b
)
1184 : rvalue (ctxt
, loc
, result_type
),
1189 void replay_into (replayer
*r
);
1192 string
* make_debug_string ();
1195 enum gcc_jit_binary_op m_op
;
1200 class comparison
: public rvalue
1203 comparison (context
*ctxt
,
1205 enum gcc_jit_comparison op
,
1206 rvalue
*a
, rvalue
*b
)
1207 : rvalue (ctxt
, loc
, ctxt
->get_type (GCC_JIT_TYPE_BOOL
)),
1213 void replay_into (replayer
*r
);
1216 string
* make_debug_string ();
1219 enum gcc_jit_comparison m_op
;
1224 class cast
: public rvalue
1227 cast (context
*ctxt
,
1231 : rvalue (ctxt
, loc
, type_
),
1235 void replay_into (replayer
*r
);
1238 string
* make_debug_string ();
1244 class call
: public rvalue
1247 call (context
*ctxt
,
1253 void replay_into (replayer
*r
);
1256 string
* make_debug_string ();
1260 auto_vec
<rvalue
*> m_args
;
1263 class call_through_ptr
: public rvalue
1266 call_through_ptr (context
*ctxt
,
1272 void replay_into (replayer
*r
);
1275 string
* make_debug_string ();
1279 auto_vec
<rvalue
*> m_args
;
1282 class array_access
: public lvalue
1285 array_access (context
*ctxt
,
1289 : lvalue (ctxt
, loc
, ptr
->get_type ()->dereference ()),
1294 void replay_into (replayer
*r
);
1297 string
* make_debug_string ();
1304 class access_field_of_lvalue
: public lvalue
1307 access_field_of_lvalue (context
*ctxt
,
1311 : lvalue (ctxt
, loc
, field
->get_type ()),
1316 void replay_into (replayer
*r
);
1319 string
* make_debug_string ();
1326 class access_field_rvalue
: public rvalue
1329 access_field_rvalue (context
*ctxt
,
1333 : rvalue (ctxt
, loc
, field
->get_type ()),
1338 void replay_into (replayer
*r
);
1341 string
* make_debug_string ();
1348 class dereference_field_rvalue
: public lvalue
1351 dereference_field_rvalue (context
*ctxt
,
1355 : lvalue (ctxt
, loc
, field
->get_type ()),
1360 void replay_into (replayer
*r
);
1363 string
* make_debug_string ();
1370 class dereference_rvalue
: public lvalue
1373 dereference_rvalue (context
*ctxt
,
1376 : lvalue (ctxt
, loc
, val
->get_type ()->dereference ()),
1379 void replay_into (replayer
*r
);
1382 string
* make_debug_string ();
1388 class get_address_of_lvalue
: public rvalue
1391 get_address_of_lvalue (context
*ctxt
,
1394 : rvalue (ctxt
, loc
, val
->get_type ()->get_pointer ()),
1398 void replay_into (replayer
*r
);
1401 string
* make_debug_string ();
1407 class local
: public lvalue
1410 local (function
*func
, location
*loc
, type
*type_
, string
*name
)
1411 : lvalue (func
->m_ctxt
, loc
, type_
),
1415 void replay_into (replayer
*r
);
1417 void write_to_dump (dump
&d
);
1420 string
* make_debug_string () { return m_name
; }
1427 class statement
: public memento
1430 virtual int get_successor_blocks (block
**out_next1
,
1431 block
**out_next2
) const;
1433 void write_to_dump (dump
&d
);
1435 location
*get_loc () const { return m_loc
; }
1438 statement (block
*b
, location
*loc
)
1439 : memento (b
->m_ctxt
),
1443 block
*get_block () const { return m_block
; }
1445 playback::location
*
1446 playback_location (replayer
*r
) const
1448 return ::gcc::jit::recording::playback_location (r
, m_loc
);
1456 class eval
: public statement
1462 : statement (b
, loc
),
1463 m_rvalue (rvalue
) {}
1465 void replay_into (replayer
*r
);
1468 string
* make_debug_string ();
1474 class assignment
: public statement
1477 assignment (block
*b
,
1481 : statement (b
, loc
),
1483 m_rvalue (rvalue
) {}
1485 void replay_into (replayer
*r
);
1488 string
* make_debug_string ();
1495 class assignment_op
: public statement
1498 assignment_op (block
*b
,
1501 enum gcc_jit_binary_op op
,
1503 : statement (b
, loc
),
1506 m_rvalue (rvalue
) {}
1508 void replay_into (replayer
*r
);
1511 string
* make_debug_string ();
1515 enum gcc_jit_binary_op m_op
;
1519 class comment
: public statement
1525 : statement (b
, loc
),
1528 void replay_into (replayer
*r
);
1531 string
* make_debug_string ();
1537 class conditional
: public statement
1540 conditional (block
*b
,
1545 : statement (b
, loc
),
1546 m_boolval (boolval
),
1547 m_on_true (on_true
),
1548 m_on_false (on_false
) {}
1550 void replay_into (replayer
*r
);
1552 int get_successor_blocks (block
**out_next1
,
1553 block
**out_next2
) const;
1556 string
* make_debug_string ();
1564 class jump
: public statement
1570 : statement (b
, loc
),
1571 m_target (target
) {}
1573 void replay_into (replayer
*r
);
1575 int get_successor_blocks (block
**out_next1
,
1576 block
**out_next2
) const;
1579 string
* make_debug_string ();
1585 class return_
: public statement
1591 : statement (b
, loc
),
1592 m_rvalue (rvalue
) {}
1594 void replay_into (replayer
*r
);
1596 int get_successor_blocks (block
**out_next1
,
1597 block
**out_next2
) const;
1600 string
* make_debug_string ();
1606 } // namespace gcc::jit::recording
1608 } // namespace gcc::jit
1612 #endif /* JIT_RECORDING_H */