GCC Middle and Back End API Reference
ana::call_and_return_op Class Reference

#include <ops.h>

Inheritance diagram for ana::call_and_return_op:
Collaboration diagram for ana::call_and_return_op:

Public Types

enum  kind {
  asm_stmt , assignment , predict_stmt , return_stmt ,
  resx , cond_edge , goto_edge , switch_edge ,
  eh_dispatch_try_edge , eh_dispatch_allowed_edge , phis , call_and_return
}

Public Member Functions

std::unique_ptr< operationclone () const override
const gcallget_gcall () const
void execute (operation_context &op_ctxt) const override
bool supports_bulk_merge_p () const final override
void add_any_events_for_eedge (const exploded_edge &eedge, checker_path &out_path) const override
const call_and_return_opdyn_cast_call_and_return_op () const final override
tree map_expr_from_caller_to_callee (tree callee_fndecl, tree caller_expr, callsite_expr *out) const
tree map_expr_from_callee_to_caller (tree callee_fndecl, tree callee_expr, callsite_expr *out) const
 call_and_return_op (const gcall &call_stmt)
const known_functionmaybe_get_known_function (const call_details &cd) const
const gimpleget_stmt () const
void print_as_edge_label (pretty_printer *pp, bool user_facing) const override
bool defines_ssa_name_p (const_tree ssa_name) const final 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 gimplemaybe_get_stmt () const final override
void execute_on_state (operation_context &op_ctxt, program_state dst_state) const
bool execute_for_feasibility (const exploded_edge &, feasibility_state &, region_model_context *, std::unique_ptr< rejected_constraint > *out_rc) const override
virtual bool execute_for_feasibility (const exploded_edge &, feasibility_state &, region_model_context *, std::unique_ptr< rejected_constraint > @endverbatim *) const
void dump () const
virtual void update_state_for_bulk_merger (const program_state &, program_state &) const
virtual const control_flow_opdyn_cast_control_flow_op () const
virtual const phis_for_edge_opdyn_cast_phis_for_edge_op () const
enum kind get_kind () const

Static Public Member Functions

static std::unique_ptr< operationmake (const gcall &call_stmt)

Static Protected Member Functions

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)

Private Member Functions

cgraph_edgeget_any_cgraph_edge (operation_context &op_ctxt) const
void replay_call_summaries (operation_context &op_ctxt, function &called_fn, per_function_data &called_fn_data, region_model_context *ctxt) const
void replay_call_summary (operation_context &op_ctxt, function &called_fn, call_summary &summary, region_model_context *ctxt) const
tree get_arg_for_parm (tree callee_fndecl, tree parm, callsite_expr *out) const
tree get_parm_for_arg (tree callee_fndecl, tree arg, callsite_expr *out) const

Private Attributes

const gimplem_stmt
enum kind m_kind

Detailed Description

A concrete operation subclass representing the effect of a GIMPLE_CALL stmt.

If the function is identified and has a known body, either simulate
it interprocedurally by pushing a stack frame and transitioning to the
callee, or simulate it intraprocedurally by replaying a summary of the
effects of the call.

If the function is identified but has an unknown body,
simulate it intraprocedurally, either using a known_function
subclass for precision, or following conservative rules that
assume various side-effects.

If the function is unidentified (for some kinds of dynamic calls),
simulate it intraprocedurally, following conservative rules that
assume various side-effects.

In the various intraprocedural simulation cases, the exploded edge will
correspond to the underlying superedge.

In the interprocedural simulation case, the exploded edge will
link two supernodes in different functions, and thus will require
custom edge info.

Various subclasses exist for handling awkward special cases,
such as longjmp.   

Member Enumeration Documentation

◆ kind

enum ana::operation::kind
inherited
Enumerator
asm_stmt 
assignment 
predict_stmt 
return_stmt 
resx 
cond_edge 
goto_edge 
switch_edge 
eh_dispatch_try_edge 
eh_dispatch_allowed_edge 
phis 
call_and_return 

Constructor & Destructor Documentation

◆ call_and_return_op()

Member Function Documentation

◆ add_any_events_for_eedge()

void ana::call_and_return_op::add_any_events_for_eedge ( const exploded_edge & eedge,
checker_path & out_path ) const
overridevirtual

Implements ana::operation.

Reimplemented in ana::setjmp_op.

References call_and_return_op().

◆ clone()

std::unique_ptr< operation > ana::call_and_return_op::clone ( ) const
inlineoverridevirtual

Implements ana::operation.

Reimplemented in ana::cxa_throw_op, ana::dump_op, ana::longjmp_op, and ana::setjmp_op.

References get_gcall().

◆ defines_ssa_name_p()

bool ana::gimple_stmt_op::defines_ssa_name_p ( const_tree ssa_name) const
finaloverridevirtualinherited

Implements ana::operation.

References ssa_name.

◆ dump()

void ana::operation::dump ( ) const
inherited

◆ dyn_cast_call_and_return_op()

const call_and_return_op * ana::call_and_return_op::dyn_cast_call_and_return_op ( ) const
inlinefinaloverridevirtual

Reimplemented from ana::operation.

References final().

◆ dyn_cast_control_flow_op()

virtual const control_flow_op * ana::operation::dyn_cast_control_flow_op ( ) const
inlinevirtualinherited

Reimplemented in ana::control_flow_op.

◆ dyn_cast_phis_for_edge_op()

virtual const phis_for_edge_op * ana::operation::dyn_cast_phis_for_edge_op ( ) const
inlinevirtualinherited

Reimplemented in ana::phis_for_edge_op.

◆ execute()

void ana::call_and_return_op::execute ( operation_context & op_ctxt) const
overridevirtual

◆ execute_for_feasibility() [1/2]

bool ana::gimple_stmt_op::execute_for_feasibility ( const exploded_edge & ,
feasibility_state & ,
region_model_context * ,
std::unique_ptr< rejected_constraint > * out_rc ) const
overrideinherited

◆ execute_for_feasibility() [2/2]

virtual bool ana::operation::execute_for_feasibility ( const exploded_edge & ,
feasibility_state & ,
region_model_context * ,
std::unique_ptr< rejected_constraint > @endverbatim *  ) const
inlinevirtualinherited

◆ execute_on_state()

void ana::gimple_stmt_op::execute_on_state ( operation_context & op_ctxt,
program_state dst_state ) const
inherited

◆ get_any_cgraph_edge()

cgraph_edge * ana::call_and_return_op::get_any_cgraph_edge ( operation_context & op_ctxt) const
private

◆ get_arg_for_parm()

tree ana::call_and_return_op::get_arg_for_parm ( tree callee_fndecl,
tree parm,
callsite_expr * out ) const
private

◆ get_gcall()

const gcall & ana::call_and_return_op::get_gcall ( ) const
inline

◆ get_kind()

enum kind ana::operation::get_kind ( ) const
inlineinherited

◆ get_parm_for_arg()

tree ana::call_and_return_op::get_parm_for_arg ( tree callee_fndecl,
tree arg,
callsite_expr * out ) const
private

◆ get_stmt()

◆ handle_on_stmt_for_state_machines()

void ana::operation::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 )
staticprotectedinherited

◆ make()

std::unique_ptr< operation > ana::call_and_return_op::make ( const gcall & call_stmt)
static

◆ map_expr_from_callee_to_caller()

tree ana::call_and_return_op::map_expr_from_callee_to_caller ( tree callee_fndecl,
tree callee_expr,
callsite_expr * out ) const

◆ map_expr_from_caller_to_callee()

tree ana::call_and_return_op::map_expr_from_caller_to_callee ( tree callee_fndecl,
tree caller_expr,
callsite_expr * out ) const

◆ maybe_get_known_function()

const known_function * ana::call_and_return_op::maybe_get_known_function ( const call_details & cd) const

References cd.

◆ maybe_get_stmt()

const gimple * ana::gimple_stmt_op::maybe_get_stmt ( ) const
inlinefinaloverridevirtualinherited

Reimplemented from ana::operation.

References final(), and m_stmt.

◆ print_as_edge_label()

void ana::gimple_stmt_op::print_as_edge_label ( pretty_printer * pp,
bool user_facing ) const
overridevirtualinherited

Implements ana::operation.

◆ replay_call_summaries()

void ana::call_and_return_op::replay_call_summaries ( operation_context & op_ctxt,
function & called_fn,
per_function_data & called_fn_data,
region_model_context * ctxt ) const
private

◆ replay_call_summary()

void ana::call_and_return_op::replay_call_summary ( operation_context & op_ctxt,
function & called_fn,
call_summary & summary,
region_model_context * ctxt ) const
private

◆ supports_bulk_merge_p()

bool ana::call_and_return_op::supports_bulk_merge_p ( ) const
inlinefinaloverridevirtual

Reimplemented from ana::gimple_stmt_op.

References final().

◆ update_state_for_bulk_merger()

virtual void ana::operation::update_state_for_bulk_merger ( const program_state & ,
program_state &  ) const
inlinevirtualinherited

Reimplemented in ana::phis_for_edge_op.

References gcc_unreachable.

◆ walk_load_store_addr_ops()

void ana::gimple_stmt_op::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
finaloverridevirtualinherited

Implements ana::operation.

Field Documentation

◆ m_kind

enum kind ana::operation::m_kind
privateinherited

Referenced by get_kind(), and operation().

◆ m_stmt

const gimple& ana::gimple_stmt_op::m_stmt
privateinherited

The documentation for this class was generated from the following file: