GCC Middle and Back End API Reference
|
Data Structures | |
struct | rename_map_hasher |
Typedefs | |
typedef hash_table < rename_map_hasher > | rename_map_type |
typedef hash_table<rename_map_hasher> rename_map_type |
void build_sese_loop_nests | ( | ) |
Build the loop nests contained in REGION. Returns true when the operation was successful.
References bb_in_sese_p(), loop::header, loop::latch, basic_block_def::loop_father, loop::num, and sese_record_loop().
Referenced by build_poly_scop(), and limit_scops().
edge copy_bb_and_scalar_dependences | ( | basic_block | bb, |
sese | region, | ||
edge | next_e, | ||
vec< tree > | iv_map, | ||
bool * | gloog_error | ||
) |
Copies BB and includes in the copied BB all the statements that can be reached following the use-def chains from the memory accesses, and returns the next edge following this new block. GLOOG_ERROR is set when the code generation cannot continue.
References hash_table< Descriptor, Allocator >::create(), hash_table< Descriptor, Allocator >::dispose(), graphite_copy_stmts_from_block(), remove_phi_nodes(), single_succ_edge(), and split_edge().
Referenced by translate_clast_user().
|
static |
Creates an IFSESE with CONDITION on edge ENTRY.
References create_empty_if_region_on_edge(), edge_def::dest, loop_exit::e, sese_s::entry, sese_s::exit, ifsese_s::false_region, edge_def::flags, ifsese_s::region, single_succ_edge(), basic_block_def::succs, and ifsese_s::true_region.
Referenced by move_sese_in_condition().
|
static |
@verbatim Single entry single exit control flow regions.
Copyright (C) 2008-2013 Free Software Foundation, Inc. Contributed by Jan Sjodin jan.s and Sebastian Pop jodi n@amd .comsebas. tian .pop@ amd. com
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/.
Print to stderr the element ELT.
References rename_map_elt_s::expr, rename_map_elt_s::old_name, and print_generic_expr().
Referenced by debug_rename_map_1().
DEBUG_FUNCTION void debug_rename_map | ( | ) |
Print to stderr all the elements of RENAME_MAP.
References debug_rename_map_1(), and hash_table< Descriptor, Allocator >::traverse().
int debug_rename_map_1 | ( | ) |
Helper function for debug_rename_map.
References debug_rename_elt().
Referenced by debug_rename_map().
int eq_rename_map_elts | ( | ) |
Compares database elements E1 and E2.
References rename_map_elt_s::old_name.
void free_sese | ( | ) |
Deletes REGION.
Referenced by free_scops().
edge get_false_edge_from_guard_bb | ( | ) |
Returns the first successor edge of BB with EDGE_TRUE_VALUE flag cleared.
References edge_def::flags, and basic_block_def::succs.
Referenced by if_region_set_false_region().
|
static |
Returns the expression associated to OLD_NAME in RENAME_MAP.
References hash_table< Descriptor, Allocator >::find_slot(), and rename_map_elt_s::old_name.
Referenced by rename_uses().
edge get_true_edge_from_guard_bb | ( | ) |
Returns the first successor edge of BB with EDGE_TRUE_VALUE flag set.
References edge_def::flags, and basic_block_def::succs.
Referenced by translate_clast_for(), and translate_clast_guard().
|
static |
Duplicates the statements of basic block BB into basic block NEW_BB and compute the new induction variables according to the IV_MAP. GLOOG_ERROR is set when the code generation cannot continue.
References cfun, copy(), create_new_def_for(), fold_stmt_inplace(), gimple_assign_lhs(), gimple_copy(), gimple_duplicate_stmt_histograms(), gsi_end_p(), gsi_insert_after(), GSI_NEW_STMT, gsi_next(), gsi_start_bb(), gsi_stmt(), is_gimple_assign(), is_gimple_reg(), basic_block_def::loop_father, maybe_duplicate_eh_stmt(), rename_map_elt_s::old_name, rename_uses(), scev_analyzable_p(), set_rename(), and update_stmt().
Referenced by copy_bb_and_scalar_dependences().
void if_region_set_false_region | ( | ) |
Sets the false region of an IF_REGION to REGION.
References delete_basic_block(), edge_def::dest, loop_exit::e, loop::exits, ifsese_s::false_region, edge_def::flags, free(), get_false_edge_from_guard_bb(), if_region_get_condition_block(), basic_block_def::loop_father, memcpy(), loop_exit::next, recompute_all_dominators(), redirect_edge_pred(), redirect_edge_succ(), single_succ(), and edge_def::src.
Referenced by move_sese_in_condition().
ifsese move_sese_in_condition | ( | ) |
Moves REGION in a condition expression: | if (1) | ; | else | REGION;
References create_if_region_on_edge(), if_region_set_false_region(), single_pred_edge(), single_succ_edge(), and split_edge().
Referenced by gloog().
sese new_sese | ( | ) |
Builds a new SESE region from edges ENTRY and EXIT.
Referenced by build_graphite_scops(), and split_region_for_bb().
|
read |
Returns the outermost loop in SCOP that contains BB.
References basic_block_def::loop_father, loop_in_sese_p(), and loop_outer().
Referenced by outermost_loop_in_sese_1(), and scop_to_lst().
hashval_t rename_map_elt_info | ( | ) |
Computes a hash function for database element ELT.
|
static |
Renames the scalar uses of the statement COPY, using the substitution map RENAME_MAP, inserting the gimplification code at GSI_TGT, for the translation REGION, with the original copied statement in LOOP, and using the induction variable renaming map IV_MAP. Returns true when something has been renamed. GLOOG_ERROR is set when the code generation cannot continue.
References build_zero_cst(), changed, chrec_apply_map(), chrec_contains_undetermined(), create_tmp_var(), force_gimple_operand(), get_rename(), gimple_assign_rhs1(), gimple_debug_bind_p(), gimple_debug_bind_reset_value(), gimple_debug_source_bind_p(), gsi_insert_seq_before(), GSI_SAME_STMT, is_gimple_assign(), is_gimple_debug(), rename_map_elt_s::old_name, recompute_tree_invariant_for_addr_expr(), replace_exp(), scalar_evolution_in_region(), set_rename(), tree_contains_chrecs(), unshare_expr(), and useless_type_conversion_p().
Referenced by graphite_copy_stmts_from_block().
tree scalar_evolution_in_region | ( | ) |
Returns the scalar evolution of T in REGION. Every variable that is not defined in the REGION is considered a parameter.
References analyze_scalar_evolution(), block_before_sese(), compute_overall_effect_of_inner_loop(), defined_in_sese_p(), instantiate_scev(), loop_containing_stmt(), loop_depth(), loop_in_sese_p(), and superloop_at_depth().
Referenced by build_loop_iteration_domains(), create_pw_aff_from_tree(), find_params_in_bb(), find_scop_parameters(), reduction_phi_p(), remove_invariant_phi(), rename_uses(), rewrite_close_phi_out_of_ssa(), rewrite_cross_bb_scalar_deps(), and scev_analyzable_p().
|
static |
Add exit phis for USE on EXIT.
References add_phi_arg(), create_new_def_for(), create_phi_node(), and gimple_phi_result_ptr().
Referenced by sese_insert_phis_for_liveouts().
|
static |
For a USE in BB, return true if BB is outside REGION and it's not in the LIVEOUTS set.
References bb_in_sese_p(), bitmap_bit_p(), and gimple_bb().
Referenced by sese_reset_debug_liveouts_bb().
|
static |
Build the LIVEOUTS of REGION: the set of variables defined inside and used outside the REGION.
References sese_build_liveouts_bb(), and sese_reset_debug_liveouts_bb().
Referenced by sese_insert_phis_for_liveouts().
|
static |
Marks for rewrite all the SSA_NAMES defined in REGION and that are used in BB that is outside of the REGION.
References edge_def::dest, gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_start_phis(), gsi_stmt(), is_gimple_debug(), sese_build_liveouts_use(), and basic_block_def::succs.
Referenced by sese_build_liveouts().
|
static |
For a USE in BB, if BB is outside REGION, mark the USE in the LIVEOUTS set.
References bb_in_sese_p(), bitmap_set_bit(), and gimple_bb().
Referenced by sese_build_liveouts_bb().
void sese_insert_phis_for_liveouts | ( | sese | region, |
basic_block | bb, | ||
edge | false_e, | ||
edge | true_e | ||
) |
Insert in the block BB phi nodes for variables defined in REGION and used outside the REGION. The code generation moves REGION in the else clause of an "if (1)" and generates code in the then clause that is at this point empty: | if (1) | empty; | else | REGION;
References sese_add_exit_phis_edge(), sese_build_liveouts(), and update_ssa().
Referenced by gloog().
|
static |
Record LOOP as occurring in REGION.
References bitmap_set_bit(), loop::num, and sese_contains_loop().
Referenced by build_sese_loop_nests().
|
static |
Reset debug stmts that reference SSA_NAMES defined in REGION that are not marked as liveouts.
References gimple_debug_bind_reset_value(), gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_stmt(), is_gimple_debug(), sese_bad_liveouts_use(), and update_stmt().
Referenced by sese_build_liveouts().
void set_ifsese_condition | ( | ) |
Replaces the condition of the IF_REGION with CONDITION: | if (CONDITION) | true_region; | else | false_region;
References edge_def::dest, sese_s::entry, force_gimple_operand_gsi(), gimple_build_cond_from_tree(), gsi_insert_after(), gsi_last_bb(), GSI_NEW_STMT, gsi_remove(), last, last_stmt(), and ifsese_s::region.
Referenced by gloog().
|
static |
Register in RENAME_MAP the rename tuple (OLD_NAME, EXPR).
References hash_table< Descriptor, Allocator >::find_slot(), free(), new_rename_map_elt(), and rename_map_elt_s::old_name.
Referenced by graphite_copy_stmts_from_block(), and rename_uses().