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

#include <region.h>

Inheritance diagram for ana::frame_region:
Collaboration diagram for ana::frame_region:

Data Structures

struct  key_t
 

Public Types

typedef unsigned id_t
 

Public Member Functions

 frame_region (symbol::id_t id, const region *parent, const frame_region *calling_frame, const function &fun, int index)
 
 ~frame_region ()
 
enum region_kind get_kind () const final override
 
const frame_regiondyn_cast_frame_region () const final override
 
void accept (visitor *v) const final override
 
void dump_to_pp (pretty_printer *pp, bool simple) const final override
 
const frame_regionget_calling_frame () const
 
const functionget_function () const
 
tree get_fndecl () const
 
int get_index () const
 
int get_stack_depth () const
 
const decl_regionget_region_for_local (region_model_manager *mgr, tree expr, const region_model_context *ctxt) const
 
unsigned get_num_locals () const
 
void dump_untracked_regions () const
 
virtual const function_regiondyn_cast_function_region () const
 
virtual const symbolic_regiondyn_cast_symbolic_region () const
 
virtual const decl_regiondyn_cast_decl_region () const
 
virtual const field_regiondyn_cast_field_region () const
 
virtual const element_regiondyn_cast_element_region () const
 
virtual const offset_regiondyn_cast_offset_region () const
 
virtual const sized_regiondyn_cast_sized_region () const
 
virtual const cast_regiondyn_cast_cast_region () const
 
virtual const string_regiondyn_cast_string_region () const
 
virtual const bit_range_regiondyn_cast_bit_range_region () const
 
virtual const var_arg_regiondyn_cast_var_arg_region () const
 
const regionget_parent_region () const
 
const regionget_base_region () const
 
bool base_region_p () const
 
bool descendent_of_p (const region *elder) const
 
const frame_regionmaybe_get_frame_region () const
 
enum memory_space get_memory_space () const
 
bool can_have_initial_svalue_p () const
 
const svalueget_initial_value_at_main (region_model_manager *mgr) const
 
tree maybe_get_decl () const
 
tree get_type () const
 
void print (const region_model &model, pretty_printer *pp) const
 
label_text get_desc (bool simple=true) const
 
void dump (bool simple) const
 
json::valueto_json () const
 
bool maybe_print_for_user (pretty_printer *pp, const region_model &model) const
 
bool non_null_p () const
 
bool involves_p (const svalue *sval) const
 
region_offset get_offset (region_model_manager *mgr) const
 
region_offset get_next_offset (region_model_manager *mgr) const
 
virtual bool get_byte_size (byte_size_t *out) const
 
virtual bool get_bit_size (bit_size_t *out) const
 
virtual const svalueget_byte_size_sval (region_model_manager *mgr) const
 
virtual const svalueget_bit_size_sval (region_model_manager *mgr) const
 
virtual bool get_relative_concrete_offset (bit_offset_t *out) const
 
virtual const svalueget_relative_symbolic_offset (region_model_manager *mgr) const
 
bool get_relative_concrete_byte_range (byte_range *out) const
 
void get_subregions_for_binding (region_model_manager *mgr, bit_offset_t start_bit_offset, bit_size_t size_in_bits, tree type, auto_vec< const region * > *out) const
 
bool symbolic_for_unknown_ptr_p () const
 
bool symbolic_p () const
 
virtual bool tracked_p () const
 
bool is_named_decl_p (const char *decl_name) const
 
bool empty_p () const
 
const complexityget_complexity () const
 
id_t get_id () const
 

Static Public Member Functions

static int cmp_ptr_ptr (const void *, const void *)
 
static int cmp_ids (const symbol *s1, const symbol *s2)
 

Private Types

typedef hash_map< tree, decl_region * > map_t
 

Private Member Functions

region_offset calc_offset (region_model_manager *mgr) const
 
const svaluecalc_initial_value_at_main (region_model_manager *mgr) const
 

Private Attributes

const frame_regionm_calling_frame
 
const functionm_fun
 
int m_index
 
map_t m_locals
 
const regionm_parent
 
tree m_type
 
region_offsetm_cached_offset
 
const svaluem_cached_init_sval_at_main
 
complexity m_complexity
 
id_t m_id
 

Detailed Description

Concrete space_region subclass, representing a function frame on the stack,
to contain the locals.
The parent is the stack region; there's also a hierarchy of call-stack
prefixes expressed via m_calling_frame.
For example, given "oldest" calling "middle" called "newest" we would have
- a stack depth of 3
- frame (A) for "oldest" with index 0 for depth 1, calling_frame == NULL
- frame (B) for "middle" with index 1 for depth 2, calling_frame == (A)
- frame (C) for "newest" with index 2 for depth 3, calling_frame == (B)
where the parent region for each of the frames is the "stack" region.
The index is the count of frames earlier than this in the stack.   

Member Typedef Documentation

◆ id_t

◆ map_t

Constructor & Destructor Documentation

◆ frame_region()

ana::frame_region::frame_region ( symbol::id_t id,
const region * parent,
const frame_region * calling_frame,
const function & fun,
int index )
inline

◆ ~frame_region()

ana::frame_region::~frame_region ( )

Member Function Documentation

◆ accept()

void ana::frame_region::accept ( visitor * v) const
finaloverridevirtual

Reimplemented from ana::region.

◆ base_region_p()

bool ana::region::base_region_p ( ) const
inherited

◆ calc_initial_value_at_main()

const svalue * ana::region::calc_initial_value_at_main ( region_model_manager * mgr) const
privateinherited

◆ calc_offset()

region_offset ana::region::calc_offset ( region_model_manager * mgr) const
privateinherited

◆ can_have_initial_svalue_p()

bool ana::region::can_have_initial_svalue_p ( ) const
inherited

◆ cmp_ids()

static int ana::symbol::cmp_ids ( const symbol * s1,
const symbol * s2 )
staticinherited

◆ cmp_ptr_ptr()

static int ana::region::cmp_ptr_ptr ( const void * ,
const void *  )
staticinherited

◆ descendent_of_p()

bool ana::region::descendent_of_p ( const region * elder) const
inherited

◆ dump()

void ana::region::dump ( bool simple) const
inherited

◆ dump_to_pp()

void ana::frame_region::dump_to_pp ( pretty_printer * pp,
bool simple ) const
finaloverridevirtual

Implements ana::region.

◆ dump_untracked_regions()

void ana::frame_region::dump_untracked_regions ( ) const

◆ dyn_cast_bit_range_region()

virtual const bit_range_region * ana::region::dyn_cast_bit_range_region ( ) const
inlinevirtualinherited

Reimplemented in ana::bit_range_region.

References NULL.

◆ dyn_cast_cast_region()

virtual const cast_region * ana::region::dyn_cast_cast_region ( ) const
inlinevirtualinherited

Reimplemented in ana::cast_region.

References NULL.

◆ dyn_cast_decl_region()

virtual const decl_region * ana::region::dyn_cast_decl_region ( ) const
inlinevirtualinherited

Reimplemented in ana::decl_region.

References NULL.

◆ dyn_cast_element_region()

virtual const element_region * ana::region::dyn_cast_element_region ( ) const
inlinevirtualinherited

Reimplemented in ana::element_region.

References NULL.

◆ dyn_cast_field_region()

virtual const field_region * ana::region::dyn_cast_field_region ( ) const
inlinevirtualinherited

Reimplemented in ana::field_region.

References NULL.

◆ dyn_cast_frame_region()

const frame_region * ana::frame_region::dyn_cast_frame_region ( ) const
inlinefinaloverridevirtual

Reimplemented from ana::region.

◆ dyn_cast_function_region()

virtual const function_region * ana::region::dyn_cast_function_region ( ) const
inlinevirtualinherited

Reimplemented in ana::function_region.

References NULL.

◆ dyn_cast_offset_region()

virtual const offset_region * ana::region::dyn_cast_offset_region ( ) const
inlinevirtualinherited

Reimplemented in ana::offset_region.

References NULL.

◆ dyn_cast_sized_region()

virtual const sized_region * ana::region::dyn_cast_sized_region ( ) const
inlinevirtualinherited

Reimplemented in ana::sized_region.

References NULL.

◆ dyn_cast_string_region()

virtual const string_region * ana::region::dyn_cast_string_region ( ) const
inlinevirtualinherited

Reimplemented in ana::string_region.

References NULL.

◆ dyn_cast_symbolic_region()

virtual const symbolic_region * ana::region::dyn_cast_symbolic_region ( ) const
inlinevirtualinherited

Reimplemented in ana::symbolic_region.

References NULL.

◆ dyn_cast_var_arg_region()

virtual const var_arg_region * ana::region::dyn_cast_var_arg_region ( ) const
inlinevirtualinherited

Reimplemented in ana::var_arg_region.

References NULL.

◆ empty_p()

bool ana::region::empty_p ( ) const
inherited

◆ get_base_region()

const region * ana::region::get_base_region ( ) const
inherited

◆ get_bit_size()

virtual bool ana::region::get_bit_size ( bit_size_t * out) const
virtualinherited

Reimplemented in ana::sized_region, and ana::bit_range_region.

◆ get_bit_size_sval()

virtual const svalue * ana::region::get_bit_size_sval ( region_model_manager * mgr) const
virtualinherited

Reimplemented in ana::sized_region, and ana::bit_range_region.

◆ get_byte_size()

virtual bool ana::region::get_byte_size ( byte_size_t * out) const
virtualinherited

Reimplemented in ana::sized_region, and ana::bit_range_region.

◆ get_byte_size_sval()

virtual const svalue * ana::region::get_byte_size_sval ( region_model_manager * mgr) const
virtualinherited

Reimplemented in ana::sized_region, and ana::bit_range_region.

◆ get_calling_frame()

const frame_region * ana::frame_region::get_calling_frame ( ) const
inline

References m_calling_frame.

◆ get_complexity()

const complexity & ana::symbol::get_complexity ( ) const
inlineinherited

◆ get_desc()

label_text ana::region::get_desc ( bool simple = true) const
inherited

◆ get_fndecl()

tree ana::frame_region::get_fndecl ( ) const
inline

References function::decl, and get_function().

◆ get_function()

const function & ana::frame_region::get_function ( ) const
inline

References m_fun.

Referenced by get_fndecl().

◆ get_id()

id_t ana::symbol::get_id ( ) const
inlineinherited

References ana::symbol::m_id.

◆ get_index()

int ana::frame_region::get_index ( ) const
inline

References m_index.

◆ get_initial_value_at_main()

const svalue * ana::region::get_initial_value_at_main ( region_model_manager * mgr) const
inherited

◆ get_kind()

enum region_kind ana::frame_region::get_kind ( ) const
inlinefinaloverridevirtual

Implements ana::region.

References ana::RK_FRAME.

◆ get_memory_space()

enum memory_space ana::region::get_memory_space ( ) const
inherited

◆ get_next_offset()

region_offset ana::region::get_next_offset ( region_model_manager * mgr) const
inherited

◆ get_num_locals()

unsigned ana::frame_region::get_num_locals ( ) const
inline

◆ get_offset()

region_offset ana::region::get_offset ( region_model_manager * mgr) const
inherited

◆ get_parent_region()

const region * ana::region::get_parent_region ( ) const
inlineinherited

References ana::region::m_parent.

◆ get_region_for_local()

const decl_region * ana::frame_region::get_region_for_local ( region_model_manager * mgr,
tree expr,
const region_model_context * ctxt ) const

◆ get_relative_concrete_byte_range()

bool ana::region::get_relative_concrete_byte_range ( byte_range * out) const
inherited

◆ get_relative_concrete_offset()

virtual bool ana::region::get_relative_concrete_offset ( bit_offset_t * out) const
virtualinherited

◆ get_relative_symbolic_offset()

virtual const svalue * ana::region::get_relative_symbolic_offset ( region_model_manager * mgr) const
virtualinherited

◆ get_stack_depth()

int ana::frame_region::get_stack_depth ( ) const
inline

References m_index.

◆ get_subregions_for_binding()

void ana::region::get_subregions_for_binding ( region_model_manager * mgr,
bit_offset_t start_bit_offset,
bit_size_t size_in_bits,
tree type,
auto_vec< const region * > * out ) const
inherited

◆ get_type()

tree ana::region::get_type ( ) const
inlineinherited

References ana::region::m_type.

◆ involves_p()

bool ana::region::involves_p ( const svalue * sval) const
inherited

◆ is_named_decl_p()

bool ana::region::is_named_decl_p ( const char * decl_name) const
inherited

◆ maybe_get_decl()

tree ana::region::maybe_get_decl ( ) const
inherited

◆ maybe_get_frame_region()

const frame_region * ana::region::maybe_get_frame_region ( ) const
inherited

◆ maybe_print_for_user()

bool ana::region::maybe_print_for_user ( pretty_printer * pp,
const region_model & model ) const
inherited

◆ non_null_p()

bool ana::region::non_null_p ( ) const
inherited

◆ print()

void ana::region::print ( const region_model & model,
pretty_printer * pp ) const
inherited

◆ symbolic_for_unknown_ptr_p()

bool ana::region::symbolic_for_unknown_ptr_p ( ) const
inherited

◆ symbolic_p()

bool ana::region::symbolic_p ( ) const
inherited

◆ to_json()

json::value * ana::region::to_json ( ) const
inherited

◆ tracked_p()

virtual bool ana::region::tracked_p ( ) const
inlinevirtualinherited

Reimplemented in ana::decl_region, and ana::string_region.

Field Documentation

◆ m_cached_init_sval_at_main

const svalue* ana::region::m_cached_init_sval_at_main
mutableprivateinherited

◆ m_cached_offset

region_offset* ana::region::m_cached_offset
mutableprivateinherited

◆ m_calling_frame

const frame_region* ana::frame_region::m_calling_frame
private

Referenced by get_calling_frame().

◆ m_complexity

complexity ana::symbol::m_complexity
privateinherited

◆ m_fun

const function& ana::frame_region::m_fun
private

Referenced by get_function().

◆ m_id

id_t ana::symbol::m_id
privateinherited

Referenced by ana::symbol::get_id().

◆ m_index

int ana::frame_region::m_index
private

Referenced by get_index(), and get_stack_depth().

◆ m_locals

map_t ana::frame_region::m_locals
private

Referenced by get_num_locals().

◆ m_parent

const region* ana::region::m_parent
privateinherited

◆ m_type

tree ana::region::m_type
privateinherited

Referenced by ana::region::get_type().


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