GCC Middle and Back End API Reference
|
#include <ipa-cp.h>
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 |
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.
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, ipa_edge_within_scc(), ipcp_sources_pool, ipcp_value< valtype >::next, ipcp_value_source< 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().
Referenced by merge_aggregate_lattices(), propagate_aggregate_lattice(), propagate_context_across_jump_function(), propagate_scalar_across_jump_function(), propagate_vals_across_ancestor(), and propagate_vals_across_arith_jfunc().
|
inline |
Return whether LAT is a lattice with a single constant and without an undefined value.
Referenced by adjust_references_in_caller(), cgraph_edge_brings_value_p(), cgraph_edge_brings_value_p(), decide_whether_version_node(), gather_context_independent_values(), ipa_agg_value_from_jfunc(), ipa_context_from_jfunc(), ipa_value_from_jfunc(), and propagate_aggregate_lattice().
void ipcp_lattice< valtype >::print | ( | FILE * | f, |
bool | dump_sources, | ||
bool | dump_benefits ) |
Print a lattice LAT to F.
References cgraph_edge::caller, ipcp_value_source< valtype >::cs, ipcp_value_base::local_size_cost, ipcp_value_base::local_time_benefit, ipcp_value< valtype >::next, ipcp_value_source< valtype >::next, symtab_node::order, print_ipcp_constant_value(), ipcp_value_base::prop_size_cost, ipcp_value_base::prop_time_benefit, ipcp_value< valtype >::scc_no, ipcp_value< valtype >::self_recursion_generated_level, ipcp_value< valtype >::self_recursion_generated_p(), ipcp_value< valtype >::sources, cgraph_edge::sreal_frequency(), sreal::to_double(), and ipcp_value< valtype >::value.
Referenced by print_all_lattices().
|
inline |
Mark lattice as containing an unknown value and return true if it previously was not marked as such.
Referenced by merge_aggregate_lattices(), propagate_aggregate_lattice(), propagate_context_across_jump_function(), propagate_scalar_across_jump_function(), propagate_vals_across_ancestor(), propagate_vals_across_arith_jfunc(), set_all_contains_variable(), and set_chain_of_aglats_contains_variable().
|
inline |
Set lattice LAT to bottom and return true if it previously was not set as such.
Referenced by initialize_node_lattices().
bool ipcp_lattice< valtype >::bottom = false |
bool ipcp_lattice< valtype >::contains_variable = false |
ipcp_value<valtype>* ipcp_lattice< valtype >::values = nullptr |
Referenced by add_all_node_vals_to_toposort(), adjust_references_in_caller(), cgraph_edge_brings_value_p(), cgraph_edge_brings_value_p(), decide_whether_version_node(), estimate_local_effects(), gather_context_independent_values(), ipa_agg_value_from_jfunc(), ipa_context_from_jfunc(), ipa_value_from_jfunc(), propagate_context_across_jump_function(), propagate_vals_across_ancestor(), and propagate_vals_across_arith_jfunc().
int ipcp_lattice< valtype >::values_count = 0 |