GCC Middle and Back End API Reference
|
Data Structures | |
struct | bsc |
|
static |
Add conditional statement STMT to pbb. CODE is used as the comparison operator. This allows us to invert the condition or to handle inequalities.
References create_pw_aff_from_tree(), poly_bb::domain, gimple_cond_lhs(), and gimple_cond_rhs().
Referenced by add_conditions_to_domain().
|
static |
Traverses all the GBBs of the SCOP and add their constraints to the iteration domains.
References add_conditions_to_domain().
Referenced by build_poly_scop().
|
static |
Add conditions to the domain of PBB.
References add_condition_to_pbb(), gimple_cond_code(), invert_tree_comparison(), and is_empty().
Referenced by add_conditions_to_constraints().
|
static |
Add constraints on the possible values of parameter P from the type of P.
References scop::context, g, lower_bound_in_type(), tree_int_to_gmp(), and upper_bound_in_type().
Referenced by build_scop_context().
|
static |
Returns true if all predecessors of BB, that are not dominated by BB, are marked in MAP. The predecessors dominated by BB are loop latches and will be handled after BB.
References bitmap_bit_p(), CDI_DOMINATORS, dominated_by_p(), basic_block_def::index, basic_block_def::preds, and edge_def::src.
Referenced by build_scop_bbs_1().
|
static |
Analyze all the data references of STMTS and add them to the GBB_DATA_REFS vector of BB.
References bb_in_sese_p(), gbb_from_bb(), graphite_find_data_references_in_stmt(), is_gimple_debug(), loop_containing_stmt(), loop_in_sese_p(), and outermost_loop_in_sese_1().
Referenced by insert_out_of_ssa_copy(), insert_out_of_ssa_copy_on_edge(), and insert_stmts().
|
static |
Uses DFS component number as representative of alias-sets. Also tests for optimality by verifying if every connected component is a clique. Returns true (1) if the above test is true, and false (0) otherwise.
References add_edge(), base_alias_pair::alias_set, data_reference::aux, vertex::component, dr_may_alias_p(), free(), free_graph(), g, graphds_dfs(), graph::n_vertices, new_graph(), vertex::pred, graph_edge::pred_next, graph_edge::src, and graph::vertices.
Referenced by build_scop_drs().
|
static |
Group each data reference in DRS with its base object set num.
References add_edge(), data_reference::aux, base_alias_pair::base_obj_set, vertex::component, dr_same_base_object_p(), free(), free_graph(), g, graphds_dfs(), graph::n_vertices, new_graph(), queue, and graph::vertices.
Referenced by build_scop_drs().
|
static |
Builds the constraint polyhedra for LOOP in SCOP. OUTER_PH gives the constraints for the surrounding loops.
References chrec_contains_undetermined(), scop::context, extract_affine(), extract_affine_gmp(), g, loop::inner, loop_in_sese_p(), max_stmt_executions(), mpz_set_double_int(), loop::next, loop::num, number_of_latch_executions(), scalar_evolution_in_region(), and tree_int_to_gmp().
Referenced by build_scop_iteration_domain().
|
static |
|
static |
Converts the STATIC_SCHEDULE of PBB into a scattering polyhedron. We generate SCATTERING_DIMENSIONS scattering dimensions. CLooG 0.15.0 and previous versions require, that all scattering functions of one CloogProgram have the same number of scattering dimensions, therefore we allow to specify it. This should be removed in future versions of CLooG. The scattering polyhedron consists of these dimensions: scattering, loop_iterators, parameters. Example: | scattering_dimensions = 5 | used_scattering_dimensions = 3 | nb_iterators = 1 | scop_nb_params = 2 | | Schedule: | i | 4 5 | | Scattering polyhedron: | | scattering: {s1, s2, s3, s4, s5} | loop_iterators: {i} | parameters: {p1, p2} | | s1 s2 s3 s4 s5 i p1 p2 1 | 1 0 0 0 0 0 0 0 -4 = 0 | 0 1 0 0 0 -1 0 0 0 = 0 | 0 0 1 0 0 0 0 0 -5 = 0
References poly_bb::domain, pbb_dim_iter_domain(), poly_bb::schedule, and poly_bb::transformed.
Referenced by build_scop_scattering().
|
static |
Build data accesses for DR in PBB.
References base_alias_pair::alias_set, data_reference::aux, scop::ctx, poly_bb::domain, DR_IS_READ, DR_NUM_DIMENSIONS, isl_id_for_dr(), new_poly_dr(), pdr_add_alias_set(), pdr_add_data_dimensions(), pdr_add_memory_accesses(), PDR_READ, and PDR_WRITE.
Referenced by build_pbb_drs().
void build_poly_scop | ( | ) |
Builds the polyhedral representation for a SESE region.
References add_conditions_to_constraints(), build_scop_bbs(), build_scop_context(), build_scop_drs(), build_scop_iteration_domain(), build_scop_scattering(), build_sese_conditions(), build_sese_loop_nests(), find_scop_parameters(), nb_pbbs_in_loops(), rewrite_commutative_reductions_out_of_ssa(), rewrite_cross_bb_scalar_deps_out_of_ssa(), rewrite_reductions_out_of_ssa(), scop_ivs_can_be_represented(), scop_nb_params(), and scop_to_lst().
Referenced by graphite_transform_loops().
|
static |
Gather the basic blocks belonging to the SCOP.
References bitmap_clear(), build_scop_bbs_1(), sbitmap_alloc(), sbitmap_free(), and visited.
Referenced by build_poly_scop().
|
static |
Recursive helper function for build_scops_bbs.
References all_non_dominated_preds_marked_p(), bb_in_sese_p(), bitmap_bit_p(), bitmap_set_bit(), CDI_DOMINATORS, dom, get_dominated_by(), graphite_sort_dominated_info(), basic_block_def::index, new_poly_bb(), and try_generate_gimple_bb().
Referenced by build_scop_bbs().
|
static |
Build the context of the SCOP. The context usually contains extra constraints that are added to the iteration domains that constrain some parameters.
References add_param_constraints(), and scop_nb_params().
Referenced by build_poly_scop().
|
static |
Build data references in SCOP.
References data_reference::aux, build_alias_set_optimal_p(), build_base_obj_set_for_drs(), build_pbb_drs(), dump_alias_graphs(), free_gimple_bb(), and free_poly_bb().
Referenced by build_poly_scop().
|
static |
Build the iteration domains: the loops belonging to the current SCOP, and that vary for the execution of the current basic block. Returns false if there is no loop in SCOP.
References build_loop_iteration_domains(), cfun, scop::context, poly_bb::domain, free(), isl_id_for_pbb(), loop_in_sese_p(), loop_outer(), loop::num, number_of_loops(), and pbb_loop().
Referenced by build_poly_scop().
|
static |
Build for BB the static schedule. The static schedule is a Dewey numbering of the abstract syntax tree: http://en.wikipedia.org/wiki/Dewey_Decimal_Classification The following example informally defines the static schedule: A for (i: ...) { for (j: ...) { B C } for (k: ...) { D E } } F Static schedules for A to F: DEPTH 0 1 2 A 0 B 1 0 0 C 1 0 1 D 1 1 0 E 1 1 1 F 2
References build_pbb_scattering_polyhedrons(), cfun, scop::context, nb_common_loops(), number_of_loops(), and pbb_dim_iter_domain().
Referenced by build_poly_scop().
|
static |
Record all conditions in REGION.
References dom_walk_data::after_dom_children, dom_walk_data::before_dom_children, dom_walk_data::block_local_data_size, build_sese_conditions_after(), build_sese_conditions_before(), bsc::cases, CDI_DOMINATORS, bsc::conditions, fini_walk_dominator_tree(), dom_walk_data::global_data, init_walk_dominator_tree(), dom_walk_data::initialize_block_local_data, bsc::region, and walk_dominator_tree().
Referenced by build_poly_scop().
|
static |
Call-back for dom_walk executed after visiting the dominated blocks.
References bb_in_sese_p(), bsc::cases, bsc::conditions, dom_walk_data::global_data, bsc::region, and single_pred_cond_non_loop_exit().
Referenced by build_sese_conditions().
|
static |
Call-back for dom_walk executed before visiting the dominated blocks.
References bb_in_sese_p(), bsc::cases, bsc::conditions, edge_def::flags, gbb_from_bb(), dom_walk_data::global_data, bsc::region, single_pred_cond_non_loop_exit(), and single_pred_edge().
Referenced by build_sese_conditions().
|
static |
When the result of a CLOSE_PHI is written to a memory location, return a pointer to that memory reference, otherwise return NULL_TREE.
References dr_indices_valid_in_loop(), for_each_index(), gimple_assign_lhs(), gimple_phi_arg_def(), gimple_phi_result(), and loop_containing_stmt().
Referenced by translate_scalar_reduction_to_array().
|
static |
Compare the depth of two basic_block's P1 and P2.
References d1, d2, loop_depth(), and basic_block_def::loop_father.
Referenced by graphite_sort_dominated_info().
|
static |
Returns a linear expression for tree T evaluated in PBB.
References automatically_generated_chrec_p(), poly_bb::domain, extract_affine(), pbb_loop(), and scalar_evolution_in_region().
Referenced by add_condition_to_pbb().
|
static |
Creates a zero dimension array of the same type as VAR.
References build_array_type(), build_index_type(), and create_tmp_var().
Referenced by rewrite_close_phi_out_of_ssa(), rewrite_cross_bb_scalar_deps(), rewrite_phi_out_of_ssa(), and translate_scalar_reduction_to_array().
|
static |
Detect commutative and associative scalar reductions belonging to the SCOP starting at the loop closed phi node STMT. Return the phi node of the reduction cycle, or NULL.
References detect_commutative_reduction_assign(), follow_inital_value_to_phi(), gimple_phi_arg_def(), gimple_phi_num_args(), gimple_phi_result(), has_single_use(), initial_value_for_loop_phi(), scalar_close_phi_node_p(), stmt_in_sese_p(), and used_outside_reduction().
Referenced by rewrite_commutative_reductions_out_of_ssa_close_phi().
|
static |
Detect commutative and associative scalar reductions starting at the STMT. Return the phi node of the reduction cycle, or NULL.
References follow_ssa_with_commutative_ops().
Referenced by detect_commutative_reduction_assign().
|
static |
Detect commutative and associative scalar reductions starting at STMT. Return the phi node of the reduction cycle, or NULL.
References detect_commutative_reduction_arg(), gimple_assign_lhs(), gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_num_ops(), and is_reduction_operation_p().
Referenced by detect_commutative_reduction().
|
static |
Helper function for for_each_index. For each INDEX of the data reference REF, returns true when its indices are valid in the loop nest LOOP passed in as DATA.
References CDI_DOMINATORS, dominated_by_p(), gimple_bb(), and loop::header.
Referenced by close_phi_written_to_memory().
|
static |
Check if DR1 and DR2 are in the same object set.
References DR_BASE_OBJECT, and operand_equal_p().
Referenced by build_base_obj_set_for_drs().
|
static |
Dump to file the alias graphs for the data references in DRS.
References current_function_name(), snprintf(), write_alias_graph_to_ascii_dimacs(), write_alias_graph_to_ascii_dot(), and write_alias_graph_to_ascii_ecc().
Referenced by build_scop_drs().
|
static |
Return the argument of the loop PHI that is the initial value coming from outside the loop.
References edge_def::dest, gimple_phi_arg_edge(), gimple_phi_num_args(), loop_depth(), basic_block_def::loop_father, and edge_def::src.
Referenced by translate_scalar_reduction_to_array().
|
static |
Extract an affine expression from the tree E in the scop S.
References chrec_dont_know, extract_affine(), extract_affine_chrec(), extract_affine_int(), extract_affine_mul(), extract_affine_name(), parameter_index_in_region_1(), type(), and wrap().
|
static |
Extract an affine expression from the chain of recurrence E.
References extract_affine(), get_chrec_loop(), scop::region, and sese_loop_depth().
Referenced by extract_affine().
|
static |
Extract an affine expression from the gmp constant G.
References dom.
Referenced by build_loop_iteration_domains(), and extract_affine_int().
|
static |
Extract an affine expression from the integer_cst E.
References extract_affine_gmp(), g, and tree_int_to_gmp().
Referenced by extract_affine(), and pdr_add_data_dimensions().
|
static |
Extract an affine expression from the mult_expr E.
References extract_affine().
Referenced by extract_affine().
|
static |
Extract an affine expression from the ssa_name E.
References dom, and isl_id_for_ssa_name().
Referenced by extract_affine().
|
static |
Find parameters with respect to REGION in BB. We are looking in memory access functions, conditions and loop bounds.
References DR_ACCESS_FN, DR_NUM_DIMENSIONS, gimple_cond_lhs(), gimple_cond_rhs(), scalar_evolution_in_region(), scan_tree_for_params(), and data_reference::stmt.
Referenced by find_scop_parameters().
|
static |
Record the parameters used in the SCOP. A variable is a parameter in a scop if it does not vary during the execution of that scop.
References chrec_contains_symbols(), scop::context, scop::ctx, find_params_in_bb(), isl_id_for_ssa_name(), number_of_latch_executions(), scalar_evolution_in_region(), scan_tree_for_params(), scop_set_nb_params(), and sese_nb_params().
Referenced by build_poly_scop().
|
static |
Return a loop phi node that corresponds to a reduction containing LHS.
References phi_contains_arg().
Referenced by detect_commutative_reduction().
|
static |
Return a loop phi node that corresponds to a reduction containing LHS.
References gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_num_ops(), is_gimple_assign(), is_reduction_operation_p(), and phi_contains_arg().
Referenced by detect_commutative_reduction_arg().
|
static |
References base_alias_pair::alias_set, data_reference::aux, and free().
Referenced by free_gimple_bb().
|
static |
Frees GBB.
References free_data_refs(), and free_data_refs_aux().
Referenced by build_scop_drs(), and remove_gbbs_in_scop().
void free_scops | ( | ) |
Deletes all scops in SCOPS.
References free_scop(), free_sese(), and remove_gbbs_in_scop().
|
static |
Sort the basic blocks from DOM such that the first are the ones at a deepest loop level.
References compare_bb_depths().
Referenced by build_scop_bbs_1().
|
static |
Return a gsi at the position of the phi node STMT.
References gimple_bb(), gsi_end_p(), gsi_next(), gsi_start_phis(), and gsi_stmt().
Referenced by remove_phi().
|
static |
For every definition DEF in the SCOP that is used outside the scop, insert a closing-scop definition in the basic block just after this SCOP.
References bb_in_sese_p(), create_tmp_reg(), gsi_after_labels(), gsi_insert_before(), GSI_SAME_STMT, make_ssa_name(), and update_stmt().
Referenced by rewrite_cross_bb_scalar_deps().
|
static |
Return the argument of the loop PHI that is the initial value coming from outside the loop.
References edge_def::dest, gimple_phi_arg_def(), gimple_phi_arg_edge(), gimple_phi_num_args(), loop_depth(), basic_block_def::loop_father, and edge_def::src.
Referenced by detect_commutative_reduction(), and translate_scalar_reduction_to_array().
|
static |
Insert the assignment "RES := EXPR" just after AFTER_STMT.
References analyze_drs_in_stmts(), force_gimple_operand(), gimple_seq_add_stmt(), gsi_after_labels(), gsi_end_p(), gsi_for_stmt(), gsi_insert_seq_after(), gsi_insert_seq_before(), GSI_NEW_STMT, gsi_next(), gsi_stmt(), and unshare_expr().
Referenced by rewrite_close_phi_out_of_ssa(), rewrite_cross_bb_scalar_deps(), rewrite_phi_out_of_ssa(), and translate_scalar_reduction_to_array().
|
static |
Insert on edge E the assignment "RES := EXPR".
References analyze_drs_in_stmts(), bb_in_sese_p(), force_gimple_operand(), gbb_from_bb(), gimple_bb(), gimple_seq_add_stmt(), gsi_commit_edge_inserts(), gsi_end_p(), gsi_insert_seq_on_edge(), gsi_next(), gsi_stmt(), new_pbb_from_pbb(), pbb_from_bb(), edge_def::src, and unshare_expr().
Referenced by rewrite_close_phi_out_of_ssa(), rewrite_phi_out_of_ssa(), and translate_scalar_reduction_to_array().
|
static |
Insert STMT at the end of the STMTS sequence and then insert the statements from STMTS at INSERT_GSI and call analyze_drs_in_stmts on STMTS.
References analyze_drs_in_stmts(), gimple_seq_add_stmt(), gsi_bb(), gsi_end_p(), gsi_insert_seq_before(), gsi_next(), GSI_SAME_STMT, and gsi_stmt().
Referenced by rewrite_close_phi_out_of_ssa(), rewrite_cross_bb_scalar_dependence(), rewrite_phi_out_of_ssa(), and translate_scalar_reduction_to_array_for_stmt().
|
inlinestatic |
Return true when stmt is a reduction operation.
References associative_tree_code(), commutative_tree_code(), gimple_assign_rhs_code(), and is_gimple_assign().
Referenced by detect_commutative_reduction_assign(), and follow_ssa_with_commutative_ops().
|
static |
Return an ISL identifier for the data reference DR.
References scop::ctx.
Referenced by build_poly_dr().
|
static |
Return an ISL identifier for the polyhedral basic block PBB.
References scop::ctx, pbb_index(), and snprintf().
Referenced by build_scop_iteration_domain().
|
static |
Return an ISL identifier from the name of the ssa_name E.
References scop::ctx, get_name(), and snprintf().
Referenced by extract_affine_name(), and find_scop_parameters().
|
static |
Return the number of data references in BB that write in memory.
References gimple_vdef(), gsi_end_p(), gsi_next(), gsi_start_bb(), and gsi_stmt().
Referenced by split_reduction_stmt().
|
static |
Returns the number of pbbs that are in loops contained in SCOP.
References gbb_loop(), and loop_in_sese_p().
Referenced by build_poly_scop().
|
static |
Store the GRAPHITE representation of BB.
References basic_block_def::aux, and gimple_bb::bb.
Referenced by new_pbb_from_pbb(), and try_generate_gimple_bb().
|
static |
Creates a poly_bb_p for basic_block BB from the existing PBB.
References poly_bb::domain, new_gimple_bb(), and new_poly_bb().
Referenced by insert_out_of_ssa_copy_on_edge(), and split_pbb().
|
static |
Same as outermost_loop_in_sese, returns the outermost loop containing BB in REGION, but makes sure that the returned loop belongs to the REGION, and so this returns the first loop in the REGION when the loop containing BB does not belong to REGION.
References loop::inner, loop_in_sese_p(), loop::next, and outermost_loop_in_sese().
Referenced by analyze_drs_in_stmts(), and try_generate_gimple_bb().
|
static |
When the parameter NAME is in REGION, returns its index in SESE_PARAMS. Otherwise this function inserts NAME in SESE_PARAMS and returns the index of NAME.
References parameter_index_in_region_1().
Referenced by scan_tree_for_params().
|
inlinestatic |
When parameter NAME is in REGION, returns its index in SESE_PARAMS. Otherwise returns -1.
Referenced by extract_affine(), and parameter_index_in_region().
|
static |
Add a constrain to the ACCESSES polyhedron for the alias set of data reference DR. ACCESSP_NB_DIMS is the dimension of the ACCESSES polyhedron, DOM_NB_DIMS is the dimension of the iteration domain.
References base_alias_pair::alias_set, and data_reference::aux.
Referenced by build_poly_dr().
|
static |
Add constrains representing the size of the accessed data to the ACCESSES polyhedron. ACCESSP_NB_DIMS is the dimension of the ACCESSES polyhedron, DOM_NB_DIMS is the dimension of the iteration domain.
References array_at_struct_end_p(), array_ref_low_bound(), array_ref_up_bound(), scop::context, DR_NUM_DIMENSIONS, DR_REF, extract_affine_int(), host_integerp(), and operand_equal_p().
Referenced by build_poly_dr().
|
static |
Add to ACCESSES polyhedron equalities defining the access functions to the memory. ACCESSP_NB_DIMS is the dimension of the ACCESSES polyhedron, DOM_NB_DIMS is the dimension of the iteration domain. PBB is the poly_bb_p that contains the data reference DR.
References DR_ACCESS_FN, DR_NUM_DIMENSIONS, extract_affine(), and set_index().
Referenced by build_poly_dr().
|
static |
Returns the index of the PHI argument defined in the outermost loop.
References flow_bb_inside_loop_p(), gimple_bb(), gimple_phi_arg_edge(), gimple_phi_num_args(), basic_block_def::loop_father, and edge_def::src.
Referenced by remove_invariant_phi(), and remove_simple_copy_phi().
|
static |
Returns true when PHI contains an argument ARG.
References gimple_phi_arg_def(), gimple_phi_num_args(), and operand_equal_p().
Referenced by follow_inital_value_to_phi(), and follow_ssa_with_commutative_ops().
|
static |
For a definition DEF in REGION, propagates the expression EXPR in all the uses of DEF outside REGION.
References bb_in_sese_p(), force_gimple_operand(), gsi_commit_edge_inserts(), gsi_insert_seq_on_edge(), is_gimple_debug(), operand_equal_p(), replace_exp(), unshare_expr(), and update_stmt().
Referenced by rewrite_close_phi_out_of_ssa(), and rewrite_cross_bb_scalar_deps().
|
static |
Returns true when the phi node at position PSI is a reduction phi node in REGION. Otherwise moves the pointer PSI to the next phi to be considered.
References evolution_function_is_invariant_p(), gimple_phi_result(), gsi_next(), gsi_stmt(), loop_containing_stmt(), loop::num, remove_invariant_phi(), remove_simple_copy_phi(), scalar_evolution_in_region(), scev_analyzable_p(), and simple_copy_phi_p().
Referenced by rewrite_reductions_out_of_ssa().
|
static |
|
static |
Removes an invariant phi node at position PSI by inserting on the loop ENTRY edge the assignment RES = INIT.
References force_gimple_operand(), gimple_phi_arg_def(), gimple_phi_arg_edge(), gimple_phi_result(), gimple_seq_add_stmt(), gsi_commit_edge_inserts(), gsi_insert_seq_on_edge(), gsi_stmt(), loop_containing_stmt(), phi_arg_in_outermost_loop(), remove_phi_node(), scalar_evolution_in_region(), and tree_contains_chrecs().
Referenced by reduction_phi_p().
|
static |
Removes the PHI node and resets all the debug stmts that are using the PHI_RESULT.
References gimple_debug_bind_reset_value(), gsi_for_phi_node(), is_gimple_debug(), remove_phi_node(), and update_stmt().
Referenced by translate_scalar_reduction_to_array().
|
static |
Removes a simple copy phi node "RES = phi (INIT, RES)" at position PSI by inserting on the loop ENTRY edge assignment "RES = INIT".
References gimple_phi_arg_def(), gimple_phi_arg_edge(), gimple_phi_result(), gsi_insert_on_edge_immediate(), gsi_stmt(), phi_arg_in_outermost_loop(), and remove_phi_node().
Referenced by reduction_phi_p().
|
static |
Rewrite out of SSA the reduction phi node at PSI by creating a zero dimension array for it.
References compute_overall_effect_of_inner_loop(), create_zero_dim_array(), gimple_bb(), gimple_phi_arg_def(), gimple_phi_num_args(), gimple_phi_result(), gsi_after_labels(), gsi_insert_before(), GSI_NEW_STMT, gsi_next(), gsi_stmt(), insert_out_of_ssa_copy(), insert_out_of_ssa_copy_on_edge(), insert_stmts(), is_gimple_min_invariant(), loop_containing_stmt(), basic_block_def::loop_father, loop_in_sese_p(), propagate_expr_outside_region(), remove_phi_node(), scalar_evolution_in_region(), scev_analyzable_p(), single_pred_edge(), tree_does_not_contain_chrecs(), and unshare_expr().
Referenced by rewrite_cross_bb_scalar_deps(), and rewrite_reductions_out_of_ssa().
|
static |
Rewrites all the commutative reductions from SCOP out of SSA.
References changed, gsi_commit_edge_inserts(), loop_in_sese_p(), rewrite_commutative_reductions_out_of_ssa_loop(), scev_reset_htab(), update_ssa(), and verify_loop_closed_ssa().
Referenced by build_poly_scop().
|
static |
Rewrites out of SSA a commutative reduction at CLOSE_PHI. Returns true when something has been changed.
References detect_commutative_reduction(), and translate_scalar_reduction_to_array().
Referenced by rewrite_commutative_reductions_out_of_ssa_loop().
Rewrites all the commutative reductions from LOOP out of SSA. Returns true when something has been changed.
References changed, edge_def::dest, gimple_phi_result(), gsi_end_p(), gsi_next(), gsi_start_phis(), gsi_stmt(), rewrite_commutative_reductions_out_of_ssa_close_phi(), scev_analyzable_p(), single_exit(), and virtual_operand_p().
Referenced by rewrite_commutative_reductions_out_of_ssa().
|
static |
Rewrite the scalar dependence of DEF used in USE_STMT with a memory read from ZERO_DIM_ARRAY.
References copy_ssa_name(), gimple_assign_set_lhs(), gsi_for_stmt(), insert_stmts(), operand_equal_p(), replace_exp(), and update_stmt().
Referenced by rewrite_cross_bb_scalar_deps().
|
static |
Rewrite the scalar dependences crossing the boundary of the BB containing STMT with an array. Return true when something has been changed.
References create_zero_dim_array(), gimple_assign_lhs(), gimple_bb(), gimple_call_lhs(), gsi_for_stmt(), gsi_next(), gsi_stmt(), handle_scalar_deps_crossing_scop_limits(), insert_out_of_ssa_copy(), is_gimple_debug(), is_gimple_reg(), loop_containing_stmt(), propagate_expr_outside_region(), rewrite_close_phi_out_of_ssa(), rewrite_cross_bb_scalar_dependence(), rewrite_phi_out_of_ssa(), scalar_close_phi_node_p(), scalar_evolution_in_region(), scev_analyzable_p(), and tree_contains_chrecs().
Referenced by rewrite_cross_bb_scalar_deps_out_of_ssa().
|
static |
Rewrite out of SSA all the reduction phi nodes of SCOP.
References bb_in_sese_p(), changed, gsi_end_p(), gsi_next(), gsi_start_bb(), rewrite_cross_bb_scalar_deps(), scev_reset_htab(), split_edge(), update_ssa(), and verify_loop_closed_ssa().
Referenced by build_poly_scop().
|
static |
Rewrite the degenerate phi node at position PSI from the degenerate form "x = phi (y, y, ..., y)" to "x = y".
References degenerate_phi_result(), gimple_bb(), gimple_phi_result(), gsi_after_labels(), gsi_insert_before(), GSI_NEW_STMT, gsi_stmt(), and remove_phi_node().
Referenced by rewrite_reductions_out_of_ssa().
|
static |
Rewrite out of SSA the reduction phi node at PSI by creating a zero dimension array for it.
References create_zero_dim_array(), gimple_bb(), gimple_phi_arg_def(), gimple_phi_arg_edge(), gimple_phi_num_args(), gimple_phi_result(), gsi_after_labels(), gsi_stmt(), insert_out_of_ssa_copy(), insert_out_of_ssa_copy_on_edge(), insert_stmts(), loop::latch, basic_block_def::loop_father, remove_phi_node(), edge_def::src, and unshare_expr().
Referenced by rewrite_cross_bb_scalar_deps(), and rewrite_reductions_out_of_ssa().
|
static |
Rewrite out of SSA all the reduction phi nodes of SCOP.
References bb_in_sese_p(), degenerate_phi_result(), gimple_phi_num_args(), gimple_phi_result(), gsi_end_p(), gsi_next(), gsi_start_phis(), gsi_stmt(), reduction_phi_p(), rewrite_close_phi_out_of_ssa(), rewrite_degenerate_phi(), rewrite_phi_out_of_ssa(), scalar_close_phi_node_p(), update_ssa(), verify_loop_closed_ssa(), and virtual_operand_p().
Referenced by build_poly_scop().
|
static |
Returns true when PHI is a loop close phi node.
References gimple_phi_num_args(), gimple_phi_result(), and virtual_operand_p().
Referenced by detect_commutative_reduction(), rewrite_cross_bb_scalar_deps(), and rewrite_reductions_out_of_ssa().
|
static |
In the context of sese S, scan the expression E and translate it to a linear expression C. When parsing a symbolic multiplication, K represents the constant multiplier of an expression containing parameters.
References chrec_contains_symbols(), chrec_dont_know, and parameter_index_in_region().
Referenced by find_params_in_bb(), and find_scop_parameters().
|
static |
Can all ivs be represented by a signed integer? As CLooG might generate negative values in its expressions, signed loop ivs are required in the backend.
References gsi_end_p(), gsi_next(), gsi_start_phis(), gsi_stmt(), loop::header, and loop_in_sese_p().
Referenced by build_poly_scop().
|
static |
Assign the affine expression INDEX to the output dimension POS of MAP and return the result.
References len.
Referenced by pdr_add_memory_accesses().
|
inlinestatic |
Returns true when the phi node at PSI is of the form "a = phi (a, x)".
References gimple_phi_arg_def(), gimple_phi_num_args(), and gimple_phi_result().
Referenced by reduction_phi_p().
|
static |
Returns a COND_EXPR statement when BB has a single predecessor, the edge between BB and its predecessor is not a loop exit edge, and the last statement of the single predecessor is a COND_EXPR.
References last_stmt(), loop_depth(), basic_block_def::loop_father, single_pred_edge(), single_pred_p(), and edge_def::src.
Referenced by build_sese_conditions_after(), and build_sese_conditions_before().
|
static |
Splits at STMT the basic block BB represented as PBB in the polyhedral form.
References edge_def::dest, new_pbb_from_pbb(), and split_block().
Referenced by split_reduction_stmt().
|
static |
Splits STMT out of its current BB. This is done for reduction statements for which we want to ignore data dependences.
References edge_def::dest, DR_STMT, gbb_from_bb(), gimple_bb(), gsi_last_bb(), gsi_one_before_end_p(), gsi_prev(), gsi_start_nondebug_bb(), gsi_stmt(), nb_data_writes_in_bb(), pbb_from_bb(), and split_pbb().
Referenced by translate_scalar_reduction_to_array().
|
static |
Rewrite out of SSA the reduction described by the loop phi nodes IN, and the close phi nodes OUT. IN and OUT are structured by loop levels like this: IN: stmt, loop_n, ..., loop_0 OUT: stmt, close_n, ..., close_0 the first element is the reduction statement, and the next elements are the loop and close phi nodes of each of the outer loops.
References close_phi_written_to_memory(), create_zero_dim_array(), edge_initial_value_for_loop_phi(), gimple_assign_lhs(), gimple_phi_result(), initial_value_for_loop_phi(), insert_out_of_ssa_copy(), insert_out_of_ssa_copy_on_edge(), pbb_from_bb(), remove_phi(), split_reduction_stmt(), translate_scalar_reduction_to_array_for_stmt(), and unshare_expr().
Referenced by rewrite_commutative_reductions_out_of_ssa_close_phi().
|
static |
Translate the scalar reduction statement STMT to an array RED knowing that its recursive phi node is LOOP_PHI.
References gimple_assign_lhs(), gimple_phi_result(), gsi_after_labels(), gsi_for_stmt(), gsi_next(), insert_stmts(), and unshare_expr().
Referenced by translate_scalar_reduction_to_array().
|
inlinestatic |
@verbatim Conversion of SESE regions to Polyhedra.
Copyright (C) 2009-2013 Free Software Foundation, Inc. Contributed by Sebastian Pop sebas. 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/.
Assigns to RES the value of the INTEGER_CST T.
References mpz_set_double_int(), and tree_to_double_int().
Referenced by add_param_constraints(), build_loop_iteration_domains(), and extract_affine_int().
|
static |
Generates a polyhedral black box only if the bb contains interesting information.
References graphite_find_data_references_in_stmt(), gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_stmt(), is_gimple_debug(), loop_containing_stmt(), loop_in_sese_p(), new_gimple_bb(), outermost_loop_in_sese_1(), and data_reference::stmt.
Referenced by build_scop_bbs_1().
|
static |
Returns true when DEF is used outside the reduction cycle of LOOP_PHI.
References flow_bb_inside_loop_p(), is_gimple_debug(), and loop_containing_stmt().
Referenced by detect_commutative_reduction().
|
static |
Compute pwaff mod 2^width.
Referenced by extract_affine(), and gimplify_modify_expr_rhs().
|
inlinestatic |
Write to FILE the alias graph of data references in DIMACS format.
References dr_may_alias_p().
Referenced by dump_alias_graphs().
|
inlinestatic |
Write to FILE the alias graph of data references in DOT format.
References dr_may_alias_p().
Referenced by dump_alias_graphs().
|
inlinestatic |
Write to FILE the alias graph of data references in ECC format.
References dr_may_alias_p().
Referenced by dump_alias_graphs().