GCC Middle and Back End API Reference
tree-chrec.h File Reference

Go to the source code of this file.

Functions

static bool automatically_generated_chrec_p ()
static bool tree_is_chrec ()
tree chrec_fold_plus (tree, tree, tree)
tree chrec_fold_minus (tree, tree, tree)
tree chrec_fold_multiply (tree, tree, tree)
tree chrec_convert (tree, tree, gimple)
tree chrec_convert_rhs (tree, tree, gimple)
tree chrec_convert_aggressive (tree, tree)
tree chrec_apply (unsigned, tree, tree)
tree chrec_apply_map (tree, vec< tree >)
tree chrec_replace_initial_condition (tree, tree)
tree initial_condition (tree)
tree initial_condition_in_loop_num (tree, unsigned)
tree evolution_part_in_loop_num (tree, unsigned)
tree hide_evolution_in_other_loops_than_loop (tree, unsigned)
tree reset_evolution_in_loop (unsigned, tree, tree)
tree chrec_merge (tree, tree)
void for_each_scev_op (tree *, bool(*)(tree *, void *), void *)
bool eq_evolutions_p (const_tree, const_tree)
bool is_multivariate_chrec (const_tree)
bool chrec_contains_symbols (const_tree)
bool chrec_contains_symbols_defined_in_loop (const_tree, unsigned)
bool chrec_contains_undetermined (const_tree)
bool tree_contains_chrecs (const_tree, int *)
bool evolution_function_is_affine_multivariate_p (const_tree, int)
bool evolution_function_is_univariate_p (const_tree)
unsigned nb_vars_in_chrec (tree)
bool evolution_function_is_invariant_p (tree, int)
bool scev_is_linear_expression (tree)
bool evolution_function_right_is_integer_cst (const_tree)
static bool chrec_zerop ()
static bool no_evolution_in_loop_p ()
static tree build_polynomial_chrec (unsigned loop_num, tree left, tree right)
static bool evolution_function_is_constant_p ()
static bool evolution_function_is_affine_in_loop ()
static bool evolution_function_is_affine_p ()
static bool tree_does_not_contain_chrecs ()
static tree chrec_type ()
static tree chrec_fold_op ()

Variables

tree chrec_not_analyzed_yet
tree chrec_dont_know
tree chrec_known

Function Documentation

tree chrec_apply ( unsigned  var,
tree  chrec,
tree  x 
)
Operations.   
Evaluates "CHREC (X)" when the varying variable is VAR.
   Example:  Given the following parameters,

   var = 1
   chrec = {3, +, 4}_1
   x = 10

   The result is given by the Newton's interpolating formula:
   3 * \binom{10}{0} + 4 * \binom{10}{1}.

References automatically_generated_chrec_p(), build_polynomial_chrec(), build_real_from_int_cst(), chrec_apply(), chrec_contains_symbols_defined_in_loop(), chrec_convert(), chrec_convert_rhs(), chrec_dont_know, chrec_evaluate(), chrec_fold_multiply(), chrec_fold_plus(), chrec_type(), dump_file, dump_flags, evolution_function_is_affine_p(), print_generic_expr(), and tree_int_cst_sgn().

Referenced by chrec_apply(), chrec_apply_map(), chrec_is_positive(), and compute_overall_effect_of_inner_loop().

tree chrec_apply_map ( tree  ,
vec< tree  
)
bool chrec_contains_symbols ( const_tree  )
bool chrec_contains_undetermined ( const_tree  )
tree chrec_convert ( tree  ,
tree  ,
gimple   
)
tree chrec_convert_aggressive ( tree  ,
tree   
)
tree chrec_convert_rhs ( tree  ,
tree  ,
gimple   
)
static tree chrec_fold_op ( )
inlinestatic
tree chrec_merge ( tree  chrec1,
tree  chrec2 
)
Merges two evolution functions that were found by following two
   alternate paths of a conditional expression.   

References chrec_dont_know, chrec_known, chrec_not_analyzed_yet, and eq_evolutions_p().

Referenced by analyze_evolution_in_loop(), analyze_initial_condition(), follow_ssa_edge_in_condition_phi(), and interpret_condition_phi().

tree chrec_replace_initial_condition ( tree  chrec,
tree  init_cond 
)
static bool chrec_zerop ( )
inlinestatic
Determines whether CHREC is equal to zero.   

References integer_zerop().

Referenced by build_polynomial_chrec(), and chrec_fold_plus_poly_poly().

bool eq_evolutions_p ( const_tree  ,
const_tree   
)
Observers.   
static bool evolution_function_is_affine_in_loop ( )
inlinestatic
Determine whether CHREC is an affine evolution function in LOOPNUM.   

References evolution_function_is_invariant_p().

Referenced by analyze_siv_subscript().

bool evolution_function_is_affine_multivariate_p ( const_tree  ,
int   
)
static bool evolution_function_is_affine_p ( )
inlinestatic
Determine whether CHREC is an affine evolution function or not.   

References evolution_function_is_invariant_p().

Referenced by chrec_apply(), chrec_convert_1(), chrec_is_positive(), gather_chrec_stats(), scev_analyzable_p(), and scev_direction().

static bool evolution_function_is_constant_p ( )
inlinestatic
bool evolution_function_is_invariant_p ( tree  ,
int   
)
bool evolution_function_is_univariate_p ( const_tree  )
bool evolution_function_right_is_integer_cst ( const_tree  )
tree evolution_part_in_loop_num ( tree  chrec,
unsigned  loop_num 
)
Returns the evolution part in LOOP_NUM.  Example: the call
   evolution_part_in_loop_num ({{0, +, 1}_1, +, 2}_1, 1) returns
   {1, +, 2}_1   

References chrec_component_in_loop_num().

Referenced by adjust_range_with_scev(), idx_infer_loop_bounds(), infer_loop_bounds_from_pointer_arith(), infer_loop_bounds_from_signedness(), vect_analyze_scalar_cycles_1(), vect_is_simple_iv_evolution(), and vrp_var_may_overflow().

void for_each_scev_op ( tree scev,
bool(*)(tree *, void *)  cbck,
void *  data 
)
Iterates over all the components of SCEV, and calls CBCK.   

References for_each_scev_op().

Referenced by for_each_scev_op().

tree hide_evolution_in_other_loops_than_loop ( tree  chrec,
unsigned  loop_num 
)
Returns a univariate function that represents the evolution in
   LOOP_NUM.  Mask the evolution of any other loop.   

References automatically_generated_chrec_p(), build_polynomial_chrec(), cfun, flow_loop_nested_p(), get_chrec_loop(), get_loop(), hide_evolution_in_other_loops_than_loop(), and initial_condition().

Referenced by hide_evolution_in_other_loops_than_loop(), and no_evolution_in_loop_p().

tree initial_condition ( tree  )
tree initial_condition_in_loop_num ( tree  chrec,
unsigned  loop_num 
)
Returns the initial condition in LOOP_NUM.  Example: the call
   initial_condition_in_loop_num ({{0, +, 1}_1, +, 2}_2, 2) returns
   {0, +, 1}_1   

References chrec_component_in_loop_num().

Referenced by adjust_range_with_scev(), idx_infer_loop_bounds(), infer_loop_bounds_from_pointer_arith(), infer_loop_bounds_from_signedness(), nb_vars_in_chrec(), vect_is_simple_iv_evolution(), and vrp_var_may_overflow().

bool is_multivariate_chrec ( const_tree  )
unsigned nb_vars_in_chrec ( tree  )
static bool no_evolution_in_loop_p ( )
inlinestatic
Determines whether CHREC is a loop invariant with respect to LOOP_NUM.
   Set the result in RES and return true when the property can be computed.   

References chrec_contains_symbols_defined_in_loop(), chrec_dont_know, chrec_not_analyzed_yet, hide_evolution_in_other_loops_than_loop(), and tree_contains_chrecs().

Referenced by analyze_evolution_in_loop(), analyze_scalar_evolution_in_loop(), build_polynomial_chrec(), compute_overall_effect_of_inner_loop(), and compute_scalar_evolution_in_loop().

tree reset_evolution_in_loop ( unsigned  loop_num,
tree  chrec,
tree  new_evol 
)
Set or reset the evolution of CHREC to NEW_EVOL in loop LOOP_NUM.
   This function is essentially used for setting the evolution to
   chrec_dont_know, for example after having determined that it is
   impossible to say how many times a loop will execute.   

References build_polynomial_chrec(), cfun, chrec_type(), flow_loop_nested_p(), get_chrec_loop(), get_loop(), ptrofftype_p(), and reset_evolution_in_loop().

Referenced by reset_evolution_in_loop().

bool scev_is_linear_expression ( tree  )
bool tree_contains_chrecs ( const_tree  ,
int *   
)
static bool tree_does_not_contain_chrecs ( )
inlinestatic
Determines whether EXPR does not contains chrec expressions.   

References tree_contains_chrecs().

Referenced by rewrite_close_phi_out_of_ssa(), scev_analyzable_p(), scev_const_prop(), and simple_iv().

static bool tree_is_chrec ( )
inlinestatic

Variable Documentation

tree chrec_dont_know
Reserved to the cases where the analyzer has detected an
   undecidable property at compile time.   

Referenced by add_other_self_distances(), add_to_evolution(), add_to_evolution_1(), analyze_evolution_in_loop(), analyze_initial_condition(), analyze_miv_subscript(), analyze_overlapping_iterations(), analyze_scalar_evolution_1(), analyze_scalar_evolution_in_loop(), analyze_siv_subscript(), analyze_siv_subscript_cst_affine(), analyze_subscript_affine_affine(), analyze_ziv_subscript(), build_polynomial_chrec(), chrec_apply(), chrec_contains_undetermined(), chrec_convert_1(), chrec_evaluate(), chrec_fold_automatically_generated_operands(), chrec_fold_multiply(), chrec_fold_plus_1(), chrec_fold_poly_cst(), chrec_merge(), classify_partition(), compute_affine_dependence(), compute_data_dependences_for_bb(), compute_data_dependences_for_loop(), compute_overall_effect_of_inner_loop(), compute_overlap_steps_for_affine_1_2(), compute_overlap_steps_for_affine_univar(), compute_subscript_distance(), cond_if_else_store_replacement(), determine_loop_nest_reuse(), dump_data_dependence_relation(), extract_affine(), find_data_references_in_bb(), find_data_references_in_loop(), find_loop_niter(), find_loop_niter_by_eval(), follow_ssa_edge_binary(), follow_ssa_edge_in_condition_phi(), follow_ssa_edge_in_condition_phi_branch(), follow_ssa_edge_inner_loop_phi(), initialize_data_dependence_relation(), initialize_scalar_evolutions_analyzer(), instantiate_array_ref(), instantiate_scev_1(), instantiate_scev_2(), instantiate_scev_3(), instantiate_scev_binary(), instantiate_scev_convert(), instantiate_scev_name(), instantiate_scev_not(), instantiate_scev_poly(), instantiate_scev_r(), interpret_condition_phi(), interpret_expr(), interpret_loop_phi(), interpret_rhs_expr(), known_dependences_p(), lambda_transform_legal_p(), loop_niter_by_eval(), max_stmt_executions_tree(), no_evolution_in_loop_p(), number_of_exit_cond_executions(), number_of_latch_executions(), scan_tree_for_params(), scev_const_prop(), subscript_dependence_tester_1(), vect_analyze_data_ref_dependence(), vect_find_same_alignment_drs(), vect_get_loop_niters(), and vect_slp_analyze_data_ref_dependence().

tree chrec_not_analyzed_yet
The following trees are unique elements.  Thus the comparison of another
   element to these elements should be done on the pointer to these trees,
   and not on their value.   
The following trees are unique elements.  Thus the comparison of
   another element to these elements should be done on the pointer to
   these trees, and not on their value.   
The SSA_NAMEs that are not yet analyzed are qualified with NULL_TREE.   

Referenced by analyze_evolution_in_loop(), analyze_initial_condition(), analyze_scalar_evolution_1(), chrec_fold_automatically_generated_operands(), chrec_merge(), compute_scalar_evolution_in_loop(), get_instantiated_value_entry(), get_scalar_evolution(), initialize_scalar_evolutions_analyzer(), instantiate_scev_name(), interpret_condition_phi(), new_scev_info_str(), and no_evolution_in_loop_p().