GCC Middle and Back End API Reference
ana::svalue Class Referenceabstract

#include <svalue.h>

Inheritance diagram for ana::svalue:
Collaboration diagram for ana::svalue:

Public Types

typedef unsigned id_t
 

Public Member Functions

virtual ~svalue ()
 
tree get_type () const
 
virtual enum svalue_kind get_kind () const =0
 
void print (const region_model &model, pretty_printer *pp) const
 
virtual void dump_to_pp (pretty_printer *pp, bool simple) const =0
 
void dump () const
 
void dump (bool simple) const
 
label_text get_desc (bool simple=true) const
 
json::valueto_json () const
 
std::unique_ptr< text_art::widget > make_dump_widget (const dump_widget_info &dwi, const char *prefix=nullptr) 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 conjured_svaluedyn_cast_conjured_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
 
virtual void accept (visitor *v) const =0
 
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)
 

Protected Member Functions

 svalue (complexity c, symbol::id_t id, tree type)
 
void print_svalue_node_label (pretty_printer *pp) const
 

Private Member Functions

virtual void print_dump_widget_label (pretty_printer *pp) const =0
 
virtual void add_dump_widget_children (text_art::tree_widget &, const dump_widget_info &dwi) const =0
 

Private Attributes

tree m_type
 
complexity m_complexity
 
id_t m_id
 

Detailed Description

svalue and its subclasses.

The class hierarchy looks like this (using indentation to show
inheritance, and with svalue_kinds shown for the concrete subclasses):

svalue
  region_svalue (SK_REGION): a pointer to a region
  constant_svalue (SK_CONSTANT): a constant
  unknown_svalue (SK_UNKNOWN): an unknowable value
  poisoned_svalue (SK_POISONED): a unusable value (undefined)
  setjmp_svalue (SK_SETJMP): a setjmp/longjmp buffer
  initial_svalue (SK_INITIAL): the initial value of a region
  unaryop_svalue (SK_UNARYOP): unary operation on another svalue
  binop_svalue (SK_BINOP): binary operation on two svalues
  sub_svalue (SK_SUB): the result of accessing a subregion
  repeated_svalue (SK_REPEATED): repeating an svalue to fill a larger region
  bits_within_svalue (SK_BITS_WITHIN): a range of bits/bytes within a larger
    svalue
  unmergeable_svalue (SK_UNMERGEABLE): a value that is so interesting
    from a control-flow perspective that it can inhibit state-merging
  placeholder_svalue (SK_PLACEHOLDER): for use in selftests.
  widening_svalue (SK_WIDENING): a merger of two svalues (possibly
    in an iteration).
  compound_svalue (SK_COMPOUND): a mapping of bit-ranges to svalues
  conjured_svalue (SK_CONJURED): a value arising from a stmt
  asm_output_svalue (SK_ASM_OUTPUT): an output from a deterministic
    asm stmt.
  const_fn_result_svalue (SK_CONST_FN_RESULT): the return value from
    a function with __attribute((const)) for given inputs.   
An abstract base class representing a value held by a region of memory.   

Member Typedef Documentation

◆ id_t

typedef unsigned ana::symbol::id_t
inherited

Constructor & Destructor Documentation

◆ ~svalue()

virtual ana::svalue::~svalue ( )
inlinevirtual

◆ svalue()

ana::svalue::svalue ( complexity c,
symbol::id_t id,
tree type )
inlineprotected

Member Function Documentation

◆ accept()

◆ add_dump_widget_children()

◆ all_zeroes_p()

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

◆ can_have_associated_state_p()

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

◆ can_merge_p()

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

◆ 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 *  )
static

◆ cmp_ptr_ptr()

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

◆ dump() [1/2]

void ana::svalue::dump ( ) const

◆ dump() [2/2]

void ana::svalue::dump ( bool simple) const

◆ dump_to_pp()

◆ dyn_cast_asm_output_svalue()

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

Reimplemented in ana::asm_output_svalue.

References NULL.

◆ dyn_cast_binop_svalue()

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

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
inlinevirtual

Reimplemented in ana::bits_within_svalue.

References NULL.

◆ dyn_cast_compound_svalue()

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

Reimplemented in ana::compound_svalue.

References NULL.

Referenced by contains_unknown_p().

◆ dyn_cast_conjured_svalue()

virtual const conjured_svalue * ana::svalue::dyn_cast_conjured_svalue ( ) const
inlinevirtual

Reimplemented in ana::conjured_svalue.

References NULL.

◆ dyn_cast_const_fn_result_svalue()

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

Reimplemented in ana::const_fn_result_svalue.

References NULL.

◆ dyn_cast_constant_svalue()

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

Reimplemented in ana::constant_svalue.

References NULL.

◆ dyn_cast_initial_svalue()

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

Reimplemented in ana::initial_svalue.

References NULL.

◆ dyn_cast_poisoned_svalue()

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

Reimplemented in ana::poisoned_svalue.

References NULL.

◆ dyn_cast_region_svalue()

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

Reimplemented in ana::region_svalue.

References NULL.

◆ dyn_cast_repeated_svalue()

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

Reimplemented in ana::repeated_svalue.

References NULL.

◆ dyn_cast_setjmp_svalue()

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

Reimplemented in ana::setjmp_svalue.

References NULL.

◆ dyn_cast_sub_svalue()

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

Reimplemented in ana::sub_svalue.

References NULL.

◆ dyn_cast_unaryop_svalue()

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

Reimplemented in ana::unaryop_svalue.

References NULL.

◆ dyn_cast_unmergeable_svalue()

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

Reimplemented in ana::unmergeable_svalue.

References NULL.

◆ dyn_cast_widening_svalue()

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

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

◆ get_complexity()

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

◆ get_desc()

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

◆ get_id()

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

References ana::symbol::m_id.

◆ get_kind()

◆ get_type()

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

References m_type.

◆ implicitly_live_p()

virtual bool ana::svalue::implicitly_live_p ( const svalue_set * live_svalues,
const region_model * model ) const
virtual

◆ involves_p()

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

◆ live_p()

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

◆ make_dump_widget()

std::unique_ptr< text_art::widget > ana::svalue::make_dump_widget ( const dump_widget_info & dwi,
const char * prefix = nullptr ) const

◆ maybe_fold_bits_within()

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

◆ maybe_get_constant()

tree ana::svalue::maybe_get_constant ( ) const

◆ maybe_get_deref_base_region()

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

◆ maybe_get_region()

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

◆ maybe_print_for_user()

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

◆ maybe_undo_cast()

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

◆ print()

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

◆ print_dump_widget_label()

◆ print_svalue_node_label()

void ana::svalue::print_svalue_node_label ( pretty_printer * pp) const
protected

◆ to_json()

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

◆ unwrap_any_unmergeable()

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

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_type

tree ana::svalue::m_type
private

Referenced by get_type().


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