GCC Middle and Back End API Reference
ipcp_lattice< valtype > Struct Template Reference

#include <ipa-cp.h>

Inheritance diagram for ipcp_lattice< valtype >:

Public Member Functions

bool is_single_const ()
 
bool set_to_bottom ()
 
bool set_contains_variable ()
 
bool add_value (valtype newval, cgraph_edge *cs, ipcp_value< valtype > *src_val=NULL, int src_idx=0, HOST_WIDE_INT offset=-1, ipcp_value< valtype > **val_p=NULL, unsigned same_lat_gen_level=0)
 
void print (FILE *f, bool dump_sources, bool dump_benefits)
 

Data Fields

ipcp_value< valtype > * values = nullptr
 
int values_count = 0
 
bool contains_variable = false
 
bool bottom = false
 

Detailed Description

template<typename valtype>
struct ipcp_lattice< valtype >
Lattice describing potential values of a formal parameter of a function, or
a part of an aggregate.  TOP is represented by a lattice with zero values
and with contains_variable and bottom flags cleared.  BOTTOM is represented
by a lattice with the bottom flag set.  In that case, values and
contains_variable flag should be disregarded.   

Member Function Documentation

◆ add_value()

template<typename valtype >
bool ipcp_lattice< valtype >::add_value ( valtype newval,
cgraph_edge * cs,
ipcp_value< valtype > * src_val = NULL,
int src_idx = 0,
HOST_WIDE_INT offset = -1,
ipcp_value< valtype > ** val_p = NULL,
unsigned same_lat_gen_level = 0 )
Try to add NEWVAL to LAT, potentially creating a new ipcp_value for it.  CS,
SRC_VAL SRC_INDEX and OFFSET are meant for add_source and have the same
meaning.  OFFSET -1 means the source is scalar and not a part of an
aggregate.  If non-NULL, VAL_P records address of existing or newly added
ipcp_value.

If the value is generated for a self-recursive call as a result of an
arithmetic pass-through jump-function acting on a value in the same lattice,
SAME_LAT_GEN_LEVEL must be the length of such chain, otherwise it must be
zero.  If it is non-zero, PARAM_IPA_CP_VALUE_LIST_SIZE limit is ignored.   

References ipcp_value< valtype >::add_source(), allocate_and_init_ipcp_value(), cgraph_edge::callee, ipcp_value_source< valtype >::cs, symtab_node::decl, ggc_alloc(), ipa_edge_within_scc(), ipcp_sources_pool, ipcp_value_source< valtype >::next, ipcp_value< valtype >::next, NULL, offset, opt_for_fn, ipcp_value< valtype >::self_recursion_generated_level, ipcp_value< valtype >::sources, ipcp_value_source< valtype >::val, ipcp_value< valtype >::value, and values_equal_for_ipcp_p().

◆ is_single_const()

template<typename valtype >
bool ipcp_lattice< valtype >::is_single_const ( )
inline
Return whether LAT is a lattice with a single constant and without an
undefined value.   

Referenced by gather_context_independent_values().

◆ print()

◆ set_contains_variable()

template<typename valtype >
bool ipcp_lattice< valtype >::set_contains_variable ( )
inline
Mark lattice as containing an unknown value and return true if it previously
was not marked as such.   

References ggc_alloc().

◆ set_to_bottom()

template<typename valtype >
bool ipcp_lattice< valtype >::set_to_bottom ( )
inline
Set lattice LAT to bottom and return true if it previously was not set as
such.   

References ggc_alloc().

Field Documentation

◆ bottom

◆ contains_variable

template<typename valtype >
bool ipcp_lattice< valtype >::contains_variable = false

◆ values

◆ values_count

template<typename valtype >
int ipcp_lattice< valtype >::values_count = 0

The documentation for this struct was generated from the following files: