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

#include <svalue.h>

Inheritance diagram for ana::conjured_svalue:
Collaboration diagram for ana::conjured_svalue:

Data Structures

struct  key_t
 

Public Types

typedef unsigned id_t
 

Public Member Functions

 conjured_svalue (symbol::id_t id, tree type, const gimple *stmt, const region *id_reg, unsigned idx)
 
enum svalue_kind get_kind () const final override
 
const conjured_svaluedyn_cast_conjured_svalue () const final override
 
void dump_to_pp (pretty_printer *pp, bool simple) const final override
 
void accept (visitor *v) const final override
 
const gimpleget_stmt () const
 
const regionget_id_region () const
 
bool lhs_value_p () const
 
tree get_type () const
 
void print (const region_model &model, pretty_printer *pp) const
 
void dump (bool simple=true) const
 
label_text get_desc (bool simple=true) const
 
json::valueto_json () const
 
virtual const region_svaluedyn_cast_region_svalue () const
 
virtual const constant_svaluedyn_cast_constant_svalue () const
 
virtual const poisoned_svaluedyn_cast_poisoned_svalue () const
 
virtual const setjmp_svaluedyn_cast_setjmp_svalue () const
 
virtual const initial_svaluedyn_cast_initial_svalue () const
 
virtual const unaryop_svaluedyn_cast_unaryop_svalue () const
 
virtual const binop_svaluedyn_cast_binop_svalue () const
 
virtual const sub_svaluedyn_cast_sub_svalue () const
 
virtual const repeated_svaluedyn_cast_repeated_svalue () const
 
virtual const bits_within_svaluedyn_cast_bits_within_svalue () const
 
virtual const unmergeable_svaluedyn_cast_unmergeable_svalue () const
 
virtual const widening_svaluedyn_cast_widening_svalue () const
 
virtual const compound_svaluedyn_cast_compound_svalue () const
 
virtual const asm_output_svaluedyn_cast_asm_output_svalue () const
 
virtual const const_fn_result_svaluedyn_cast_const_fn_result_svalue () const
 
tree maybe_get_constant () const
 
const regionmaybe_get_region () const
 
const svaluemaybe_undo_cast () const
 
const svalueunwrap_any_unmergeable () const
 
const svaluecan_merge_p (const svalue *other, region_model_manager *mgr, model_merger *merger) const
 
bool live_p (const svalue_set *live_svalues, const region_model *model) const
 
virtual bool implicitly_live_p (const svalue_set *live_svalues, const region_model *model) const
 
bool involves_p (const svalue *other) const
 
const svalueextract_bit_range (tree type, const bit_range &subrange, region_model_manager *mgr) const
 
virtual const svaluemaybe_fold_bits_within (tree type, const bit_range &subrange, region_model_manager *mgr) const
 
virtual bool all_zeroes_p () const
 
virtual bool can_have_associated_state_p () const
 
const regionmaybe_get_deref_base_region () const
 
bool maybe_print_for_user (pretty_printer *pp, const region_model &model, const svalue *outer_sval=nullptr) const
 
const complexityget_complexity () const
 
id_t get_id () const
 

Static Public Member Functions

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

Private Attributes

const gimplem_stmt
 
const regionm_id_reg
 
unsigned m_idx
 
tree m_type
 
complexity m_complexity
 
id_t m_id
 

Detailed Description

A defined value arising from a statement, where we want to identify a
particular unknown value, rather than resorting to the unknown_value
singleton, so that the value can have sm-state.

Comparisons of variables that share the same conjured_svalue are known
to be equal, even if we don't know what the value is.

For example, this is used for the values of regions that may have been
touched when calling an unknown function.

The value captures a region as well as a stmt in order to avoid falsely
aliasing the various values that could arise in one statement.  For
example, after:
   unknown_fn (&a, &b);
we want values to clobber a and b with, but we don't want to use the
same value, or it would falsely implicitly assume that a == b.   

Member Typedef Documentation

◆ id_t

Constructor & Destructor Documentation

◆ conjured_svalue()

ana::conjured_svalue::conjured_svalue ( symbol::id_t id,
tree type,
const gimple * stmt,
const region * id_reg,
unsigned idx )
inline

References gcc_assert, m_stmt, and NULL.

Member Function Documentation

◆ accept()

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

Implements ana::svalue.

◆ all_zeroes_p()

virtual bool ana::svalue::all_zeroes_p ( ) const
virtualinherited

◆ can_have_associated_state_p()

virtual bool ana::svalue::can_have_associated_state_p ( ) const
inlinevirtualinherited

◆ can_merge_p()

const svalue * ana::svalue::can_merge_p ( const svalue * other,
region_model_manager * mgr,
model_merger * merger ) const
inherited

◆ cmp_ids()

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

◆ cmp_ptr()

static int ana::svalue::cmp_ptr ( const svalue * ,
const svalue *  )
staticinherited

◆ cmp_ptr_ptr()

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

◆ dump()

void ana::svalue::dump ( bool simple = true) const
inherited

◆ dump_to_pp()

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

Implements ana::svalue.

◆ dyn_cast_asm_output_svalue()

virtual const asm_output_svalue * ana::svalue::dyn_cast_asm_output_svalue ( ) const
inlinevirtualinherited

Reimplemented in ana::asm_output_svalue.

References NULL.

◆ dyn_cast_binop_svalue()

virtual const binop_svalue * ana::svalue::dyn_cast_binop_svalue ( ) const
inlinevirtualinherited

Reimplemented in ana::binop_svalue.

References NULL.

◆ dyn_cast_bits_within_svalue()

virtual const bits_within_svalue * ana::svalue::dyn_cast_bits_within_svalue ( ) const
inlinevirtualinherited

Reimplemented in ana::bits_within_svalue.

References NULL.

◆ dyn_cast_compound_svalue()

virtual const compound_svalue * ana::svalue::dyn_cast_compound_svalue ( ) const
inlinevirtualinherited

Reimplemented in ana::compound_svalue.

References NULL.

Referenced by contains_unknown_p().

◆ dyn_cast_conjured_svalue()

const conjured_svalue * ana::conjured_svalue::dyn_cast_conjured_svalue ( ) const
inlinefinaloverridevirtual

Reimplemented from ana::svalue.

◆ dyn_cast_const_fn_result_svalue()

virtual const const_fn_result_svalue * ana::svalue::dyn_cast_const_fn_result_svalue ( ) const
inlinevirtualinherited

Reimplemented in ana::const_fn_result_svalue.

References NULL.

◆ dyn_cast_constant_svalue()

virtual const constant_svalue * ana::svalue::dyn_cast_constant_svalue ( ) const
inlinevirtualinherited

Reimplemented in ana::constant_svalue.

References NULL.

◆ dyn_cast_initial_svalue()

virtual const initial_svalue * ana::svalue::dyn_cast_initial_svalue ( ) const
inlinevirtualinherited

Reimplemented in ana::initial_svalue.

References NULL.

◆ dyn_cast_poisoned_svalue()

virtual const poisoned_svalue * ana::svalue::dyn_cast_poisoned_svalue ( ) const
inlinevirtualinherited

Reimplemented in ana::poisoned_svalue.

References NULL.

◆ dyn_cast_region_svalue()

virtual const region_svalue * ana::svalue::dyn_cast_region_svalue ( ) const
inlinevirtualinherited

Reimplemented in ana::region_svalue.

References NULL.

◆ dyn_cast_repeated_svalue()

virtual const repeated_svalue * ana::svalue::dyn_cast_repeated_svalue ( ) const
inlinevirtualinherited

Reimplemented in ana::repeated_svalue.

References NULL.

◆ dyn_cast_setjmp_svalue()

virtual const setjmp_svalue * ana::svalue::dyn_cast_setjmp_svalue ( ) const
inlinevirtualinherited

Reimplemented in ana::setjmp_svalue.

References NULL.

◆ dyn_cast_sub_svalue()

virtual const sub_svalue * ana::svalue::dyn_cast_sub_svalue ( ) const
inlinevirtualinherited

Reimplemented in ana::sub_svalue.

References NULL.

◆ dyn_cast_unaryop_svalue()

virtual const unaryop_svalue * ana::svalue::dyn_cast_unaryop_svalue ( ) const
inlinevirtualinherited

Reimplemented in ana::unaryop_svalue.

References NULL.

◆ dyn_cast_unmergeable_svalue()

virtual const unmergeable_svalue * ana::svalue::dyn_cast_unmergeable_svalue ( ) const
inlinevirtualinherited

Reimplemented in ana::unmergeable_svalue.

References NULL.

◆ dyn_cast_widening_svalue()

virtual const widening_svalue * ana::svalue::dyn_cast_widening_svalue ( ) const
inlinevirtualinherited

Reimplemented in ana::widening_svalue.

References NULL.

◆ extract_bit_range()

const svalue * ana::svalue::extract_bit_range ( tree type,
const bit_range & subrange,
region_model_manager * mgr ) const
inherited

◆ get_complexity()

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

◆ get_desc()

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

◆ get_id()

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

References ana::symbol::m_id.

◆ get_id_region()

const region * ana::conjured_svalue::get_id_region ( ) const
inline

◆ get_kind()

enum svalue_kind ana::conjured_svalue::get_kind ( ) const
inlinefinaloverridevirtual

Implements ana::svalue.

References ana::SK_CONJURED.

◆ get_stmt()

const gimple * ana::conjured_svalue::get_stmt ( ) const
inline

References m_stmt.

◆ get_type()

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

References ana::svalue::m_type.

◆ implicitly_live_p()

◆ involves_p()

bool ana::svalue::involves_p ( const svalue * other) const
inherited

◆ lhs_value_p()

bool ana::conjured_svalue::lhs_value_p ( ) const

◆ live_p()

bool ana::svalue::live_p ( const svalue_set * live_svalues,
const region_model * model ) const
inherited

◆ maybe_fold_bits_within()

virtual const svalue * ana::svalue::maybe_fold_bits_within ( tree type,
const bit_range & subrange,
region_model_manager * mgr ) const
virtualinherited

◆ maybe_get_constant()

tree ana::svalue::maybe_get_constant ( ) const
inherited

◆ maybe_get_deref_base_region()

const region * ana::svalue::maybe_get_deref_base_region ( ) const
inherited

◆ maybe_get_region()

const region * ana::svalue::maybe_get_region ( ) const
inherited

◆ maybe_print_for_user()

bool ana::svalue::maybe_print_for_user ( pretty_printer * pp,
const region_model & model,
const svalue * outer_sval = nullptr ) const
inherited

◆ maybe_undo_cast()

const svalue * ana::svalue::maybe_undo_cast ( ) const
inherited

◆ print()

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

◆ to_json()

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

◆ unwrap_any_unmergeable()

const svalue * ana::svalue::unwrap_any_unmergeable ( ) const
inherited

Field Documentation

◆ m_complexity

complexity ana::symbol::m_complexity
privateinherited

◆ m_id

id_t ana::symbol::m_id
privateinherited

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

◆ m_id_reg

const region* ana::conjured_svalue::m_id_reg
private

◆ m_idx

unsigned ana::conjured_svalue::m_idx
private

◆ m_stmt

const gimple* ana::conjured_svalue::m_stmt
private

◆ m_type

tree ana::svalue::m_type
privateinherited

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


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