21#ifndef GCC_ANALYZER_OPS_H
22#define GCC_ANALYZER_OPS_H
70 std::unique_ptr<custom_edge_info> info =
nullptr);
104 virtual std::unique_ptr<operation>
132 std::unique_ptr<rejected_constraint> *)
const
176 bool &unknown_side_effects,
220 std::unique_ptr<rejected_constraint> *out_rc)
const override;
250 std::unique_ptr<operation>
253 return std::make_unique<gasm_op> (
get_gasm ());
272 std::unique_ptr<operation>
275 return std::make_unique<gassign_op> (
get_gassign ());
298 std::unique_ptr<operation>
301 return std::make_unique<predict_op> (
get_stmt ());
319 std::unique_ptr<operation>
322 return std::make_unique<greturn_op> (
get_greturn ());
332 std::unique_ptr<rejected_constraint> *out_rc)
const override;
384 static std::unique_ptr<operation>
387 std::unique_ptr<operation>
390 return std::make_unique<call_and_return_op> (
get_gcall ());
477 std::unique_ptr<operation>
498 std::unique_ptr<operation>
501 return std::make_unique<setjmp_op> (
get_gcall ());
520 std::unique_ptr<operation>
523 return std::make_unique<longjmp_op> (
get_gcall ());
539 std::unique_ptr<operation>
560 std::unique_ptr<operation>
563 return std::make_unique<resx_op> (
get_gresx ());
630 std::unique_ptr<rejected_constraint> *out_rc)
const override;
644 const gimple &ctrlflow_stmt)
655 std::unique_ptr<rejected_constraint> *out)
const = 0;
669 const gcond &cond_stmt);
671 std::unique_ptr<operation>
674 return std::make_unique<gcond_edge_op> (
get_cfg_edge (),
680 bool user_facing)
const final override;
702 std::unique_ptr<rejected_constraint> *out)
703 const final override;
716 const ggoto &goto_stmt,
719 std::unique_ptr<operation>
722 return std::make_unique<ggoto_edge_op> (
get_cfg_edge (),
729 bool user_facing)
const final override;
744 std::unique_ptr<rejected_constraint> *out)
745 const final override;
762 std::unique_ptr<operation>
765 return std::make_unique<switch_case_op> (*
this);
770 bool user_facing)
const final override;
784 std::unique_ptr<rejected_constraint> *out)
785 const final override;
796 static std::unique_ptr<eh_dispatch_edge_op>
826 std::unique_ptr<rejected_constraint> *out)
827 const final override;
834 std::unique_ptr<rejected_constraint> *out)
const = 0;
854 std::unique_ptr<operation>
857 return std::make_unique<eh_dispatch_try_edge_op> (*
this);
862 bool user_facing)
const final override;
874 std::unique_ptr<rejected_constraint> *out)
875 const final override;
898 std::unique_ptr<operation>
901 return std::make_unique<eh_dispatch_allowed_edge_op> (*
this);
906 bool user_facing)
const final override;
916 std::unique_ptr<rejected_constraint> *out)
917 const final override;
941 static std::unique_ptr<operation>
944 std::unique_ptr<operation>
947 return std::make_unique<phis_for_edge_op> (*
this);
958 bool user_facing)
const final override;
975 std::unique_ptr<rejected_constraint> *out_rc)
const override;
993 static std::vector<pair>
Definition constraint-manager.h:178
const gcall & get_gcall() const
Definition ops.h:393
const call_and_return_op * dyn_cast_call_and_return_op() const final override
Definition ops.h:412
bool supports_bulk_merge_p() const final override
Definition ops.h:402
cgraph_edge * get_any_cgraph_edge(operation_context &op_ctxt) const
std::unique_ptr< operation > clone() const override
Definition ops.h:388
tree get_parm_for_arg(tree callee_fndecl, tree arg, callsite_expr *out) const
void execute(operation_context &op_ctxt) const override
const known_function * maybe_get_known_function(const call_details &cd) const
tree get_arg_for_parm(tree callee_fndecl, tree parm, callsite_expr *out) const
call_and_return_op(const gcall &call_stmt)
Definition ops.h:423
tree map_expr_from_callee_to_caller(tree callee_fndecl, tree callee_expr, callsite_expr *out) const
void add_any_events_for_eedge(const exploded_edge &eedge, checker_path &out_path) const override
static std::unique_ptr< operation > make(const gcall &call_stmt)
void replay_call_summary(operation_context &op_ctxt, function &called_fn, call_summary &summary, region_model_context *ctxt) const
void replay_call_summaries(operation_context &op_ctxt, function &called_fn, per_function_data &called_fn_data, region_model_context *ctxt) const
tree map_expr_from_caller_to_callee(tree callee_fndecl, tree caller_expr, callsite_expr *out) const
Definition call-details.h:31
Definition call-summary.h:34
Definition supergraph.h:330
Definition checker-path.h:32
void walk_load_store_addr_ops(void *, walk_stmt_load_store_addr_fn, walk_stmt_load_store_addr_fn, walk_stmt_load_store_addr_fn) const final override
int get_flags() const
Definition ops.h:636
const gimple & get_ctrlflow_stmt() const
Definition ops.h:639
::edge m_cfg_edge
Definition ops.h:657
bool execute_for_feasibility(const exploded_edge &, feasibility_state &, region_model_context *, std::unique_ptr< rejected_constraint > *out_rc) const override
const control_flow_op * dyn_cast_control_flow_op() const
Definition ops.h:633
bool defines_ssa_name_p(const_tree) const final override
Definition ops.h:597
const gimple & m_ctrlflow_stmt
Definition ops.h:658
void add_any_events_for_eedge(const exploded_edge &eedge, checker_path &out_path) const override
int back_edge_p() const
Definition ops.h:637
virtual bool apply_constraints(const superedge *sedge, region_model &model, region_model_context *ctxt, std::unique_ptr< rejected_constraint > *out) const =0
const gimple * maybe_get_stmt() const final override
Definition ops.h:609
void execute(operation_context &op_ctxt) const final override
control_flow_op(enum kind kind_, ::edge cfg_edge, const gimple &ctrlflow_stmt)
Definition ops.h:642
::edge get_cfg_edge() const
Definition ops.h:635
virtual label_text maybe_describe_condition(bool can_colorize) const
bool supports_bulk_merge_p() const final override
Definition ops.h:621
bool m_is_rethrow
Definition ops.h:549
cxa_throw_op(const gcall &call_stmt, bool is_rethrow)
Definition ops.h:533
void execute(operation_context &op_ctxt) const final override
std::unique_ptr< operation > clone() const final override
Definition ops.h:540
void execute(operation_context &op_ctxt) const final override
dump_kind
Definition ops.h:464
@ state_2
Definition ops.h:468
@ state
Definition ops.h:465
@ sarif
Definition ops.h:466
enum dump_kind m_dump_kind
Definition ops.h:487
dump_op(const gcall &call_stmt, enum dump_kind dump_kind_)
Definition ops.h:471
std::unique_ptr< operation > clone() const final override
Definition ops.h:478
std::unique_ptr< operation > clone() const final override
Definition ops.h:899
eh_kind
Definition ops.h:887
@ expected
Definition ops.h:888
@ unexpected
Definition ops.h:889
enum eh_kind get_eh_kind() const
Definition ops.h:908
eh_dispatch_allowed_edge_op(supernode *src_snode, supernode *dst_snode, ::edge cfg_edge, const geh_dispatch &geh_dispatch_stmt, eh_region eh_reg)
bool apply_eh_constraints(const superedge *sedge, region_model &model, region_model_context *ctxt, tree exception_type, std::unique_ptr< rejected_constraint > *out) const final override
enum eh_kind m_kind
Definition ops.h:919
void print_as_edge_label(pretty_printer *pp, bool user_facing) const final override
virtual bool apply_eh_constraints(const superedge *sedge, region_model &model, region_model_context *ctxt, tree exception_type, std::unique_ptr< rejected_constraint > *out) const =0
supernode * get_src_snode() const
Definition ops.h:819
static std::unique_ptr< eh_dispatch_edge_op > make(supernode *src, supernode *dest, ::edge cfg_edge, const geh_dispatch &geh_dispatch_stmt)
supernode * m_dst_snode
Definition ops.h:837
eh_region m_eh_region
Definition ops.h:838
eh_region get_eh_region() const
Definition ops.h:809
const geh_dispatch & get_geh_dispatch() const
Definition ops.h:803
supernode * m_src_snode
Definition ops.h:836
eh_dispatch_edge_op(supernode *src_snode, supernode *dst_snode, enum kind kind_, ::edge cfg_edge, const geh_dispatch &geh_dispatch_stmt, eh_region eh_reg)
bool apply_constraints(const superedge *sedge, region_model &model, region_model_context *ctxt, std::unique_ptr< rejected_constraint > *out) const final override
void print_as_edge_label(pretty_printer *pp, bool user_facing) const final override
bool apply_eh_constraints(const superedge *sedge, region_model &model, region_model_context *ctxt, tree exception_type, std::unique_ptr< rejected_constraint > *out) const final override
void add_any_events_for_eedge(const exploded_edge &eedge, checker_path &out_path) const final override
std::unique_ptr< operation > clone() const final override
Definition ops.h:855
eh_catch m_eh_catch
Definition ops.h:877
eh_dispatch_try_edge_op(supernode *src_snode, supernode *dst_snode, ::edge cfg_edge, const geh_dispatch &geh_dispatch_stmt, eh_region eh_reg, eh_catch ehc)
Definition exploded-graph.h:335
Definition exploded-graph.h:783
Definition exploded-graph.h:206
Definition program-state.h:34
Definition exploded-graph.h:980
gasm_op(const gasm &asm_stmt)
Definition ops.h:245
const gasm & get_gasm() const
Definition ops.h:256
std::unique_ptr< operation > clone() const final override
Definition ops.h:251
const gassign & get_gassign() const
Definition ops.h:278
std::unique_ptr< operation > clone() const final override
Definition ops.h:273
gassign_op(const gassign &assign_stmt)
Definition ops.h:267
std::unique_ptr< operation > clone() const final override
Definition ops.h:672
label_text maybe_describe_condition(bool can_colorize) const final override
static bool should_print_expr_p(tree expr)
const gcond & get_gcond() const
Definition ops.h:685
static label_text maybe_describe_condition(bool can_colorize, tree lhs, enum tree_code op, tree rhs)
bool apply_constraints(const superedge *sedge, region_model &model, region_model_context *ctxt, std::unique_ptr< rejected_constraint > *out) const final override
gcond_edge_op(::edge cfg_edge, const gcond &cond_stmt)
bool m_true_value
Definition ops.h:705
void print_as_edge_label(pretty_printer *pp, bool user_facing) const final override
tree m_dst_label
Definition ops.h:747
bool apply_constraints(const superedge *sedge, region_model &model, region_model_context *ctxt, std::unique_ptr< rejected_constraint > *out) const final override
void print_as_edge_label(pretty_printer *pp, bool user_facing) const final override
label_text maybe_describe_condition(bool can_colorize) const final override
ggoto_edge_op(::edge cfg_edge, const ggoto &goto_stmt, tree dst_label)
const ggoto & get_ggoto() const
Definition ops.h:734
std::unique_ptr< operation > clone() const final override
Definition ops.h:720
virtual bool supports_bulk_merge_p() const override
gimple_stmt_op(enum kind kind_, const gimple &stmt)
Definition ops.h:230
bool execute_for_feasibility(const exploded_edge &, feasibility_state &, region_model_context *, std::unique_ptr< rejected_constraint > *out_rc) const override
void print_as_edge_label(pretty_printer *pp, bool user_facing) const override
void add_any_events_for_eedge(const exploded_edge &eedge, checker_path &out_path) const override
const gimple & m_stmt
Definition ops.h:235
void execute_on_state(operation_context &op_ctxt, program_state dst_state) const
const gimple & get_stmt() const
Definition ops.h:189
void execute(operation_context &op_ctxt) const override
void walk_load_store_addr_ops(void *, walk_stmt_load_store_addr_fn, walk_stmt_load_store_addr_fn, walk_stmt_load_store_addr_fn) const final override
const gimple * maybe_get_stmt() const final override
Definition ops.h:204
bool defines_ssa_name_p(const_tree ssa_name) const final override
void add_any_events_for_eedge(const exploded_edge &eedge, checker_path &out_path) const final override
std::unique_ptr< operation > clone() const final override
Definition ops.h:320
void execute(operation_context &op_ctxt) const final override
const greturn & get_greturn() const
Definition ops.h:344
bool execute_for_feasibility(const exploded_edge &, feasibility_state &, region_model_context *ctxt, std::unique_ptr< rejected_constraint > *out_rc) const override
greturn_op(const greturn &return_stmt)
Definition ops.h:314
tree get_retval() const
Definition ops.h:349
bool supports_bulk_merge_p() const final override
Definition ops.h:335
Definition analyzer-logging.h:34
longjmp_op(const gcall &call_stmt)
Definition ops.h:515
std::unique_ptr< operation > clone() const final override
Definition ops.h:521
void execute(operation_context &op_ctxt) const final override
virtual const gimple * maybe_get_stmt() const
Definition ops.h:120
enum kind m_kind
Definition ops.h:180
virtual const call_and_return_op * dyn_cast_call_and_return_op() const
Definition ops.h:159
virtual void walk_load_store_addr_ops(void *, walk_stmt_load_store_addr_fn, walk_stmt_load_store_addr_fn, walk_stmt_load_store_addr_fn) const =0
virtual bool supports_bulk_merge_p() const =0
virtual const control_flow_op * dyn_cast_control_flow_op() const
Definition ops.h:156
~operation()
Definition ops.h:99
@ predict_stmt
Definition ops.h:87
@ call_and_return
Definition ops.h:96
@ asm_stmt
Definition ops.h:85
@ resx
Definition ops.h:89
@ phis
Definition ops.h:95
@ eh_dispatch_allowed_edge
Definition ops.h:94
@ assignment
Definition ops.h:86
@ eh_dispatch_try_edge
Definition ops.h:93
@ cond_edge
Definition ops.h:90
@ goto_edge
Definition ops.h:91
@ return_stmt
Definition ops.h:88
@ switch_edge
Definition ops.h:92
virtual std::unique_ptr< operation > clone() const =0
enum kind get_kind() const
Definition ops.h:164
virtual void update_state_for_bulk_merger(const program_state &, program_state &) const
Definition ops.h:144
operation(enum kind kind_)
Definition ops.h:167
static void handle_on_stmt_for_state_machines(operation_context &op_ctxt, program_state &dst_state, path_context *path_ctxt, bool &unknown_side_effects, const gimple &stmt)
virtual void add_any_events_for_eedge(const exploded_edge &eedge, checker_path &out_path) const =0
virtual bool execute_for_feasibility(const exploded_edge &, feasibility_state &, region_model_context *, std::unique_ptr< rejected_constraint > @endverbatim *) const
Definition ops.h:129
virtual void execute(operation_context &op_ctxt) const =0
virtual const phis_for_edge_op * dyn_cast_phis_for_edge_op() const
Definition ops.h:162
virtual void print_as_edge_label(pretty_printer *pp, bool user_facing) const =0
virtual bool defines_ssa_name_p(const_tree ssa_name) const =0
std::vector< pair > m_pairs
Definition ops.h:1001
void update_state(const program_state &src_state, program_state &dst_state, region_model_context *ctxt) const
const std::vector< pair > & get_pairs() const
Definition ops.h:990
const phis_for_edge_op * dyn_cast_phis_for_edge_op() const final override
Definition ops.h:954
bool supports_bulk_merge_p() const final override
Definition ops.h:978
bool execute_for_feasibility(const exploded_edge &, feasibility_state &, region_model_context *, std::unique_ptr< rejected_constraint > *out_rc) const override
static std::unique_ptr< operation > maybe_make(::edge cfg_in_edge)
std::unique_ptr< operation > clone() const final override
Definition ops.h:945
void print_as_edge_label(pretty_printer *pp, bool user_facing) const final override
bool defines_ssa_name_p(const_tree ssa_name) const final override
::edge m_cfg_in_edge
Definition ops.h:1002
void walk_load_store_addr_ops(void *, walk_stmt_load_store_addr_fn, walk_stmt_load_store_addr_fn, walk_stmt_load_store_addr_fn) const final override
static std::vector< pair > get_pairs_for_phi_along_in_edge(::edge cfg_in_edge)
void execute(operation_context &op_ctxt) const final override
void add_any_events_for_eedge(const exploded_edge &eedge, checker_path &out_path) const final override
phis_for_edge_op(std::vector< pair > &&pairs, ::edge cfg_in_edge)
void update_state_for_bulk_merger(const program_state &src_state, program_state &dst_state) const final override
predict_op(const gimple &predict_stmt)
Definition ops.h:292
std::unique_ptr< operation > clone() const final override
Definition ops.h:299
Definition program-point.h:54
Definition program-state.h:224
Definition region-model.h:768
Definition region-model.h:299
const gresx & get_gresx() const
Definition ops.h:566
std::unique_ptr< operation > clone() const final override
Definition ops.h:561
resx_op(const gresx &resx_stmt)
Definition ops.h:555
bool supports_bulk_merge_p() const final override
Definition ops.h:575
void add_any_events_for_eedge(const exploded_edge &eedge, checker_path &out_path) const final override
void execute(operation_context &op_ctxt) const final override
std::unique_ptr< operation > clone() const final override
Definition ops.h:499
void execute(operation_context &op_ctxt) const final override
void add_any_events_for_eedge(const exploded_edge &eedge, checker_path &out_path) const final override
setjmp_op(const gcall &call_stmt)
Definition ops.h:493
Definition supergraph.h:281
Definition supergraph.h:105
Definition supergraph.h:224
std::unique_ptr< operation > clone() const final override
Definition ops.h:763
bool implicitly_created_default_p() const
void print_as_edge_label(pretty_printer *pp, bool user_facing) const final override
bool apply_constraints(const superedge *sedge, region_model &model, region_model_context *ctxt, std::unique_ptr< rejected_constraint > *out) const final override
const bounded_ranges * m_all_cases_ranges
Definition ops.h:788
std::vector< tree > m_case_labels
Definition ops.h:787
const gswitch & get_gswitch() const
Definition ops.h:774
switch_case_op(function &fun, ::edge cfg_edge, const gswitch &switch_stmt, bounded_ranges_manager &mgr)
Definition genmatch.cc:1506
Definition pretty-print.h:241
class edge_def * edge
Definition coretypes.h:369
const union tree_node * const_tree
Definition coretypes.h:98
union tree_node * tree
Definition coretypes.h:97
struct eh_catch_d * eh_catch
Definition except.h:183
struct eh_region_d * eh_region
Definition except.h:184
void final(rtx_insn *first, FILE *file, int optimize_p)
Definition final.cc:2009
tree_code
Definition genmatch.cc:1002
bool(* walk_stmt_load_store_addr_fn)(gimple *, tree, tree, void *)
Definition gimple-walk.h:93
tree gimple_return_retval(const greturn *gs)
Definition gimple.h:6827
T as_a(U *p)
Definition is-a.h:253
Definition access-diagram.h:30
@ stmt
Definition checker-event.h:38
Definition graphviz.cc:147
Definition constraint-manager.h:123
const extrinsic_state & get_ext_state() const
const superedge & m_sedge
Definition ops.h:74
const program_point & get_initial_point() const
const program_state & get_initial_state() const
exploded_node & m_src_enode
Definition ops.h:73
program_point get_next_intraprocedural_point() const
void DEBUG_FUNCTION dump() const
const supergraph & get_supergraph() const
exploded_graph & m_eg
Definition ops.h:72
operation_context(exploded_graph &eg, exploded_node &src_enode, const superedge &sedge)
Definition ops.h:38
void add_outcome(const program_point &dst_point, program_state dst_state, bool could_do_work, uncertainty_t *uncertainty, std::unique_ptr< custom_edge_info > info=nullptr)
logger * get_logger() const
Definition exploded-graph.h:658
tree m_dst
Definition ops.h:937
tree m_src
Definition ops.h:938
Definition function.h:249
#define gcc_assert(EXPR)
Definition system.h:817
#define gcc_unreachable()
Definition system.h:844
#define DEBUG_FUNCTION
Definition system.h:1239
static control_dependences * cd
Definition tree-ssa-dce.cc:104
#define ssa_name(i)
Definition tree-ssanames.h:53