GCC Middle and Back End API Reference
|
Go to the source code of this file.
Functions | |
void | dump_iv (FILE *, struct iv *) |
void | dump_use (FILE *, struct iv_use *) |
void | dump_uses (FILE *, struct ivopts_data *) |
void | dump_cand (FILE *, struct iv_cand *) |
bool | contains_abnormal_ssa_name_p (tree) |
class loop * | outermost_invariant_loop_for_expr (class loop *, tree) |
bool | expr_invariant_in_loop_p (class loop *, tree) |
bool | may_be_nonaddressable_p (tree expr) |
void | tree_ssa_iv_optimize (void) |
void | create_canonical_iv (class loop *, edge, tree, tree *=NULL, tree *=NULL) |
Returns true if EXPR contains a ssa name that occurs in an abnormal phi node.
References contains_abnormal_ssa_name_p_1(), NULL, NULL_TREE, and walk_tree_without_duplicates.
Referenced by can_unroll_loop_p(), final_value_replacement_loop(), find_bivs(), find_givs_in_stmt_scev(), and niter_for_exit().
void create_canonical_iv | ( | class loop * | loop, |
edge | exit, | ||
tree | niter, | ||
tree * | var_before = NULL, | ||
tree * | var_after = NULL ) |
Adds a canonical induction variable to LOOP iterating NITER times. EXIT is the exit edge whose condition is replaced. The ssa versions of the new IV before and after increment will be stored in VAR_BEFORE and VAR_AFTER if they are not NULL.
References as_a(), build_int_cst(), create_iv(), dump_file, dump_flags, EDGE_SUCC, fold_build2, gimple_cond_set_code(), gimple_cond_set_lhs(), gimple_cond_set_rhs(), gsi_last_bb(), NULL_TREE, loop::num, print_generic_expr(), TDF_DETAILS, TDF_SLIM, TREE_TYPE, type(), and update_stmt().
Referenced by canonicalize_loop_induction_variables(), and tree_loop_interchange::interchange_loops().
|
extern |
Dumps information about induction variable candidate CAND to FILE.
References dump_bitmap(), dump_iv(), IP_AFTER_USE, IP_BEFORE_USE, IP_END, IP_NORMAL, IP_ORIGINAL, print_generic_expr(), and TDF_SLIM.
Referenced by add_candidate_1(), and create_new_ivs().
|
extern |
Header file for Induction variable optimizations. Copyright (C) 2013-2024 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>.
|
extern |
Dumps information about the USE to FILE.
References dump_iv(), print_generic_expr(), print_gimple_stmt(), and TDF_SLIM.
Referenced by dump_groups().
|
extern |
Returns true if expression EXPR is obviously invariant in LOOP, i.e. if all its operands are defined outside of the LOOP. LOOP should not be the function body.
References expr_invariant_in_loop_p(), EXPR_P, flow_bb_inside_loop_p(), gcc_assert, gimple_bb(), i, is_gimple_min_invariant(), loop_depth(), SSA_NAME_DEF_STMT, TREE_CODE, TREE_OPERAND, and TREE_OPERAND_LENGTH.
Referenced by analyze_and_compute_bitop_with_inv_effect(), evolution_function_is_invariant_rec_p(), expr_invariant_in_loop_p(), gather_memory_references_ref(), idx_find_step(), ifcvt_can_hoist(), infer_loop_bounds_from_pointer_arith(), rewrite_use_nonlinear_expr(), unroll_jam_possible_p(), vect_analyze_loop_form(), vect_can_advance_ivs_p(), and vect_check_gather_scatter().
Return true if EXPR may be non-addressable.
References CASE_CONVERT, DECL_HARD_REGISTER, DECL_NONADDRESSABLE_P, is_gimple_addressable(), is_gimple_reg(), may_be_nonaddressable_p(), REF_REVERSE_STORAGE_ORDER, TREE_CODE, TREE_OPERAND, TREE_TYPE, and TYPE_REVERSE_STORAGE_ORDER.
Referenced by loop_distribution::create_rdg_vertices(), dr_analyze_innermost(), find_interesting_uses_address(), gather_memory_references_ref(), ifcvt_can_use_mask_load_store(), initialize_data_dependence_relation(), instrument_expr(), may_be_nonaddressable_p(), vect_check_gather_scatter(), and vect_recog_cond_store_pattern().
Returns the outermost loop EXPR is obviously invariant in relative to the loop LOOP, i.e. if all its operands are defined outside of the returned loop. Returns NULL if EXPR is not even obviously invariant in LOOP.
References current_loops, EXPR_P, flow_bb_inside_loop_p(), gimple_bb(), i, is_gimple_min_invariant(), loop_depth(), basic_block_def::loop_father, MAX, NULL, outermost_invariant_loop_for_expr(), SSA_NAME_DEF_STMT, superloop_at_depth(), TREE_CODE, TREE_OPERAND, and TREE_OPERAND_LENGTH.
Referenced by outermost_invariant_loop_for_expr(), vect_enhance_data_refs_alignment(), and vect_loop_versioning().
void tree_ssa_iv_optimize | ( | void | ) |
Main entry point. Optimizes induction variables in loops.
References cfun, dbg_cnt(), dump_file, dump_flags, flow_loop_dump(), free_numbers_of_iterations_estimates(), LI_FROM_INNERMOST, mark_ssa_maybe_undefs(), NULL, release_defs_bitset(), scev_reset_htab(), TDF_DETAILS, tree_ssa_iv_optimize_finalize(), tree_ssa_iv_optimize_init(), and tree_ssa_iv_optimize_loop().