1 /* Internals of libgccjit: classes for recording calls made to the JIT API.
2 Copyright (C) 2013-2014 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"
33 /**********************************************************************
35 **********************************************************************/
40 playback_location (replayer
*r
, location
*loc
);
43 playback_string (string
*str
);
46 playback_block (block
*b
);
48 /* A recording of a call to gcc_jit_context_enable_dump. */
51 const char *m_dumpname
;
55 /* A JIT-compilation context. */
59 context (context
*parent_ctxt
);
63 get_builtins_manager ();
65 void record (memento
*m
);
66 void replay_into (replayer
*r
);
67 void disassociate_from_playback ();
70 new_string (const char *text
);
73 new_location (const char *filename
,
78 get_type (enum gcc_jit_types type
);
81 get_int_type (int num_bytes
, int is_signed
);
84 new_array_type (location
*loc
,
89 new_field (location
*loc
,
94 new_struct_type (location
*loc
,
98 new_union_type (location
*loc
,
102 new_function_type (type
*return_type
,
108 new_function_ptr_type (location
*loc
,
115 new_param (location
*loc
,
120 new_function (location
*loc
,
121 enum gcc_jit_function_kind kind
,
127 enum built_in_function builtin_id
);
130 get_builtin_function (const char *name
);
133 new_global (location
*loc
,
138 new_rvalue_from_int (type
*numeric_type
,
142 new_rvalue_from_double (type
*numeric_type
,
146 new_rvalue_from_ptr (type
*pointer_type
,
150 new_string_literal (const char *value
);
153 new_unary_op (location
*loc
,
154 enum gcc_jit_unary_op op
,
159 new_binary_op (location
*loc
,
160 enum gcc_jit_binary_op op
,
162 rvalue
*a
, rvalue
*b
);
165 new_comparison (location
*loc
,
166 enum gcc_jit_comparison op
,
167 rvalue
*a
, rvalue
*b
);
170 new_call (location
*loc
,
172 int numargs
, rvalue
**args
);
175 new_call_through_ptr (location
*loc
,
177 int numargs
, rvalue
**args
);
180 new_cast (location
*loc
,
185 new_array_access (location
*loc
,
190 set_str_option (enum gcc_jit_str_option opt
,
194 set_int_option (enum gcc_jit_int_option opt
,
198 set_bool_option (enum gcc_jit_bool_option opt
,
202 enable_dump (const char *dumpname
,
206 get_str_option (enum gcc_jit_str_option opt
) const
208 return m_str_options
[opt
];
212 get_int_option (enum gcc_jit_int_option opt
) const
214 return m_int_options
[opt
];
218 get_bool_option (enum gcc_jit_bool_option opt
) const
220 return m_bool_options
[opt
];
227 add_error (location
*loc
, const char *fmt
, ...)
231 add_error_va (location
*loc
, const char *fmt
, va_list ap
)
235 get_first_error () const;
237 bool errors_occurred () const
240 if (m_parent_ctxt
->errors_occurred ())
242 return m_error_count
;
245 type
*get_opaque_FILE_type ();
247 void dump_to_file (const char *path
, bool update_locations
);
250 get_all_requested_dumps (vec
<recording::requested_dump
> *out
);
256 context
*m_parent_ctxt
;
260 char *m_first_error_str
;
261 bool m_owns_first_error_str
;
263 char *m_str_options
[GCC_JIT_NUM_STR_OPTIONS
];
264 int m_int_options
[GCC_JIT_NUM_INT_OPTIONS
];
265 bool m_bool_options
[GCC_JIT_NUM_BOOL_OPTIONS
];
267 /* Dumpfiles that were requested via gcc_jit_context_enable_dump. */
268 auto_vec
<requested_dump
> m_requested_dumps
;
270 /* Recorded API usage. */
271 auto_vec
<memento
*> m_mementos
;
273 /* Specific recordings, for use by dump_to_file. */
274 auto_vec
<compound_type
*> m_compound_types
;
275 auto_vec
<function
*> m_functions
;
277 type
*m_basic_types
[NUM_GCC_JIT_TYPES
];
280 builtins_manager
*m_builtins_manager
; // lazily created
284 /* An object with lifetime managed by the context i.e.
285 it lives until the context is released, at which
286 point it itself is cleaned up. */
291 virtual ~memento () {}
293 /* Hook for replaying this. */
294 virtual void replay_into (replayer
*r
) = 0;
296 void set_playback_obj (void *obj
) { m_playback_obj
= obj
; }
299 /* Get the context that owns this object.
301 Implements the post-error-checking part of
302 gcc_jit_object_get_context. */
303 context
*get_context () { return m_ctxt
; }
306 as_object () { return this; }
308 /* Debugging hook, for use in generating error messages etc.
309 Implements the post-error-checking part of
310 gcc_jit_object_get_debug_string. */
314 virtual void write_to_dump (dump
&d
);
317 memento (context
*ctxt
)
319 m_playback_obj (NULL
),
320 m_debug_string (NULL
)
325 string
*new_string (const char *text
) { return m_ctxt
->new_string (text
); }
328 virtual string
* make_debug_string () = 0;
334 void *m_playback_obj
;
337 string
*m_debug_string
;
340 /* or just use std::string? */
341 class string
: public memento
344 string (context
*ctxt
, const char *text
);
347 const char *c_str () { return m_buffer
; }
349 static string
* from_printf (context
*ctxt
, const char *fmt
, ...)
352 void replay_into (replayer
*) {}
355 string
* make_debug_string ();
362 class location
: public memento
365 location (context
*ctxt
, string
*filename
, int line
, int column
)
367 m_filename (filename
),
372 void replay_into (replayer
*r
);
375 playback_location (replayer
*r
)
377 /* Normally during playback, we can walk forwards through the list of
378 recording objects, playing them back. The ordering of recording
379 ensures that everything that a recording object refers to has
380 already been played back, so we can simply look up the relevant
383 Locations are an exception, due to the "write_to_dump" method of
384 recording::statement. This method can set a new location on a
385 statement after the statement is created, and thus the location
386 appears in the context's memento list *after* the statement that
389 In such circumstances, the statement is replayed *before* the location,
390 when the latter doesn't yet have a playback object.
392 Hence we need to ensure that locations have playback objects. */
397 gcc_assert (m_playback_obj
);
398 return static_cast <playback::location
*> (m_playback_obj
);
402 string
* make_debug_string ();
410 class type
: public memento
413 type
*get_pointer ();
415 type
*get_volatile ();
417 /* Get the type obtained when dereferencing this type.
419 This will return NULL if it's not valid to dereference this type.
420 The caller is responsible for setting an error. */
421 virtual type
*dereference () = 0;
424 virtual function_type
*dyn_cast_function_type () { return NULL
; }
425 virtual function_type
*as_a_function_type() { gcc_unreachable (); return NULL
; }
426 virtual struct_
*dyn_cast_struct () { return NULL
; }
428 /* Is it typesafe to copy to this type from rtype? */
429 virtual bool accepts_writes_from (type
*rtype
)
432 return this == rtype
->unqualified ();
435 /* Strip off "const" etc */
436 virtual type
*unqualified ()
441 virtual bool is_int () const = 0;
442 virtual bool is_float () const = 0;
443 virtual bool is_bool () const = 0;
444 virtual type
*is_pointer () = 0;
445 virtual type
*is_array () = 0;
447 bool is_numeric () const
449 return is_int () || is_float () || is_bool ();
455 return static_cast <playback::type
*> (m_playback_obj
);
461 m_pointer_to_this_type (NULL
)
465 type
*m_pointer_to_this_type
;
468 /* Result of "gcc_jit_type_get_type". */
469 class memento_of_get_type
: public type
472 memento_of_get_type (context
*ctxt
,
473 enum gcc_jit_types kind
)
477 type
*dereference ();
479 bool accepts_writes_from (type
*rtype
)
481 if (m_kind
== GCC_JIT_TYPE_VOID_PTR
)
482 if (rtype
->is_pointer ())
484 /* LHS (this) is type (void *), and the RHS is a pointer:
489 return type::accepts_writes_from (rtype
);
492 bool is_int () const;
493 bool is_float () const;
494 bool is_bool () const;
495 type
*is_pointer () { return dereference (); }
496 type
*is_array () { return NULL
; }
499 void replay_into (replayer
*r
);
502 string
* make_debug_string ();
505 enum gcc_jit_types m_kind
;
508 /* Result of "gcc_jit_type_get_pointer". */
509 class memento_of_get_pointer
: public type
512 memento_of_get_pointer (type
*other_type
)
513 : type (other_type
->m_ctxt
),
514 m_other_type (other_type
) {}
516 type
*dereference () { return m_other_type
; }
518 bool accepts_writes_from (type
*rtype
);
520 void replay_into (replayer
*r
);
522 bool is_int () const { return false; }
523 bool is_float () const { return false; }
524 bool is_bool () const { return false; }
525 type
*is_pointer () { return m_other_type
; }
526 type
*is_array () { return NULL
; }
529 string
* make_debug_string ();
535 /* Result of "gcc_jit_type_get_const". */
536 class memento_of_get_const
: public type
539 memento_of_get_const (type
*other_type
)
540 : type (other_type
->m_ctxt
),
541 m_other_type (other_type
) {}
543 type
*dereference () { return m_other_type
->dereference (); }
545 bool accepts_writes_from (type */
*rtype*/
)
547 /* Can't write to a "const". */
551 /* Strip off the "const", giving the underlying type. */
552 type
*unqualified () { return m_other_type
; }
554 bool is_int () const { return m_other_type
->is_int (); }
555 bool is_float () const { return m_other_type
->is_float (); }
556 bool is_bool () const { return m_other_type
->is_bool (); }
557 type
*is_pointer () { return m_other_type
->is_pointer (); }
558 type
*is_array () { return m_other_type
->is_array (); }
560 void replay_into (replayer
*);
563 string
* make_debug_string ();
569 /* Result of "gcc_jit_type_get_volatile". */
570 class memento_of_get_volatile
: public type
573 memento_of_get_volatile (type
*other_type
)
574 : type (other_type
->m_ctxt
),
575 m_other_type (other_type
) {}
577 type
*dereference () { return m_other_type
->dereference (); }
579 /* Strip off the "volatile", giving the underlying type. */
580 type
*unqualified () { return m_other_type
; }
582 bool is_int () const { return m_other_type
->is_int (); }
583 bool is_float () const { return m_other_type
->is_float (); }
584 bool is_bool () const { return m_other_type
->is_bool (); }
585 type
*is_pointer () { return m_other_type
->is_pointer (); }
586 type
*is_array () { return m_other_type
->is_array (); }
588 void replay_into (replayer
*);
591 string
* make_debug_string ();
597 class array_type
: public type
600 array_type (context
*ctxt
,
606 m_element_type (element_type
),
607 m_num_elements (num_elements
)
610 type
*dereference ();
612 bool is_int () const { return false; }
613 bool is_float () const { return false; }
614 bool is_bool () const { return false; }
615 type
*is_pointer () { return NULL
; }
616 type
*is_array () { return m_element_type
; }
618 void replay_into (replayer
*);
621 string
* make_debug_string ();
625 type
*m_element_type
;
629 class function_type
: public type
632 function_type (context
*ctxt
,
638 type
*dereference ();
639 function_type
*dyn_cast_function_type () { return this; }
640 function_type
*as_a_function_type () { return this; }
642 bool is_int () const { return false; }
643 bool is_float () const { return false; }
644 bool is_bool () const { return false; }
645 type
*is_pointer () { return NULL
; }
646 type
*is_array () { return NULL
; }
648 void replay_into (replayer
*);
650 type
* get_return_type () const { return m_return_type
; }
651 const vec
<type
*> &get_param_types () const { return m_param_types
; }
652 int is_variadic () const { return m_is_variadic
; }
654 string
* make_debug_string_with_ptr ();
657 string
* make_debug_string ();
658 string
* make_debug_string_with (const char *);
662 auto_vec
<type
*> m_param_types
;
666 class field
: public memento
669 field (context
*ctxt
,
680 type
* get_type () const { return m_type
; }
682 compound_type
* get_container () const { return m_container
; }
683 void set_container (compound_type
*c
) { m_container
= c
; }
685 void replay_into (replayer
*);
687 void write_to_dump (dump
&d
);
690 playback_field () const
692 return static_cast <playback::field
*> (m_playback_obj
);
696 string
* make_debug_string ();
702 compound_type
*m_container
;
705 /* Base class for struct_ and union_ */
706 class compound_type
: public type
709 compound_type (context
*ctxt
,
713 string
*get_name () const { return m_name
; }
714 location
*get_loc () const { return m_loc
; }
715 fields
* get_fields () { return m_fields
; }
718 set_fields (location
*loc
,
722 type
*dereference ();
724 bool is_int () const { return false; }
725 bool is_float () const { return false; }
726 bool is_bool () const { return false; }
727 type
*is_pointer () { return NULL
; }
728 type
*is_array () { return NULL
; }
730 playback::compound_type
*
731 playback_compound_type ()
733 return static_cast <playback::compound_type
*> (m_playback_obj
);
742 class struct_
: public compound_type
745 struct_ (context
*ctxt
,
749 struct_
*dyn_cast_struct () { return this; }
752 as_type () { return this; }
754 void replay_into (replayer
*r
);
757 string
* make_debug_string ();
761 // memento of struct_::set_fields
762 class fields
: public memento
765 fields (compound_type
*struct_or_union
,
769 void replay_into (replayer
*r
);
771 void write_to_dump (dump
&d
);
774 string
* make_debug_string ();
777 compound_type
*m_struct_or_union
;
778 auto_vec
<field
*> m_fields
;
781 class union_
: public compound_type
784 union_ (context
*ctxt
,
788 void replay_into (replayer
*r
);
791 string
* make_debug_string ();
799 class rvalue
: public memento
802 rvalue (context
*ctxt
,
812 /* Get the recording::type of this rvalue.
814 Implements the post-error-checking part of
815 gcc_jit_rvalue_get_type. */
816 type
* get_type () const { return m_type
; }
819 playback_rvalue () const
821 return static_cast <playback::rvalue
*> (m_playback_obj
);
824 access_field (location
*loc
,
828 dereference_field (location
*loc
,
832 dereference (location
*loc
);
839 class lvalue
: public rvalue
842 lvalue (context
*ctxt
,
845 : rvalue (ctxt
, loc
, type_
)
849 playback_lvalue () const
851 return static_cast <playback::lvalue
*> (m_playback_obj
);
855 access_field (location
*loc
,
859 get_address (location
*loc
);
862 as_rvalue () { return this; }
865 class param
: public lvalue
868 param (context
*ctxt
,
872 : lvalue (ctxt
, loc
, type
),
876 as_lvalue () { return this; }
878 void replay_into (replayer
*r
);
881 playback_param () const
883 return static_cast <playback::param
*> (m_playback_obj
);
887 string
* make_debug_string () { return m_name
; }
893 class function
: public memento
896 function (context
*ctxt
,
898 enum gcc_jit_function_kind kind
,
904 enum built_in_function builtin_id
);
906 void replay_into (replayer
*r
);
909 playback_function () const
911 return static_cast <playback::function
*> (m_playback_obj
);
914 enum gcc_jit_function_kind
get_kind () const { return m_kind
; }
917 new_local (location
*loc
,
922 new_block (const char *name
);
924 type
*get_return_type () const { return m_return_type
; }
925 string
* get_name () const { return m_name
; }
926 const vec
<param
*> &get_params () const { return m_params
; }
928 /* Get the given param by index.
929 Implements the post-error-checking part of
930 gcc_jit_function_get_param. */
931 param
*get_param (int i
) const { return m_params
[i
]; }
933 bool is_variadic () const { return m_is_variadic
; }
935 void write_to_dump (dump
&d
);
939 void dump_to_dot (const char *path
);
942 string
* make_debug_string ();
946 enum gcc_jit_function_kind m_kind
;
949 auto_vec
<param
*> m_params
;
951 enum built_in_function m_builtin_id
;
952 auto_vec
<local
*> m_locals
;
953 auto_vec
<block
*> m_blocks
;
956 class block
: public memento
959 block (function
*func
, int index
, string
*name
)
960 : memento (func
->m_ctxt
),
965 m_has_been_terminated (false),
966 m_is_reachable (false)
970 /* Get the recording::function containing this block.
971 Implements the post-error-checking part of
972 gcc_jit_block_get_function. */
973 function
*get_function () { return m_func
; }
975 bool has_been_terminated () { return m_has_been_terminated
; }
976 bool is_reachable () { return m_is_reachable
; }
979 add_eval (location
*loc
,
983 add_assignment (location
*loc
,
988 add_assignment_op (location
*loc
,
990 enum gcc_jit_binary_op op
,
994 add_comment (location
*loc
,
998 end_with_conditional (location
*loc
,
1004 end_with_jump (location
*loc
,
1008 end_with_return (location
*loc
,
1012 playback_block () const
1014 return static_cast <playback::block
*> (m_playback_obj
);
1017 void write_to_dump (dump
&d
);
1021 location
*get_loc () const;
1023 statement
*get_first_statement () const;
1024 statement
*get_last_statement () const;
1026 int get_successor_blocks (block
**next1
, block
**next2
) const;
1029 string
* make_debug_string ();
1031 void replay_into (replayer
*r
);
1033 void dump_to_dot (pretty_printer
*pp
);
1034 void dump_edges_to_dot (pretty_printer
*pp
);
1040 auto_vec
<statement
*> m_statements
;
1041 bool m_has_been_terminated
;
1042 bool m_is_reachable
;
1044 friend class function
;
1047 class global
: public lvalue
1050 global (context
*ctxt
,
1054 : lvalue (ctxt
, loc
, type
),
1058 void replay_into (replayer
*);
1061 string
* make_debug_string () { return m_name
; }
1067 class memento_of_new_rvalue_from_int
: public rvalue
1070 memento_of_new_rvalue_from_int (context
*ctxt
,
1074 : rvalue (ctxt
, loc
, numeric_type
),
1077 void replay_into (replayer
*r
);
1080 string
* make_debug_string ();
1086 class memento_of_new_rvalue_from_double
: public rvalue
1089 memento_of_new_rvalue_from_double (context
*ctxt
,
1093 : rvalue (ctxt
, loc
, numeric_type
),
1097 void replay_into (replayer
*);
1100 string
* make_debug_string ();
1106 class memento_of_new_rvalue_from_ptr
: public rvalue
1109 memento_of_new_rvalue_from_ptr (context
*ctxt
,
1113 : rvalue (ctxt
, loc
, pointer_type
),
1117 void replay_into (replayer
*);
1120 string
* make_debug_string ();
1126 class memento_of_new_string_literal
: public rvalue
1129 memento_of_new_string_literal (context
*ctxt
,
1132 : rvalue (ctxt
, loc
, ctxt
->get_type (GCC_JIT_TYPE_CONST_CHAR_PTR
)),
1135 void replay_into (replayer
*r
);
1138 string
* make_debug_string ();
1144 class unary_op
: public rvalue
1147 unary_op (context
*ctxt
,
1149 enum gcc_jit_unary_op op
,
1152 : rvalue (ctxt
, loc
, result_type
),
1157 void replay_into (replayer
*r
);
1160 string
* make_debug_string ();
1163 enum gcc_jit_unary_op m_op
;
1167 class binary_op
: public rvalue
1170 binary_op (context
*ctxt
,
1172 enum gcc_jit_binary_op op
,
1174 rvalue
*a
, rvalue
*b
)
1175 : rvalue (ctxt
, loc
, result_type
),
1180 void replay_into (replayer
*r
);
1183 string
* make_debug_string ();
1186 enum gcc_jit_binary_op m_op
;
1191 class comparison
: public rvalue
1194 comparison (context
*ctxt
,
1196 enum gcc_jit_comparison op
,
1197 rvalue
*a
, rvalue
*b
)
1198 : rvalue (ctxt
, loc
, ctxt
->get_type (GCC_JIT_TYPE_BOOL
)),
1204 void replay_into (replayer
*r
);
1207 string
* make_debug_string ();
1210 enum gcc_jit_comparison m_op
;
1215 class cast
: public rvalue
1218 cast (context
*ctxt
,
1222 : rvalue (ctxt
, loc
, type_
),
1226 void replay_into (replayer
*r
);
1229 string
* make_debug_string ();
1235 class call
: public rvalue
1238 call (context
*ctxt
,
1244 void replay_into (replayer
*r
);
1247 string
* make_debug_string ();
1251 auto_vec
<rvalue
*> m_args
;
1254 class call_through_ptr
: public rvalue
1257 call_through_ptr (context
*ctxt
,
1263 void replay_into (replayer
*r
);
1266 string
* make_debug_string ();
1270 auto_vec
<rvalue
*> m_args
;
1273 class array_access
: public lvalue
1276 array_access (context
*ctxt
,
1280 : lvalue (ctxt
, loc
, ptr
->get_type ()->dereference ()),
1285 void replay_into (replayer
*r
);
1288 string
* make_debug_string ();
1295 class access_field_of_lvalue
: public lvalue
1298 access_field_of_lvalue (context
*ctxt
,
1302 : lvalue (ctxt
, loc
, field
->get_type ()),
1307 void replay_into (replayer
*r
);
1310 string
* make_debug_string ();
1317 class access_field_rvalue
: public rvalue
1320 access_field_rvalue (context
*ctxt
,
1324 : rvalue (ctxt
, loc
, field
->get_type ()),
1329 void replay_into (replayer
*r
);
1332 string
* make_debug_string ();
1339 class dereference_field_rvalue
: public lvalue
1342 dereference_field_rvalue (context
*ctxt
,
1346 : lvalue (ctxt
, loc
, field
->get_type ()),
1351 void replay_into (replayer
*r
);
1354 string
* make_debug_string ();
1361 class dereference_rvalue
: public lvalue
1364 dereference_rvalue (context
*ctxt
,
1367 : lvalue (ctxt
, loc
, val
->get_type ()->dereference ()),
1370 void replay_into (replayer
*r
);
1373 string
* make_debug_string ();
1379 class get_address_of_lvalue
: public rvalue
1382 get_address_of_lvalue (context
*ctxt
,
1385 : rvalue (ctxt
, loc
, val
->get_type ()->get_pointer ()),
1389 void replay_into (replayer
*r
);
1392 string
* make_debug_string ();
1398 class local
: public lvalue
1401 local (function
*func
, location
*loc
, type
*type_
, string
*name
)
1402 : lvalue (func
->m_ctxt
, loc
, type_
),
1406 void replay_into (replayer
*r
);
1408 void write_to_dump (dump
&d
);
1411 string
* make_debug_string () { return m_name
; }
1418 class statement
: public memento
1421 virtual int get_successor_blocks (block
**out_next1
,
1422 block
**out_next2
) const;
1424 void write_to_dump (dump
&d
);
1426 location
*get_loc () const { return m_loc
; }
1429 statement (block
*b
, location
*loc
)
1430 : memento (b
->m_ctxt
),
1434 block
*get_block () const { return m_block
; }
1436 playback::location
*
1437 playback_location (replayer
*r
) const
1439 return ::gcc::jit::recording::playback_location (r
, m_loc
);
1447 class eval
: public statement
1453 : statement (b
, loc
),
1454 m_rvalue (rvalue
) {}
1456 void replay_into (replayer
*r
);
1459 string
* make_debug_string ();
1465 class assignment
: public statement
1468 assignment (block
*b
,
1472 : statement (b
, loc
),
1474 m_rvalue (rvalue
) {}
1476 void replay_into (replayer
*r
);
1479 string
* make_debug_string ();
1486 class assignment_op
: public statement
1489 assignment_op (block
*b
,
1492 enum gcc_jit_binary_op op
,
1494 : statement (b
, loc
),
1497 m_rvalue (rvalue
) {}
1499 void replay_into (replayer
*r
);
1502 string
* make_debug_string ();
1506 enum gcc_jit_binary_op m_op
;
1510 class comment
: public statement
1516 : statement (b
, loc
),
1519 void replay_into (replayer
*r
);
1522 string
* make_debug_string ();
1528 class conditional
: public statement
1531 conditional (block
*b
,
1536 : statement (b
, loc
),
1537 m_boolval (boolval
),
1538 m_on_true (on_true
),
1539 m_on_false (on_false
) {}
1541 void replay_into (replayer
*r
);
1543 int get_successor_blocks (block
**out_next1
,
1544 block
**out_next2
) const;
1547 string
* make_debug_string ();
1555 class jump
: public statement
1561 : statement (b
, loc
),
1562 m_target (target
) {}
1564 void replay_into (replayer
*r
);
1566 int get_successor_blocks (block
**out_next1
,
1567 block
**out_next2
) const;
1570 string
* make_debug_string ();
1576 class return_
: public statement
1582 : statement (b
, loc
),
1583 m_rvalue (rvalue
) {}
1585 void replay_into (replayer
*r
);
1587 int get_successor_blocks (block
**out_next1
,
1588 block
**out_next2
) const;
1591 string
* make_debug_string ();
1597 } // namespace gcc::jit::recording
1599 } // namespace gcc::jit
1603 #endif /* JIT_RECORDING_H */