GCC Middle and Back End API Reference
|
Go to the source code of this file.
Functions | |
tree | number_of_latch_executions (struct loop *) |
tree | number_of_exit_cond_executions (struct loop *) |
gimple | get_loop_exit_condition (const struct loop *) |
void | scev_initialize (void) |
bool | scev_initialized_p (void) |
void | scev_reset (void) |
void | scev_reset_htab (void) |
void | scev_finalize (void) |
tree | analyze_scalar_evolution (struct loop *, tree) |
tree | instantiate_scev (basic_block, struct loop *, tree) |
tree | resolve_mixers (struct loop *, tree) |
void | gather_stats_on_scev_database (void) |
unsigned int | scev_const_prop (void) |
bool | expression_expensive_p (tree) |
bool | simple_iv (struct loop *, struct loop *, tree, affine_iv *, bool) |
tree | compute_overall_effect_of_inner_loop (struct loop *, tree) |
static basic_block | block_before_loop () |
static tree | instantiate_parameters () |
static struct loop * | get_chrec_loop () |
|
inlinestatic |
Returns the basic block preceding LOOP or ENTRY_BLOCK_PTR when the loop is function's body.
References loop_preheader_edge(), and edge_def::src.
Referenced by analyze_scalar_evolution(), analyze_scalar_evolution_1(), dr_analyze_indices(), instantiate_parameters(), and resolve_mixers().
bool expression_expensive_p | ( | tree | ) |
void gather_stats_on_scev_database | ( | void | ) |
Classify the chrecs of the whole database.
References dump_chrecs_stats(), dump_file, gather_stats_on_scev_database_1(), reset_chrecs_counters(), and scalar_evolution_info.
Referenced by analyze_all_data_dependences().
|
staticread |
Returns the loop of the polynomial chrec CHREC.
References cfun, and get_loop().
Referenced by add_subscript_strides(), add_to_evolution_1(), adjust_range_with_scev(), analyze_miv_subscript(), analyze_siv_subscript_cst_affine(), analyze_subscript_affine_affine(), chrec_component_in_loop_num(), chrec_convert_1(), chrec_evaluate(), chrec_fold_multiply_poly_poly(), chrec_fold_plus_poly_poly(), chrec_is_positive(), compute_overall_effect_of_inner_loop(), compute_overlap_steps_for_affine_1_2(), evolution_function_is_invariant_rec_p(), extract_affine_chrec(), hide_evolution_in_other_loops_than_loop(), instantiate_scev_poly(), reset_evolution_in_loop(), and vrp_var_may_overflow().
|
inlinestatic |
Analyze all the parameters of the chrec that were left under a symbolic form. LOOP is the loop in which symbolic names have to be analyzed and instantiated.
References block_before_loop(), and instantiate_scev().
Referenced by adjust_range_with_scev(), compute_overall_effect_of_inner_loop(), idx_infer_loop_bounds(), infer_loop_bounds_from_pointer_arith(), infer_loop_bounds_from_signedness(), simplify_using_outer_evolutions(), and vrp_var_may_overflow().
tree instantiate_scev | ( | basic_block | instantiate_below, |
struct loop * | evolution_loop, | ||
tree | chrec | ||
) |
Analyze all the parameters of the chrec that were left under a symbolic form. INSTANTIATE_BELOW is the basic block that stops the recursive instantiation of parameters: a parameter is a variable that is defined in a basic block that dominates INSTANTIATE_BELOW or a function parameter.
References cache, dump_file, dump_flags, basic_block_def::index, instantiate_scev_r(), loop::num, and print_generic_expr().
Referenced by dr_analyze_indices(), graphite_can_represent_expr(), instantiate_parameters(), and scalar_evolution_in_region().
unsigned int scev_const_prop | ( | void | ) |
Replace ssa names for that scev can prove they are constant by the appropriate constants. Also perform final value replacement in loops, in case the replacement expressions are cheap. We only consider SSA names defined by phi nodes; rest is left to the ordinary constant propagation pass.
References analyze_scalar_evolution(), analyze_scalar_evolution_in_loop(), bitmap_set_bit(), cfun, chrec_contains_symbols_defined_in_loop(), chrec_dont_know, compute_overall_effect_of_inner_loop(), contains_abnormal_ssa_name_p(), edge_def::dest, dump_file, dump_flags, expression_expensive_p(), force_gimple_operand_gsi(), gsi_after_labels(), gsi_end_p(), gsi_for_stmt(), gsi_insert_before(), gsi_next(), GSI_SAME_STMT, gsi_start_phis(), gsi_stmt(), is_gimple_min_invariant(), LI_FROM_INNERMOST, loop_depth(), basic_block_def::loop_father, may_propagate_copy(), loop::num, number_of_latch_executions(), number_of_loops(), print_gimple_stmt(), remove_phi_node(), replace_uses_by(), resolve_mixers(), scev_reset(), single_exit(), single_pred_p(), split_loop_exit_edge(), superloop_at_depth(), tree_does_not_contain_chrecs(), type(), unshare_expr(), and virtual_operand_p().
void scev_finalize | ( | void | ) |
Finalize the scalar evolution analysis.
References scalar_evolution_info.
Referenced by analyze_function(), do_pre(), estimate_function_body_sizes(), execute_vrp(), find_obviously_necessary_stmts(), tree_complete_unroll_inner(), tree_estimate_probability_driver(), tree_ssa_cs_elim(), and tree_ssa_loop_done().
void scev_initialize | ( | void | ) |
Initialize the analysis of scalar evolutions for LOOPS.
References del_scev_info(), eq_scev_info(), hash_scev_info(), initialize_scalar_evolutions_analyzer(), loop::nb_iterations, and scalar_evolution_info.
Referenced by analyze_function(), do_pre(), estimate_function_body_sizes(), execute_vrp(), find_obviously_necessary_stmts(), tree_complete_unroll_inner(), tree_estimate_probability_driver(), tree_ssa_cs_elim(), and tree_ssa_loop_init().
bool scev_initialized_p | ( | void | ) |
Return true if SCEV is initialized.
References scalar_evolution_info.
Referenced by estimated_loop_iterations(), fini_copy_prop(), and max_loop_iterations().
void scev_reset | ( | void | ) |
Cleans up the information cached by the scalar evolutions analysis in the hash table and in the loop->nb_iterations.
References loop::nb_iterations, and scev_reset_htab().
Referenced by canonicalize_induction_variables(), gen_parallel_loop(), gimple_duplicate_loop_to_header_edge(), gloog(), graphite_finalize(), graphite_initialize(), repair_loop_structures(), scev_const_prop(), tree_predictive_commoning(), tree_predictive_commoning_loop(), tree_ssa_dce_loop(), tree_ssa_iv_optimize_loop(), tree_ssa_loop_bounds(), tree_ssa_prefetch_arrays(), tree_unroll_loops_completely(), vect_do_peeling_for_alignment(), and vect_do_peeling_for_loop_bound().
void scev_reset_htab | ( | void | ) |
Cleans up the information cached by the scalar evolutions analysis in the hash table.
References scalar_evolution_info.
Referenced by rewrite_commutative_reductions_out_of_ssa(), rewrite_cross_bb_scalar_deps_out_of_ssa(), and scev_reset().
bool simple_iv | ( | struct loop * | wrto_loop, |
struct loop * | use_loop, | ||
tree | op, | ||
affine_iv * | iv, | ||
bool | allow_nonconstant_step | ||
) |
Checks whether use of OP in USE_LOOP behaves as a simple affine iv with respect to WRTO_LOOP and returns its base and step in IV if possible (see analyze_scalar_evolution_in_loop for more details on USE_LOOP and WRTO_LOOP). If ALLOW_NONCONSTANT_STEP is true, we want step to be invariant in LOOP. Otherwise we require it to be an integer constant. IV->no_overflow is set to true if we are sure the iv cannot overflow (e.g. because it is computed in signed arithmetics). Consequently, adding an induction variable for (i = IV->base; ; i += IV->step) is only safe if IV->no_overflow is false, or TYPE_OVERFLOW_UNDEFINED is false for the type of the induction variable, or you can prove that i does not wrap by some other argument. Otherwise, this might introduce undefined behavior, and for (i = iv->base; ; i = (type) ((unsigned type) i + (unsigned type) iv->step)) must be used instead.
References analyze_scalar_evolution_in_loop(), affine_iv::base, build_int_cst(), chrec_contains_symbols_defined_in_loop(), chrec_contains_undetermined(), affine_iv::no_overflow, loop::num, affine_iv::step, tree_contains_chrecs(), tree_does_not_contain_chrecs(), and type().
Referenced by constant_after_peeling(), determine_biv_step(), dr_analyze_innermost(), estimate_function_body_sizes(), find_givs_in_stmt_scev(), gather_scalar_reductions(), idx_analyze_ref(), inhibit_phi_insertion(), is_comparison_with_loop_invariant_p(), number_of_iterations_exit(), ref_at_iteration(), rewrite_phi_with_iv(), try_create_reduction_list(), and vect_analyze_data_refs().