GCC Middle and Back End API Reference
|
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "tree.h"
#include "gimple.h"
#include "cfghooks.h"
#include "tree-pass.h"
#include "ssa.h"
#include "cgraph.h"
#include "gimple-pretty-print.h"
#include "fold-const.h"
#include "gimplify.h"
#include "gimple-iterator.h"
#include "gimplify-me.h"
#include "gimple-walk.h"
#include "stor-layout.h"
#include "tree-nested.h"
#include "tree-cfg.h"
#include "tree-ssa-loop-ivopts.h"
#include "tree-ssa-loop-manip.h"
#include "tree-ssa-loop-niter.h"
#include "tree-ssa-loop.h"
#include "tree-into-ssa.h"
#include "cfgloop.h"
#include "tree-scalar-evolution.h"
#include "langhooks.h"
#include "tree-vectorizer.h"
#include "tree-hasher.h"
#include "tree-parloops.h"
#include "omp-general.h"
#include "omp-low.h"
#include "tree-ssa.h"
#include "tree-ssa-alias.h"
#include "tree-eh.h"
#include "gomp-constants.h"
#include "tree-dfa.h"
#include "stringpool.h"
#include "attribs.h"
Data Structures | |
struct | reduction_info |
struct | reduction_hasher |
struct | name_to_copy_elt |
struct | name_to_copy_hasher |
struct | lambda_trans_matrix_s |
struct | elv_data |
struct | clsn_data |
Macros | |
#define | INCLUDE_MEMORY |
#define | MIN_PER_THREAD param_parloops_min_per_thread |
#define | LTM_MATRIX(T) |
#define | LTM_ROWSIZE(T) |
#define | LTM_COLSIZE(T) |
#define | LTM_DENOMINATOR(T) |
Typedefs | |
typedef hash_table< reduction_hasher > | reduction_info_table_type |
typedef hash_table< name_to_copy_hasher > | name_to_copy_table_type |
typedef struct lambda_trans_matrix_s * | lambda_trans_matrix |
#define INCLUDE_MEMORY |
Loop autoparallelization. Copyright (C) 2006-2024 Free Software Foundation, Inc. Contributed by Sebastian Pop <pop@cri.ensmp.fr> Zdenek Dvorak <dvorakz@suse.cz> and Razya Ladelsky <razya@il.ibm.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/>.
#define LTM_COLSIZE | ( | T | ) |
Referenced by lambda_trans_matrix_new(), and lambda_transform_legal_p().
#define LTM_DENOMINATOR | ( | T | ) |
Referenced by lambda_trans_matrix_new().
#define LTM_MATRIX | ( | T | ) |
Referenced by lambda_trans_matrix_new(), lambda_transform_legal_p(), and loop_parallel_p().
#define LTM_ROWSIZE | ( | T | ) |
Referenced by lambda_trans_matrix_new(), and lambda_transform_legal_p().
#define MIN_PER_THREAD param_parloops_min_per_thread |
Minimal number of iterations of a loop that should be executed in each thread.
Referenced by gen_parallel_loop(), and parallelize_loops().
typedef struct lambda_trans_matrix_s * lambda_trans_matrix |
A transformation matrix, which is a self-contained ROWSIZE x COLSIZE matrix. Rather than use floats, we simply keep a single DENOMINATOR that represents the denominator for every element in the matrix.
int add_field_for_name | ( | name_to_copy_elt ** | slot, |
tree | type ) |
Callback for htab_traverse. Adds a field corresponding to a ssa name described in SLOT. The type is passed in DATA.
References build_decl(), name_to_copy_elt::field, insert_field_into_struct(), ssa_name, SSA_NAME_IDENTIFIER, TREE_TYPE, UNKNOWN_LOCATION, and name_to_copy_elt::version.
Referenced by separate_decls_in_region().
int add_field_for_reduction | ( | reduction_info ** | slot, |
tree | type ) |
Callback for htab_traverse. Adds a field corresponding to the reduction specified in SLOT. The type is passed in DATA.
References build_decl(), reduction_info::field, gimple_location(), insert_field_into_struct(), reduction_info::reduc_stmt, reduc_stmt_res(), SSA_NAME_IDENTIFIER, and TREE_TYPE.
Referenced by separate_decls_in_region().
|
static |
Create a reduction_info struct, initialize it with REDUC_STMT and PHI, insert it to the REDUCTION_LIST.
References dump_file, dump_flags, hash_table< Descriptor, Lazy, Allocator >::find_slot(), gcc_assert, gimple_assign_rhs_code(), gimple_phi_result(), PHI_ARG_DEF, print_gimple_stmt(), reduction_info::reduc_phi, reduction_info::reduc_stmt, reduction_info::reduc_version, reduction_info::reduction_code, SSA_NAME_DEF_STMT, SSA_NAME_VERSION, and TDF_DETAILS.
Referenced by gather_scalar_reductions().
|
static |
Create the atomic operation at the join point of the threads. REDUCTION_LIST describes the reductions in the LOOP. LD_ST_DATA describes the shared data structure where shared data is stored in and loaded from.
References create_call_for_reduction_1(), create_phi_for_local_result(), FALLTHRU_EDGE, loop::latch, clsn_data::load_bb, single_pred(), and hash_table< Descriptor, Lazy, Allocator >::traverse().
Referenced by gen_parallel_loop().
int create_call_for_reduction_1 | ( | reduction_info ** | slot, |
struct clsn_data * | clsn_data ) |
Callback for htab_traverse. Create an atomic instruction for the reduction described in SLOT. DATA annotates the place in memory the atomic operation relates to, and the basic block it needs to be generated in.
References build3(), build_addr(), build_simple_mem_ref, create_tmp_var, reduction_info::field, fold_build2, force_gimple_operand_gsi(), gcc_assert, gimple_build_omp_atomic_load(), gimple_build_omp_atomic_store(), gimple_vdef(), gimple_vuse(), GSI_CONTINUE_LINKING, gsi_for_stmt(), gsi_insert_after(), gsi_last_bb(), GSI_NEW_STMT, gsi_remove(), gsi_start_bb(), gsi_stmt(), reduction_info::keep_res, clsn_data::load, clsn_data::load_bb, make_ssa_name(), reduction_info::new_phi, NULL_TREE, OMP_MEMORY_ORDER_RELAXED, PHI_RESULT, reduction_info::reduc_addr, reduction_info::reduc_phi, reduction_info::reduction_code, replace_uses_by(), single_imm_use(), split_block(), SSA_NAME_DEF_STMT, and TREE_TYPE.
Referenced by create_call_for_reduction().
|
static |
Load the reduction result that was stored in LD_ST_DATA. REDUCTION_LIST describes the list of reductions that the loads should be generated for.
References build_fold_addr_expr, create_loads_for_reductions(), gimple_build_assign(), gsi_after_labels(), gsi_insert_before(), GSI_NEW_STMT, clsn_data::load, clsn_data::load_bb, clsn_data::store, and hash_table< Descriptor, Lazy, Allocator >::traverse().
Referenced by separate_decls_in_region().
int create_loads_and_stores_for_name | ( | name_to_copy_elt ** | slot, |
struct clsn_data * | clsn_data ) |
Callback for htab_traverse. Creates loads to a field of LOAD in LOAD_BB and store to a field of STORE in STORE_BB for the ssa name and its duplicate specified in SLOT.
References build3(), build_simple_mem_ref, name_to_copy_elt::field, gimple_build_assign(), gsi_insert_after(), gsi_last_bb(), GSI_NEW_STMT, clsn_data::load, clsn_data::load_bb, name_to_copy_elt::new_name, NULL_TREE, ssa_name, clsn_data::store, clsn_data::store_bb, TREE_TYPE, and name_to_copy_elt::version.
Referenced by separate_decls_in_region().
int create_loads_for_reductions | ( | reduction_info ** | slot, |
struct clsn_data * | clsn_data ) |
Callback for htab_traverse. Loads the final reduction value at the join point of all threads, and inserts it in the right place.
References build3(), build_simple_mem_ref, reduction_info::field, gcc_unreachable, gimple_bb(), gimple_build_assign(), gsi_after_labels(), gsi_end_p(), gsi_insert_after(), GSI_NEW_STMT, gsi_next(), gsi_start_phis(), gsi_stmt(), reduction_info::keep_res, clsn_data::load, clsn_data::load_bb, NULL, NULL_TREE, PHI_RESULT, reduction_info::reduc_stmt, reduc_stmt_res(), remove_phi_node(), and TREE_TYPE.
Referenced by create_final_loads_for_reduction().
|
static |
Creates and returns an empty function that will receive the body of a parallelized loop.
References allocate_struct_function(), ASM_FORMAT_PRIVATE_NAME, BLOCK_SUPERCONTEXT, build_decl(), build_function_type_list(), cfun, clean_symbol_name(), current_function_name(), function::decl, DECL_ARG_TYPE, DECL_ARGUMENTS, DECL_ARTIFICIAL, DECL_CONTEXT, DECL_EXTERNAL, DECL_FUNCTION_SPECIFIC_OPTIMIZATION, DECL_FUNCTION_SPECIFIC_TARGET, DECL_IGNORED_P, DECL_INITIAL, DECL_RESULT, DECL_UNINLINABLE, get_identifier(), LOCATION_LOCUS, make_node(), NULL_TREE, ptr_type_node, set_cfun(), TREE_PUBLIC, TREE_STATIC, TREE_USED, type(), and void_type_node.
Referenced by gen_parallel_loop().
|
static |
Create the parallel constructs for LOOP as described in gen_parallel_loop. LOOP_FN and DATA are the arguments of GIMPLE_OMP_PARALLEL. NEW_DATA is the variable that should be initialized from the argument of LOOP_FN. N_THREADS is the requested number of threads, which can be 0 if that number is to be determined later.
References add_phi_arg(), as_a(), build2(), build_fold_addr_expr, build_int_cst(), build_omp_clause(), calculate_dominance_info(), CDI_DOMINATORS, cfun, copy_ssa_name(), DECL_ARGUMENTS, DECL_ATTRIBUTES, end(), extract_true_false_edges_from_block(), fold_convert, free_dominance_info(), gcc_assert, gcc_checking_assert, gcc_unreachable, get_identifier(), GF_OMP_FOR_KIND_FOR, GF_OMP_FOR_KIND_OACC_LOOP, gimple_bb(), gimple_build_assign(), gimple_build_omp_continue(), gimple_build_omp_for(), gimple_build_omp_parallel(), gimple_build_omp_return(), gimple_cond_code(), gimple_cond_lhs(), gimple_cond_rhs(), gimple_cond_set_lhs(), gimple_omp_for_set_cond(), gimple_omp_for_set_final(), gimple_omp_for_set_incr(), gimple_omp_for_set_index(), gimple_omp_for_set_initial(), gimple_phi_arg_location_from_edge(), gimple_set_location(), gsi_after_labels(), gsi_end_p(), gsi_insert_after(), gsi_insert_before(), gsi_last_bb(), gsi_last_nondebug_bb(), GSI_NEW_STMT, gsi_next(), gsi_remove(), GSI_SAME_STMT, gsi_start_phis(), gsi_stmt(), profile_probability::guessed_never(), loop::header, integer_type_node, loop::latch, lookup_attribute(), loop_latch_edge(), loop_preheader_edge(), make_edge(), make_single_succ_edge(), make_ssa_name(), NULL, NULL_TREE, OMP_CLAUSE_GANG, OMP_CLAUSE_NUM_THREADS, OMP_CLAUSE_NUM_THREADS_EXPR, OMP_CLAUSE_SCHEDULE, OMP_CLAUSE_SCHEDULE_AUTO, OMP_CLAUSE_SCHEDULE_CHUNK_EXPR, OMP_CLAUSE_SCHEDULE_DYNAMIC, OMP_CLAUSE_SCHEDULE_GUIDED, OMP_CLAUSE_SCHEDULE_KIND, OMP_CLAUSE_SCHEDULE_RUNTIME, OMP_CLAUSE_SCHEDULE_STATIC, PARLOOPS_SCHEDULE_AUTO, PARLOOPS_SCHEDULE_DYNAMIC, PARLOOPS_SCHEDULE_GUIDED, PARLOOPS_SCHEDULE_RUNTIME, PARLOOPS_SCHEDULE_STATIC, PENDING_STMT, PHI_ARG_DEF_FROM_EDGE, PHI_ARG_DEF_PTR_FROM_EDGE, redirect_edge_and_branch(), rescan_loop_exit(), SET_USE, single_dom_exit(), single_pred(), single_pred_edge(), single_succ_edge(), split_edge(), split_loop_exit_edge(), SSA_NAME_DEF_STMT, SSA_NAME_VAR, tree_cons(), TREE_TYPE, and type().
Referenced by gen_parallel_loop().
int create_phi_for_local_result | ( | reduction_info ** | slot, |
class loop * | loop ) |
Callback for htab_traverse. A local result is the intermediate result computed by a single thread, or the initial value in case no iteration was executed. This function creates a phi node reflecting these values. The phi's result will be stored in NEW_PHI field of the reduction's data structure.
References add_phi_arg(), copy_ssa_name(), create_phi_node(), EDGE_PRED, FALLTHRU_EDGE, gimple_location(), reduction_info::init, loop::latch, reduction_info::new_phi, reduction_info::reduc_stmt, reduc_stmt_res(), and single_pred().
Referenced by create_call_for_reduction().
int create_stores_for_reduction | ( | reduction_info ** | slot, |
struct clsn_data * | clsn_data ) |
Callback for htab_traverse. Store the neutral value for the particular reduction's operation, e.g. 0 for PLUS_EXPR, 1 for MULT_EXPR, etc. into the reduction field. The reduction is specified in SLOT. The store information is passed in DATA.
References build3(), reduction_info::field, gimple_build_assign(), gsi_insert_after(), gsi_last_bb(), GSI_NEW_STMT, reduction_info::initial_value, NULL_TREE, reduction_info::reduc_stmt, reduc_stmt_res(), clsn_data::store, clsn_data::store_bb, and TREE_TYPE.
Referenced by separate_decls_in_region().
Eliminates the references to local variables from the single entry single exit region between the ENTRY and EXIT edges. This includes: 1) Taking address of a local variable -- these are moved out of the region (and temporary variable is created to hold the address if necessary). 2) Dereferencing a local variable -- these are replaced with indirect references.
References elv_data::decl_address, eliminate_local_variables_stmt(), elv_data::entry, FOR_EACH_VEC_ELT, gather_blocks_in_sese_region(), gimple_debug_bind_p(), elv_data::gsi, gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_stmt(), i, and is_gimple_debug().
Referenced by gen_parallel_loop().
Eliminates references to local variables in *TP out of the single entry single exit region starting at DTA->ENTRY. DECL_ADDRESS contains addresses of the references that had their address taken already. If the expression is changed, CHANGED is set to true. Callback for walk_tree.
References build_pointer_type(), build_simple_mem_ref, elv_data::changed, elv_data::decl_address, DECL_EXTERNAL, DECL_P, elv_data::entry, EXPR_P, get_base_address(), elv_data::gsi, is_gimple_val(), NULL, NULL_TREE, elv_data::reset, SSA_VAR_P, take_address_of(), TREE_CODE, TREE_OPERAND, TREE_TYPE, and type().
Referenced by eliminate_local_variables_stmt().
|
static |
Moves the references to local variables in STMT at *GSI out of the single entry single exit region starting at ENTRY. DECL_ADDRESS contains addresses of the references that had their address taken already.
References elv_data::changed, elv_data::decl_address, eliminate_local_variables_1(), elv_data::entry, gimple_build_nop(), gimple_clobber_p(), gimple_debug_bind_get_value_ptr(), gimple_debug_bind_p(), gimple_debug_bind_reset_value(), elv_data::gsi, gsi_replace(), gsi_stmt(), elv_data::info, NULL, elv_data::reset, unlink_stmt_vdef(), update_stmt(), walk_gimple_op(), and walk_tree.
Referenced by eliminate_local_variables().
Returns true if expression EXPR is not defined between ENTRY and EXIT, i.e. if all its operands are defined outside of the region.
References CDI_DOMINATORS, dominated_by_p(), elv_data::entry, gimple_bb(), is_gimple_min_invariant(), SSA_NAME_DEF_STMT, and TREE_CODE.
Referenced by separate_decls_in_region_stmt().
For PHI in loop header of LOOP, look for pattern: <bb preheader> .omp_data_i = &.omp_data_arr; addr = .omp_data_i->sum; sum_a = *addr; <bb header>: sum_b = PHI <sum_a (preheader), sum_c (latch)> and return addr. Otherwise, return NULL_TREE.
References get_omp_data_i_param(), gimple_assign_rhs1(), gimple_assign_single_p(), loop_preheader_edge(), NULL_TREE, PHI_ARG_DEF_FROM_EDGE, SSA_NAME_DEF_STMT, TREE_CODE, and TREE_OPERAND.
Referenced by try_create_reduction_list().
|
static |
Detect all reductions in the LOOP, insert them into REDUCTION_LIST.
References as_a(), build_new_reduction(), cfun, FOR_EACH_BB_FN, FOR_EACH_VEC_ELT, gcc_assert, gimple_set_uid(), gsi_end_p(), gsi_next(), gsi_start_phis(), gsi_stmt(), loop::header, i, loop::inner, hash_table< Descriptor, Lazy, Allocator >::is_empty(), vec_info::lookup_stmt(), NULL, parloops_force_simple_reduction(), gphi_iterator::phi(), PHI_RESULT, set_reduc_phi_uids(), simple_iv(), single_imm_use(), hash_table< Descriptor, Lazy, Allocator >::traverse(), valid_reduction_p(), vect_analyze_loop_form(), vect_create_loop_vinfo(), and virtual_operand_p().
Referenced by try_create_reduction_list().
|
static |
Generates code to execute the iterations of LOOP in N_THREADS threads in parallel, which can be 0 if that number is to be determined later. NITER describes number of iterations of LOOP. REDUCTION_LIST describes the reductions existent in the LOOP.
References as_a(), boolean_type_node, build_int_cst(), canonicalize_loop_ivs(), cfun, create_call_for_reduction(), create_loop_fn(), create_parallel_loop(), dump_file, dump_flags, hash_table< Descriptor, Lazy, Allocator >::elements(), eliminate_local_variables(), fold_build2, force_gimple_operand(), free_numbers_of_iterations_estimates(), free_original_copy_tables(), gcc_assert, gcc_checking_assert, gimple_cond_make_true(), gimple_location(), gsi_insert_seq_on_edge_immediate(), gsi_last_bb(), gsi_stmt(), loop::header, initialize_original_copy_tables(), initialize_reductions(), loop::inner, invert_truthvalue, hash_table< Descriptor, Lazy, Allocator >::is_empty(), is_gimple_condexpr_for_cond(), last_nondebug_stmt(), profile_probability::likely(), clsn_data::load, clsn_data::load_bb, loop_preheader_edge(), loop_version(), tree_niter_desc::may_be_zero, MIN_PER_THREAD, tree_niter_desc::niter, NULL, NULL_TREE, loop::num, num_phis(), scev_reset(), separate_decls_in_region(), single_dom_exit(), single_exit(), single_pred(), clsn_data::store, clsn_data::store_bb, TDF_DETAILS, TODO_update_ssa_no_phi, transform_to_exit_first_loop(), hash_table< Descriptor, Lazy, Allocator >::traverse(), TREE_TYPE, try_transform_to_exit_first_loop_alt(), type(), UNKNOWN_LOCATION, profile_probability::unlikely(), unshare_expr(), update_ssa(), and update_stmt().
Referenced by parallelize_loops().
|
static |
Return the default def of the first function argument.
References cfun, DECL_ARGUMENTS, DECL_CHAIN, gcc_assert, NULL_TREE, and ssa_default_def().
Referenced by find_reduc_addr(), and oacc_entry_exit_ok_1().
int initialize_reductions | ( | reduction_info ** | slot, |
class loop * | loop ) |
Callback for htab_traverse. Create the initialization statement for reduction described in SLOT, and place it at the preheader of the loop described in DATA.
References gimple_location(), reduction_info::init, reduction_info::initial_value, loop_preheader_edge(), omp_reduction_init_op(), PHI_ARG_DEF_FROM_EDGE, PHI_ARG_DEF_PTR_FROM_EDGE, PHI_RESULT, reduction_info::reduc_phi, reduction_info::reduc_stmt, reduction_info::reduction_code, SET_USE, TREE_TYPE, and type().
Referenced by gen_parallel_loop().
|
static |
Multiply a vector VEC by a matrix MAT. MAT is an M*N matrix, and VEC is a vector with length N. The result is stored in DEST which must be a vector of length M.
References i, and lambda_vector_clear().
Referenced by lambda_transform_legal_p().
|
static |
Allocate a new transformation matrix.
References lambda_matrix_new(), LTM_COLSIZE, LTM_DENOMINATOR, LTM_MATRIX, and LTM_ROWSIZE.
Referenced by loop_parallel_p().
|
static |
Return true if TRANS is a legal transformation matrix that respects the dependence vectors in DISTS and DIRS. The conservative answer is false. "Wolfe proves that a unimodular transformation represented by the matrix T is legal when applied to a loop nest with a set of lexicographically non-negative distance vectors RDG if and only if for each vector d in RDG, (T.d >= 0) is lexicographically positive. i.e.: if and only if it transforms the lexicographically positive distance vectors to lexicographically positive vectors. Note that a unimodular matrix must transform the zero vector (and only it) to the zero vector." S.Muchnick.
References chrec_dont_know, chrec_known, DDR_A, DDR_ARE_DEPENDENT, DDR_B, DDR_DIST_VECT, DDR_NUM_DIST_VECTS, DR_IS_READ, FOR_EACH_VEC_ELT, gcc_assert, i, lambda_matrix_vector_mult(), lambda_vector_lexico_pos(), lambda_vector_new(), LTM_COLSIZE, LTM_MATRIX, LTM_ROWSIZE, and NULL.
Referenced by loop_parallel_p().
Return true when LOOP contains basic blocks marked with the BB_IRREDUCIBLE_LOOP flag.
References end(), free(), get_loop_body_in_dom_order(), i, and loop::num_nodes.
Referenced by parallelize_loops().
Return true if LOOP contains phis with ADDR_EXPR in args.
References end(), free(), get_loop_body(), gimple_phi_arg_def(), gimple_phi_num_args(), gsi_end_p(), gsi_next(), gsi_start_phis(), i, loop::num_nodes, gphi_iterator::phi(), and TREE_CODE.
Referenced by parallelize_loops().
Returns true when LOOP contains vector phi nodes.
References end(), free(), get_loop_body_in_dom_order(), gsi_end_p(), gsi_next(), gsi_start_phis(), i, loop::num_nodes, gphi_iterator::phi(), PHI_RESULT, TREE_TYPE, and VECTOR_TYPE_P.
Referenced by parallelize_loops().
Data dependency analysis. Returns true if the iterations of LOOP are independent on each other (that is, if we can execute them in parallel).
References compute_data_dependences_for_loop(), dump_data_dependence_relations(), dump_file, dump_flags, end(), free_data_refs(), free_dependence_relations(), loop::inner, lambda_trans_matrix_new(), lambda_transform_legal_p(), data_dependence_relation::loop_nest, LTM_MATRIX, loop::num, and TDF_DETAILS.
Referenced by parallelize_loops().
gimple_opt_pass * make_pass_parallelize_loops | ( | gcc::context * | ctxt | ) |
|
static |
Return number of phis in bb. If COUNT_VIRTUAL_P is false, don't count the virtual phi.
References gsi_end_p(), gsi_next(), gsi_start_phis(), gphi_iterator::phi(), PHI_RESULT, and virtual_operand_p().
Referenced by gen_parallel_loop(), is_feasible_trace(), vect_find_reusable_accumulator(), and vect_transform_cycle_phi().
|
static |
Return true if the statements before and after the LOOP can be executed in parallel with the function containing the loop. Resolve conflicting stores outside LOOP by guarding them such that only a single gang executes them.
References BITMAP_ALLOC, bitmap_clear(), BITMAP_FREE, bitmap_set_bit, calculate_dominance_info(), CDI_DOMINATORS, cfun, changed, ENTRY_BLOCK_PTR_FOR_FN, free(), free_dominance_info(), get_all_dominated_blocks(), get_loop_body_in_dom_order(), i, NULL, loop::num_nodes, oacc_entry_exit_ok_1(), and oacc_entry_exit_single_gang().
Referenced by parallelize_loops().
|
static |
Return true if the bbs in REGION_BBS but not in in_loop_bbs can be executed in parallel with REGION_BBS containing the loop. Return the stores of reduction results in REDUCTION_STORES.
References ao_ref_init(), bitmap_bit_p, bitmap_set_bit, cfun, dump_file, FOR_EACH_VEC_ELT, get_base_address(), get_omp_data_i_param(), gimple_assign_lhs(), gimple_assign_load_p(), gimple_assign_rhs1(), gimple_call_internal_p(), gimple_could_trap_p(), gimple_has_side_effects(), gimple_store_p(), gimple_vdef(), gimple_vuse(), gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_stmt(), has_single_use(), i, basic_block_def::index, is_gimple_debug(), reduction_info::keep_res, NULL, operand_equal_p(), PHI_RESULT, print_gimple_stmt(), reduction_phi(), ref_conflicts_with_region(), single_imm_use(), SSA_NAME_VERSION, stmt_could_throw_p(), TREE_CODE, and TREE_OPERAND.
Referenced by oacc_entry_exit_ok().
|
static |
Find stores inside REGION_BBS and outside IN_LOOP_BBS, and guard them with gang_pos == 0, except when the stores are REDUCTION_STORES. Return true if any changes were made.
References add_phi_arg(), bitmap_bit_p, build_int_cst(), cfun, changed, copy_ssa_name(), create_phi_node(), dump_file, ENTRY_BLOCK_PTR_FOR_FN, FOR_EACH_VEC_ELT, gimple_build_call_internal(), gimple_build_cond(), gimple_call_set_lhs(), gimple_set_vuse(), gimple_store_p(), gimple_vdef(), gimple_vop(), gimple_vuse(), gsi_end_p(), gsi_insert_after(), gsi_insert_before(), gsi_last_bb(), GSI_NEW_STMT, gsi_next(), gsi_prev(), GSI_SAME_STMT, gsi_start_bb(), gsi_stmt(), profile_probability::guessed_never(), i, basic_block_def::index, integer_type_node, integer_zero_node, make_edge(), make_ssa_name(), reduction_info::new_phi, NULL_TREE, print_gimple_stmt(), replace_uses_by(), single_succ(), split_block(), split_block_after_labels(), ssa_default_def(), SSA_NAME_VERSION, and UNKNOWN_LOCATION.
Referenced by oacc_entry_exit_ok().
Detect parallel loops and generate parallel code using libgomp primitives. Returns true if some loop was parallelized, false otherwise.
References calculate_dominance_info(), loop::can_be_parallel, can_duplicate_loop_p(), CDI_DOMINATORS, cfun, changed, dump_enabled_p(), dump_file, dump_flags, dump_printf_loc(), hash_table< Descriptor, Lazy, Allocator >::empty(), estimated_loop_iterations_int(), find_loop_location(), gcc_obstack_init, gen_parallel_loop(), get_likely_max_loop_iterations_int(), loop::header, loop::in_oacc_kernels_region, basic_block_def::index, loop::inner, loop_has_blocks_with_irreducible_flag(), loop_has_phi_with_address_arg(), loop_has_vector_phi_nodes(), loop_parallel_p(), loop_preheader_edge(), MIN_PER_THREAD, MSG_OPTIMIZED_LOCATIONS, NULL, loop::num, oacc_entry_exit_ok(), oacc_get_fn_attrib(), obstack, optimize_loop_nest_for_size_p(), parallelized_function_p(), pt_solution_reset(), single_dom_exit(), TDF_DETAILS, try_create_reduction_list(), and try_get_loop_niter().
Returns true if FN was created to run in parallel.
References gcc_assert, cgraph_node::get(), NULL, and cgraph_node::parallelized_function.
Referenced by parallelize_loops().
stmt_vec_info parloops_force_simple_reduction | ( | loop_vec_info | loop_info, |
stmt_vec_info | phi_info, | ||
bool * | double_reduc, | ||
bool | need_wrapping_integral_overflow ) |
Wrapper around vect_is_simple_reduction, which will modify code in-place if it enables detection of more reductions. Arguments as there.
References parloops_is_simple_reduction(), STMT_VINFO_REDUC_DEF, and STMT_VINFO_REDUC_TYPE.
Referenced by gather_scalar_reductions().
|
static |
Function parloops_is_simple_reduction (1) Detect a cross-iteration def-use cycle that represents a simple reduction computation. We look for the following pattern: loop_header: a1 = phi < a0, a2 > a3 = ... a2 = operation (a3, a1) or a3 = ... loop_header: a1 = phi < a0, a2 > a2 = operation (a3, a1) such that: 1. operation is commutative and associative and it is safe to change the order of the computation 2. no uses for a2 in the loop (a2 is used out of the loop) 3. no uses of a1 in the loop besides the reduction operation 4. no uses of a1 outside the loop. Conditions 1,4 are tested here. Conditions 2,3 are tested in vect_mark_stmts_to_be_vectorized. (2) Detect a cross-iteration def-use cycle in nested loops, i.e., nested cycles. (3) Detect cycles of phi nodes in outer-loop vectorization, i.e., double reductions: a1 = phi < a0, a2 > inner loop (def of a3) a2 = phi < a3 > (4) Detect condition expressions, ie: for (int i = 0; i < N; i++) if (a[i] < val) ret_val = a[i];
References as_a(), associative_tree_code(), check_reduction_path(), commutative_tree_code(), COMPARISON_CLASS_P, COND_REDUCTION, dump_enabled_p(), dump_printf(), dump_printf_loc(), dyn_cast(), flow_bb_inside_loop_p(), flow_loop_nested_p(), FOLD_LEFT_REDUCTION, FOR_EACH_IMM_USE_FAST, FOR_EACH_VEC_ELT, get_gimple_rhs_class(), gimple_assign_lhs(), gimple_assign_rhs1(), gimple_assign_rhs1_ptr(), gimple_assign_rhs2(), gimple_assign_rhs2_ptr(), gimple_assign_rhs3(), gimple_assign_rhs3_ptr(), gimple_assign_rhs_code(), gimple_bb(), GIMPLE_BINARY_RHS, gimple_phi_num_args(), gimple_phi_result(), GIMPLE_TERNARY_RHS, has_zero_uses(), HONOR_NANS(), i, loop::inner, invert_tree_comparison(), is_a(), is_gimple_assign(), is_gimple_debug(), loop_latch_edge(), LOOP_VINFO_LOOP, MSG_MISSED_OPTIMIZATION, MSG_NOTE, NULL, NULL_TREE, parloops_is_slp_reduction(), parloops_needs_fold_left_reduction_p(), parloops_valid_reduction_input_p(), PHI_ARG_DEF, PHI_ARG_DEF_FROM_EDGE, PHI_RESULT, report_ploop_op(), SSA_NAME_DEF_STMT, STMT_VINFO_DEF_TYPE, swap_ssa_operands(), tcc_comparison, TREE_CODE, TREE_CODE_CLASS, TREE_CODE_REDUCTION, TREE_OPERAND, TREE_SET_CODE, TREE_TYPE, type(), types_compatible_p(), USE_STMT, vect_double_reduction_def, and vect_location.
Referenced by parloops_force_simple_reduction().
|
static |
Detect SLP reduction of the form: #a1 = phi <a5, a0> a2 = operation (a1) a3 = operation (a2) a4 = operation (a3) a5 = operation (a4) #a = phi <a5> PHI is the reduction phi node (#a1 = phi <a5, a0> above) FIRST_STMT is the first reduction stmt in the chain (a2 = operation (a1)). Return TRUE if a reduction chain was detected.
References as_a(), dump_enabled_p(), dump_printf_loc(), first_stmt(), flow_bb_inside_loop_p(), FOR_EACH_IMM_USE_FAST, gimple_assign_lhs(), gimple_assign_rhs1(), gimple_assign_rhs1_ptr(), gimple_assign_rhs2(), gimple_assign_rhs2_ptr(), gimple_assign_rhs_code(), gimple_bb(), i, is_gimple_assign(), is_gimple_debug(), LOOP_VINFO_LOOP, LOOP_VINFO_REDUCTION_CHAINS, MSG_NOTE, NULL, parloops_valid_reduction_input_p(), PHI_RESULT, REDUC_GROUP_FIRST_ELEMENT, REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE, swap_ssa_operands(), update_stmt(), USE_STMT, and vect_location.
Referenced by parloops_is_simple_reduction().
|
static |
Return true if we need an in-order reduction for operation CODE on type TYPE. NEED_WRAPPING_INTEGRAL_OVERFLOW is true if integer overflow must wrap.
References INTEGRAL_TYPE_P, operation_can_overflow(), operation_no_trapping_overflow(), SAT_FIXED_POINT_TYPE_P, SCALAR_FLOAT_TYPE_P, and TYPE_OVERFLOW_WRAPS.
Referenced by parloops_is_simple_reduction().
|
static |
DEF_STMT_INFO occurs in a loop that contains a potential reduction operation. Return true if the results of DEF_STMT_INFO are something that can be accumulated by such a reduction.
References gimple_bb(), is_gimple_assign(), is_gimple_call(), is_loop_header_bb_p(), STMT_VINFO_DEF_TYPE, vect_induction_def, and vect_internal_def.
Referenced by parloops_is_simple_reduction(), and parloops_is_slp_reduction().
References gimple_assign_lhs(), and gimple_phi_result().
Referenced by add_field_for_reduction(), create_loads_for_reductions(), create_phi_for_local_result(), and create_stores_for_reduction().
|
static |
References hash_table< Descriptor, Lazy, Allocator >::find(), gcc_assert, gimple_uid(), hash_table< Descriptor, Lazy, Allocator >::is_empty(), NULL, reduction_info::reduc_phi, and reduction_info::reduc_version.
Referenced by oacc_entry_exit_ok_1(), transform_to_exit_first_loop(), transform_to_exit_first_loop_alt(), and try_create_reduction_list().
|
static |
Return true if memory ref REF (corresponding to the stmt at GSI in REGIONS_BB[I]) conflicts with the statements in REGIONS_BB[I] after gsi, or the statements in REGIONS_BB[I + n]. REF_IS_STORE indicates if REF is a store. Ignore conflicts with SKIP_STMT.
References dump_file, gimple_vdef(), gimple_vuse(), gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_stmt(), i, print_gimple_stmt(), ref_maybe_used_by_stmt_p(), and stmt_may_clobber_ref_p_1().
Referenced by oacc_entry_exit_ok_1().
|
static |
Replace uses of NAME by VAL in block BB.
References FOR_EACH_IMM_USE_ON_STMT, FOR_EACH_IMM_USE_STMT, gimple_bb(), and SET_USE.
Referenced by transform_to_exit_first_loop_alt().
|
static |
This pass tries to distribute iterations of loops into several threads. The implementation is straightforward -- for each loop we test whether its iterations are independent, and if it is the case (and some additional conditions regarding profitability and correctness are satisfied), we add GIMPLE_OMP_PARALLEL and GIMPLE_OMP_FOR codes and let omp expansion machinery do its job. The most of the complexity is in bringing the code into shape expected by the omp expanders: -- for GIMPLE_OMP_FOR, ensuring that the loop has only one induction variable and that the exit test is at the start of the loop body -- for GIMPLE_OMP_PARALLEL, replacing the references to local addressable variables by accesses through pointers, and breaking up ssa chains by storing the values incoming to the parallelized loop to a structure passed to the new function as an argument (something similar is done in omp gimplification, unfortunately only a small part of the code can be shared). TODO: -- if there are several parallelizable loops in a function, it may be possible to generate the threads just once (using synchronization to ensure that cross-loop dependences are obeyed). -- handling of common reduction patterns for outer loops. More info can also be found at http://gcc.gnu.org/wiki/AutoParInGCC
Error reporting helper for parloops_is_simple_reduction below. GIMPLE statement STMT is printed with a message MSG.
References dump_printf_loc(), msg, and vect_location.
Referenced by parloops_is_simple_reduction().
|
static |
Moves all the variables used in LOOP and defined outside of it (including the initial values of loop phi nodes, and *PER_THREAD if it is a ssa name) to a structure created for this purpose. The code while (1) { use (a); use (b); } is transformed this way: bb0: old.a = a; old.b = b; bb1: a' = new->a; b' = new->b; while (1) { use (a'); use (b'); } `old' is stored to *ARG_STRUCT and `new' is stored to NEW_ARG_STRUCT. The pointer `new' is intentionally not initialized (the loop will be split to a separate function later, and `new' will be initialized from its arguments). LD_ST_DATA holds information about the shared data structure used to pass information among the threads. It is initialized here, and gen_parallel_loop will pass it to create_call_for_reduction that needs this information. REDUCTION_LIST describes the reductions in LOOP.
References add_field_for_name(), add_field_for_reduction(), build_decl(), build_pointer_type(), create_final_loads_for_reduction(), create_loads_and_stores_for_name(), create_stores_for_reduction(), create_tmp_var, create_tmp_var_name(), FOR_EACH_VEC_ELT, gather_blocks_in_sese_region(), gsi_end_p(), gsi_next(), gsi_remove(), gsi_start_bb(), gsi_start_phis(), gsi_stmt(), i, hash_table< Descriptor, Lazy, Allocator >::is_empty(), is_gimple_debug(), layout_type(), clsn_data::load, clsn_data::load_bb, make_ssa_name(), lang_hooks_for_types::make_type, NULL, separate_decls_in_region_debug(), separate_decls_in_region_stmt(), single_pred(), single_succ_edge(), split_edge(), clsn_data::store, clsn_data::store_bb, hash_table< Descriptor, Lazy, Allocator >::traverse(), type(), TYPE_NAME, lang_hooks::types, and UNKNOWN_LOCATION.
Referenced by gen_parallel_loop().
|
static |
Finds the ssa names used in STMT that are defined outside the region between ENTRY and EXIT and replaces such ssa names with their duplicates. The duplicates are stored to NAME_COPIES. Base decls of all ssa names used in STMT (including those defined in LOOP) are replaced with the new temporary variables; the replacement decls are stored in DECL_COPIES.
References DECL_P, DECL_UID, hash_table< Descriptor, Lazy, Allocator >::find_slot_with_hash(), FOR_EACH_PHI_OR_STMT_USE, gcc_assert, gimple_debug_bind_get_var(), gimple_debug_bind_p(), gimple_debug_bind_reset_value(), gimple_debug_bind_set_var(), gimple_debug_source_bind_get_var(), gimple_debug_source_bind_p(), gimple_debug_source_bind_set_var(), SET_USE, SSA_NAME_VERSION, SSA_OP_USE, SSA_VAR_P, int_tree_map::to, TREE_CODE, int_tree_map::uid, update_stmt(), USE_FROM_PTR, and name_to_copy_elt::version.
Referenced by separate_decls_in_region().
|
static |
If COPY_NAME_P is true, creates and returns a duplicate of NAME. The copies are stored to NAME_COPIES, if NAME was already duplicated, its duplicate stored in NAME_COPIES is returned. Regardless of COPY_NAME_P, the decl used as a base of the ssa name is also duplicated, storing the copies in DECL_COPIES.
References create_tmp_var, DECL_NOT_GIMPLE_REG_P, DECL_UID, duplicate_ssa_name(), name_to_copy_elt::field, hash_table< Descriptor, Lazy, Allocator >::find_slot_with_hash(), gcc_assert, get_name(), name_to_copy_elt::new_name, NULL, NULL_TREE, replace_ssa_name_symbol(), SSA_NAME_VAR, SSA_NAME_VERSION, int_tree_map::to, TREE_CODE, TREE_TYPE, int_tree_map::uid, and name_to_copy_elt::version.
Referenced by separate_decls_in_region_stmt().
|
static |
Finds the ssa names used in STMT that are defined outside the region between ENTRY and EXIT and replaces such ssa names with their duplicates. The duplicates are stored to NAME_COPIES. Base decls of all ssa names used in STMT (including those defined in LOOP) are replaced with the new temporary variables; the replacement decls are stored in DECL_COPIES.
References DEF_FROM_PTR, expr_invariant_in_region_p(), FOR_EACH_PHI_OR_STMT_DEF, FOR_EACH_PHI_OR_STMT_USE, gcc_assert, separate_decls_in_region_name(), SET_USE, SSA_OP_DEF, SSA_OP_USE, TREE_CODE, and USE_FROM_PTR.
Referenced by separate_decls_in_region().
int set_reduc_phi_uids | ( | reduction_info ** | slot, |
void * | data ) |
Callback for htab_traverse. Sets gimple_uid of reduc_phi stmts.
References gimple_set_uid(), reduction_info::reduc_phi, and reduction_info::reduc_version.
Referenced by gather_scalar_reductions().
|
static |
Assigns the address of OBJ in TYPE to an ssa name, and returns this name. The assignment statement is placed on edge ENTRY. DECL_ADDRESS maps decls to their addresses that can be reused. The address of OBJ is known to be invariant in the whole function. Other needed statements are placed right before GSI.
References build_addr(), build_fold_addr_expr, build_fold_addr_expr_with_type, build_simple_mem_ref, DECL_P, DECL_UID, hash_table< Descriptor, Lazy, Allocator >::find_slot(), fold_convert, force_gimple_operand(), get_name(), gimple_build_assign(), gimple_seq_empty_p(), gsi_insert_on_edge_immediate(), gsi_insert_seq_before(), GSI_SAME_STMT, handled_component_p(), make_ssa_name(), make_temp_ssa_name(), NULL, NULL_TREE, TREE_OPERAND, TREE_TYPE, int_tree_map::uid, unshare_expr(), and useless_type_conversion_p().
Referenced by eliminate_local_variables_1().
|
static |
Moves the exit condition of LOOP to the beginning of its header. NIT is the number of iterations of the loop. REDUCTION_LIST describes the reductions in LOOP.
References add_phi_arg(), as_a(), copy_ssa_name(), create_phi_node(), fold_convert, force_gimple_operand_gsi(), free(), gcc_assert, get_loop_body_in_dom_order(), gimple_build_assign(), gimple_cond_lhs(), gimple_cond_rhs(), gimple_cond_set_lhs(), gimple_duplicate_sese_tail(), gsi_after_labels(), gsi_end_p(), gsi_insert_before(), gsi_last_bb(), GSI_NEW_STMT, gsi_next(), GSI_SAME_STMT, gsi_start_phis(), loop::header, hash_table< Descriptor, Lazy, Allocator >::is_empty(), reduction_info::keep_res, NULL_TREE, PHI_ARG_DEF_FROM_EDGE, PHI_RESULT, reduction_phi(), remove_phi_node(), SET_PHI_RESULT, single_dom_exit(), single_succ(), single_succ_edge(), split_block_after_labels(), SSA_NAME_DEF_STMT, SSA_NAME_VAR, TREE_TYPE, UNKNOWN_LOCATION, update_stmt(), and virtual_operand_p().
Referenced by gen_parallel_loop().
|
static |
Do transformation from: <bb preheader>: ... goto <bb header> <bb header>: ivtmp_a = PHI <ivtmp_init (preheader), ivtmp_b (latch)> sum_a = PHI <sum_init (preheader), sum_b (latch)> ... use (ivtmp_a) ... sum_b = sum_a + sum_update ... if (ivtmp_a < n) goto <bb latch>; else goto <bb exit>; <bb latch>: ivtmp_b = ivtmp_a + 1; goto <bb header> <bb exit>: sum_z = PHI <sum_b (cond[1]), ...> [1] Where <bb cond> is single_pred (bb latch); In the simplest case, that's <bb header>. to: <bb preheader>: ... goto <bb newheader> <bb header>: ivtmp_a = PHI <ivtmp_c (latch)> sum_a = PHI <sum_c (latch)> ... use (ivtmp_a) ... sum_b = sum_a + sum_update ... goto <bb latch>; <bb newheader>: ivtmp_c = PHI <ivtmp_init (preheader), ivtmp_b (latch)> sum_c = PHI <sum_init (preheader), sum_b (latch)> if (ivtmp_c < n + 1) goto <bb header>; else goto <bb newexit>; <bb latch>: ivtmp_b = ivtmp_a + 1; goto <bb newheader> <bb newexit>: sum_y = PHI <sum_c (newheader)> <bb exit>: sum_z = PHI <sum_y (newexit), ...> In unified diff format: <bb preheader>: ... - goto <bb header> + goto <bb newheader> <bb header>: - ivtmp_a = PHI <ivtmp_init (preheader), ivtmp_b (latch)> - sum_a = PHI <sum_init (preheader), sum_b (latch)> + ivtmp_a = PHI <ivtmp_c (latch)> + sum_a = PHI <sum_c (latch)> ... use (ivtmp_a) ... sum_b = sum_a + sum_update ... - if (ivtmp_a < n) - goto <bb latch>; + goto <bb latch>; + + <bb newheader>: + ivtmp_c = PHI <ivtmp_init (preheader), ivtmp_b (latch)> + sum_c = PHI <sum_init (preheader), sum_b (latch)> + if (ivtmp_c < n + 1) + goto <bb header>; else goto <bb exit>; <bb latch>: ivtmp_b = ivtmp_a + 1; - goto <bb header> + goto <bb newheader> + <bb newexit>: + sum_y = PHI <sum_c (newheader)> <bb exit>: - sum_z = PHI <sum_b (cond[1]), ...> + sum_z = PHI <sum_y (newexit), ...> Note: the example does not show any virtual phis, but these are handled more or less as reductions. Moves the exit condition of LOOP to the beginning of its header. REDUCTION_LIST describes the reductions in LOOP. BOUND is the new loop bound.
References add_phi_arg(), as_a(), calculate_dominance_info(), CDI_DOMINATORS, copy_ssa_name(), create_phi_node(), flush_pending_stmts(), free_dominance_info(), gcc_assert, gimple_cond_lhs(), gimple_cond_set_rhs(), gimple_set_uid(), gsi_end_p(), gsi_last_bb(), gsi_next(), gsi_start_phis(), loop::header, i, reduction_info::keep_res, loop::latch, loop_preheader_edge(), NULL, gphi_iterator::phi(), PHI_ARG_DEF_FROM_EDGE, PHI_RESULT, redirect_edge_and_branch(), redirect_edge_var_map_def(), redirect_edge_var_map_vector(), reduction_info::reduc_phi, reduction_info::reduc_version, reduction_phi(), replace_uses_in_bb_by(), single_dom_exit(), single_pred_edge(), single_pred_p(), single_succ_edge(), split_block_before_cond_jump(), split_edge(), SSA_NAME_DEF_STMT, UNKNOWN_LOCATION, update_stmt(), and virtual_operand_p().
Referenced by try_transform_to_exit_first_loop_alt().
|
static |
Try to initialize REDUCTION_LIST for code generation part. REDUCTION_LIST describes the reductions.
References dump_file, dump_flags, final_value_replacement_loop(), find_reduc_addr(), flow_bb_inside_loop_p(), FOR_EACH_IMM_USE_FAST, gather_scalar_reductions(), gcc_assert, gimple_bb(), gimple_debug_bind_p(), gsi_end_p(), gsi_next(), gsi_start_phis(), loop::header, hash_table< Descriptor, Lazy, Allocator >::is_empty(), reduction_info::keep_res, NULL, NULL_TREE, gphi_iterator::phi(), PHI_ARG_DEF_FROM_EDGE, PHI_RESULT, print_generic_expr(), print_gimple_stmt(), reduction_info::reduc_addr, reduction_info::reduc_phi, reduction_info::reduc_stmt, reduction_phi(), simple_iv(), single_dom_exit(), TDF_DETAILS, TREE_CODE, USE_STMT, and virtual_operand_p().
Referenced by parallelize_loops().
|
static |
Try to initialize NITER for code generation part.
References dump_file, dump_flags, gcc_assert, number_of_iterations_exit(), single_dom_exit(), and TDF_DETAILS.
Referenced by parallelize_loops().
|
static |
Tries to moves the exit condition of LOOP to the beginning of its header without duplication of the loop body. NIT is the number of iterations of the loop. REDUCTION_LIST describes the reductions in LOOP. Return true if transformation is successful.
References as_a(), bb_seq(), build_int_cst_type(), build_one_cst(), fold_build2, fold_build2_loc(), force_gimple_operand_gsi(), gcc_assert, gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_assign_rhs_code(), gimple_bb(), gimple_cond_lhs(), gimple_phi_arg_def(), gimple_seq_nondebug_singleton_p(), GSI_CONTINUE_LINKING, gsi_last_bb(), integer_minus_onep(), is_gimple_assign(), loop::latch, loop_preheader_edge(), max_loop_iterations(), NULL, NULL_TREE, phi_nodes(), poly_int_tree_p(), single_dom_exit(), single_pred(), single_pred_p(), single_succ_edge(), SSA_NAME_DEF_STMT, wi::to_widest(), transform_to_exit_first_loop_alt(), TREE_CODE, tree_int_cst_equal(), TREE_TYPE, TYPE_MAX_VALUE, and UNKNOWN_LOCATION.
Referenced by gen_parallel_loop().
|
static |
Return true if the type of reduction performed by STMT_INFO is suitable for this pass.
References FOLD_LEFT_REDUCTION, and STMT_VINFO_REDUC_TYPE.
Referenced by gather_scalar_reductions().