aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
AgeCommit message (Collapse)AuthorFilesLines
2017-03-14alias.c (struct alias_set_entry): Pack properly.Richard Biener1-17/+17
2017-03-14 Richard Biener <rguenther@suse.de> * alias.c (struct alias_set_entry): Pack properly. * cfgloop.h (struct loop): Likewise. * cse.c (struct set): Likewise. * ipa-utils.c (struct searchc_env): Likewise. * loop-invariant.c (struct invariant): Likewise. * lra-remat.c (struct cand): Likewise. * recog.c (struct change_t): Likewise. * rtl.h (struct address_info): Likewise. * symbol-summary.h (function_summary): Likewise. * tree-loop-distribution.c (struct partition): Likewise. * tree-object-size.c (struct object_size_info): Likewise. * tree-ssa-loop-ivopts.c (struct cost_pair): Likewise. * tree-ssa-threadupdate.c (struct ssa_local_info_t): Likewise. * tree-vect-data-refs.c (struct _vect_peel_info): Likewise. * tree-vect-slp.c (struct _slp_oprnd_info): Likewise. * tree-vect-stmts.c (struct simd_call_arg_info): Likewise. * tree-vectorizer.h (struct _loop_vec_info): Likewise. (struct _stmt_vec_info): Likewise. From-SVN: r246121
2017-02-06re PR tree-optimization/79284 (ICE on valid code at -O3 on x86_64-linux-gnu: ↵Jakub Jelinek1-0/+12
verify_gimple failed) PR tree-optimization/79284 * tree-vectorizer.h (VECT_SCALAR_BOOLEAN_TYPE_P): Define. * tree-vect-stmts.c (vect_get_vec_def_for_operand, vectorizable_mask_load_store, vectorizable_operation, vect_is_simple_cond, get_same_sized_vectype): Use it instead of comparing TREE_CODE of a type against BOOLEAN_TYPE. * tree-vect-patterns.c (check_bool_pattern, search_type_for_mask_1, vect_recog_bool_pattern, vect_recog_mask_conversion_pattern): Likewise. * tree-vect-slp.c (vect_get_constant_vectors): Likewise. * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise. Remove redundant gimple_code (stmt) == GIMPLE_ASSIGN test after is_gimple_assign (stmt). Replace another such test with is_gimple_assign (stmt). testsuite/ * gcc.c-torture/compile/pr79284.c: New test. From-SVN: r245214
2017-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r243994
2016-11-16Support non-masked epilogue vectoriziationYuri Rumyantsev1-4/+15
gcc/ 2016-11-16 Yuri Rumyantsev <ysrumyan@gmail.com> * params.def (PARAM_VECT_EPILOGUES_NOMASK): New. * tree-if-conv.c (tree_if_conversion): Make public. * * tree-if-conv.h: New file. * tree-vect-data-refs.c (vect_analyze_data_ref_dependences) Avoid dynamic alias checks for epilogues. * tree-vect-loop-manip.c (vect_do_peeling): Return created epilog. * tree-vect-loop.c: include tree-if-conv.h. (new_loop_vec_info): Add zeroing orig_loop_info field. (vect_analyze_loop_2): Don't try to enhance alignment for epilogues. (vect_analyze_loop): Add argument ORIG_LOOP_INFO which is not NULL if epilogue is vectorized, set up orig_loop_info field of loop_vinfo using passed argument. (vect_transform_loop): Check if created epilogue should be returned for further vectorization with less vf. If-convert epilogue if required. Print vectorization success for epilogue. * tree-vectorizer.c (vectorize_loops): Add epilogue vectorization if it is required, pass loop_vinfo produced during vectorization of loop body to vect_analyze_loop. * tree-vectorizer.h (struct _loop_vec_info): Add new field orig_loop_info. (LOOP_VINFO_ORIG_LOOP_INFO): New. (LOOP_VINFO_EPILOGUE_P): New. (LOOP_VINFO_ORIG_VECT_FACTOR): New. (vect_do_peeling): Change prototype to return epilogue. (vect_analyze_loop): Add argument of loop_vec_info type. (vect_transform_loop): Return created loop. gcc/testsuite/ 2016-11-16 Yuri Rumyantsev <ysrumyan@gmail.com> * lib/target-supports.exp (check_avx2_hw_available): New. (check_effective_target_avx2_runtime): New. * gcc.dg/vect/vect-tail-nomask-1.c: New test. From-SVN: r242501
2016-11-07re PR middle-end/37150 (basic-block vectorization misses some unrolled loops)Richard Biener1-1/+1
2016-11-07 Richard Biener <rguenther@suse.de> PR tree-optimization/37150 * tree-vectorizer.h (vect_transform_slp_perm_load): Add n_perms parameter. * tree-vect-slp.c (vect_supported_load_permutation_p): Adjust. (vect_analyze_slp_cost_1): Account for the real number of permutations emitted and for dead loads. (vect_transform_slp_perm_load): Add n_perms parameter counting the number of emitted permutations. * tree-vect-stmts.c (vectorizable_load): Adjust. From-SVN: r241893
2016-10-13tree-vect-loop-manip.c (adjust_vec_debug_stmts): Don't release adjust_vec ↵Bin Cheng1-4/+4
automatically. * tree-vect-loop-manip.c (adjust_vec_debug_stmts): Don't release adjust_vec automatically. (slpeel_add_loop_guard): Remove param cond_expr_stmt_list. Rename param exit_bb to guard_to. (slpeel_checking_verify_cfg_after_peeling): (set_prologue_iterations): (create_lcssa_for_virtual_phi): New func which is factored out from slpeel_tree_peel_loop_to_edge. (slpeel_tree_peel_loop_to_edge): (iv_phi_p): New func. (vect_can_advance_ivs_p): Call iv_phi_p. (vect_update_ivs_after_vectorizer): Call iv_phi_p. Directly insert new gimple stmts in basic block. (vect_do_peeling_for_loop_bound): (vect_do_peeling_for_alignment): (vect_gen_niters_for_prolog_loop): Rename to... (vect_gen_prolog_loop_niters): ...Rename from. Change parameters and adjust implementation. (vect_update_inits_of_drs): Fix code style issue. Convert niters to sizetype if necessary. (vect_build_loop_niters): Move to here from tree-vect-loop.c. Change it to external function. (vect_gen_scalar_loop_niters, vect_gen_vector_loop_niters): New. (vect_gen_vector_loop_niters_mult_vf): New. (slpeel_update_phi_nodes_for_loops): New. (slpeel_update_phi_nodes_for_guard1): Reimplement. (find_guard_arg, slpeel_update_phi_nodes_for_guard2): Reimplement. (slpeel_update_phi_nodes_for_lcssa, vect_do_peeling): New. * tree-vect-loop.c (vect_build_loop_niters): Move to file tree-vect-loop-manip.c (vect_generate_tmps_on_preheader): Delete. (vect_transform_loop): Rename vectorization_factor to vf. Call vect_do_peeling instead of vect_do_peeling-* functions. * tree-vectorizer.h (vect_do_peeling): New decl. (vect_build_loop_niters, vect_gen_vector_loop_niters): New decls. (vect_do_peeling_for_loop_bound): Delete. (vect_do_peeling_for_alignment): Delete. From-SVN: r241099
2016-09-15re PR tree-optimization/77503 (ICE in vect_transform_stmt compiling postgresql)Bin Cheng1-0/+4
PR tree-optimization/77503 * tree-vect-loop.c (vectorizable_reduction): Record reduction code for CONST_COND_REDUCTION at analysis stage and use it at transform stage. * tree-vectorizer.h (struct _stmt_vec_info): New field. (STMT_VINFO_VEC_CONST_COND_REDUC_CODE): New macro. * tree-vect-stmts.c (new_stmt_vec_info): Initialize above new field. gcc/testsuite * gcc.dg/vect/pr77503.c: New test. From-SVN: r240166
2016-08-12re PR tree-optimization/69848 (poor vectorization of a loop from SPEC2006 ↵Bin Cheng1-1/+2
464.h264ref) PR tree-optimization/69848 * tree-vectorizer.h (enum vect_def_type): New condition reduction type CONST_COND_REDUCTION. * tree-vect-loop.c (vectorizable_reduction): Support new condition reudction type CONST_COND_REDUCTION. gcc/testsuite PR tree-optimization/69848 * gcc.dg/vect/vect-pr69848.c: New test. From-SVN: r239416
2016-07-29re PR tree-optimization/57558 (Loop not vectorized if iteration count could ↵Bin Cheng1-2/+12
be infinite) PR tree-optimization/57558 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks): New function. (vect_loop_versioning): Support versioning with niter assumptions. * tree-vect-loop.c (tree-ssa-loop.h): Include header file. (vect_get_loop_niters): New parameter. Reimplement to support assumptions in loop niter info. (vect_analyze_loop_form_1, vect_analyze_loop_form): Ditto. (new_loop_vec_info): Init LOOP_VINFO_NITERS_ASSUMPTIONS. (vect_estimate_min_profitable_iters): Use LOOP_REQUIRES_VERSIONING. Support loop versioning for niters. * tree-vectorizer.c (tree-ssa-loop-niter.h): Include header file. (vect_free_loop_info_assumptions): New function. (vectorize_loops): Free loop niter info for loops with flag LOOP_F_ASSUMPTIONS set if vectorization failed. * tree-vectorizer.h (struct _loop_vec_info): New field num_iters_assumptions. (LOOP_VINFO_NITERS_ASSUMPTIONS): New macro. (LOOP_REQUIRES_VERSIONING_FOR_NITERS): New macro. (LOOP_REQUIRES_VERSIONING): New macro. (vect_free_loop_info_assumptions): New decl. gcc/testsuite PR tree-optimization/57558 * gcc.dg/vect/pr57558-1.c: New test. * gcc.dg/vect/pr57558-2.c: New test. From-SVN: r238877
2016-07-06[7/7] Add negative and zero strides to vect_memory_access_typeRichard Sandiford1-0/+12
This patch uses the vect_memory_access_type from patch 6 to represent the effect of a negative contiguous stride or a zero stride. The latter is valid only for loads. Tested on aarch64-linux-gnu and x86_64-linux-gnu. gcc/ * tree-vectorizer.h (vect_memory_access_type): Add VMAT_INVARIANT, VMAT_CONTIGUOUS_DOWN and VMAT_CONTIGUOUS_REVERSED. * tree-vect-stmts.c (compare_step_with_zero): New function. (perm_mask_for_reverse): Move further up file. (get_group_load_store_type): Stick to VMAT_ELEMENTWISE if the step is negative. (get_negative_load_store_type): New function. (get_load_store_type): Call it. Add an ncopies argument. (vectorizable_mask_load_store): Update call accordingly and remove tests for negative steps. (vectorizable_store, vectorizable_load): Likewise. Handle new memory_access_types. From-SVN: r238039
2016-07-06[6/7] Explicitly classify vector loads and storesRichard Sandiford1-3/+35
This is the main patch in the series. It adds a new enum and routines for classifying a vector load or store implementation. Originally there were three motivations: (1) Reduce cut-&-paste (2) Make the chosen vectorisation strategy more obvious. At the moment this is derived implicitly from various other bits of state (GROUPED, STRIDED, SLP, etc.) (3) Decouple the vectorisation strategy from those other bits of state, so that there can be a choice of implementation for a given scalar statement. The specific problem here is that we class: for (...) { ... = a[i * x]; ... = a[i * x + 1]; } as "strided and grouped" but: for (...) { ... = a[i * 7]; ... = a[i * 7 + 1]; } as "non-strided and grouped". Before the patch, "strided and grouped" loads would always try to use separate scalar loads while "non-strided and grouped" loads would always try to use load-and-permute. But load-and-permute is never supported for a group size of 7, so the effect was that the first loop was vectorisable and the second wasn't. It seemed odd that not knowing x (but accepting it could be 7) would allow more optimisation opportunities than knowing x is 7. Unfortunately, it looks like we underestimate the cost of separate scalar accesses on at least aarch64, so I've disabled (3) for now; see the "if" statement at the end of get_load_store_type. I think the patch still does (1) and (2), so that's the justification for it in its current form. It also means that (3) is now simply a case of removing the FIXME code, once the cost model problems have been sorted out. (I did wonder about adding a --param, but that seems overkill. I hope to get back to this during GCC 7 stage 1.) Tested on aarch64-linux-gnu and x86_64-linux-gnu. gcc/ * tree-vectorizer.h (vect_memory_access_type): New enum. (_stmt_vec_info): Add a memory_access_type field. (STMT_VINFO_MEMORY_ACCESS_TYPE): New macro. (vect_model_store_cost): Take an access type instead of a boolean. (vect_model_load_cost): Likewise. * tree-vect-slp.c (vect_analyze_slp_cost_1): Update calls to vect_model_store_cost and vect_model_load_cost. * tree-vect-stmts.c (vec_load_store_type): New enum. (vect_model_store_cost): Take an access type instead of a store_lanes_p boolean. Simplify tests. (vect_model_load_cost): Likewise, but for load_lanes_p. (get_group_load_store_type, get_load_store_type): New functions. (vectorizable_store): Use get_load_store_type. Record the access type in STMT_VINFO_MEMORY_ACCESS_TYPE. (vectorizable_load): Likewise. (vectorizable_mask_load_store): Likewise. Replace is_store variable with vls_type. From-SVN: r238038
2016-07-06[5/7] Move the fix for PR65518Richard Sandiford1-1/+1
This patch moves the fix for PR65518 to the code that checks whether load-and-permute operations are supported. If the group size is greater than the vectorisation factor, it would still be possible to fall back to elementwise loads (as for strided groups) rather than fail vectorisation entirely. Tested on aarch64-linux-gnu and x86_64-linux-gnu. gcc/ * tree-vectorizer.h (vect_grouped_load_supported): Add a single_element_p parameter. * tree-vect-data-refs.c (vect_grouped_load_supported): Likewise. Check the PR65518 case here rather than in vectorizable_load. * tree-vect-loop.c (vect_analyze_loop_2): Update call accordignly. * tree-vect-stmts.c (vectorizable_load): Likewise. From-SVN: r238037
2016-07-06[4/7] Add a gather_scatter_info structureRichard Sandiford1-2/+24
This patch just refactors the gather/scatter support so that all information is in a single structure, rather than separate variables. This reduces the number of arguments to a function added in patch 6. Tested on aarch64-linux-gnu and x86_64-linux-gnu. gcc/ * tree-vectorizer.h (gather_scatter_info): New structure. (vect_check_gather_scatter): Return a bool rather than a decl. Replace return-by-pointer arguments with a single gather_scatter_info *. * tree-vect-data-refs.c (vect_check_gather_scatter): Likewise. (vect_analyze_data_refs): Update call accordingly. * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise. (vectorizable_mask_load_store): Likewise. Also record the offset dt and vectype in the gather_scatter_info. (vectorizable_store): Likewise. (vectorizable_load): Likewise. From-SVN: r238036
2016-06-17tree-vectorizer.h (struct dr_with_seg_len): Remove class member OFFSET.Bin Cheng1-7/+3
* tree-vectorizer.h (struct dr_with_seg_len): Remove class member OFFSET. * tree-vect-data-refs.c (operator ==): Handle DR_OFFSET directly, rather than OFFSET. (comp_dr_with_seg_len_pair): Ditto. (vect_prune_runtime_alias_test_list): Ditto. Also Canonicalize struct dr_with_seg_len_pair against DR_OFFSET. * tree-vect-loop-manip.c (vect_create_cond_for_alias_checks): Handle DR_OFFSET directly. * gcc.dg/vect/vect-alias-check-1.c: New test. From-SVN: r237549
2016-06-03[2/3] Vectorize inductions that are live after the loopAlan Hayward1-1/+5
2016-06-03 Alan Hayward <alan.hayward@arm.com> [2/3] Vectorize inductions that are live after the loop gcc/ * tree-vect-loop.c (vect_analyze_loop_operations): Allow live stmts. (vectorizable_reduction): Check for new relevant state. (vectorizable_live_operation): vectorize live stmts using BIT_FIELD_REF. Remove special case for gimple assigns stmts. * tree-vect-stmts.c (is_simple_and_all_uses_invariant): New function. (vect_stmt_relevant_p): Check for stmts which are only used live. (process_use): Use of a stmt does not inherit it's live value. (vect_mark_stmts_to_be_vectorized): Simplify relevance inheritance. (vect_analyze_stmt): Check for new relevant state. * tree-vectorizer.h (vect_relevant): New entry for a stmt which is used outside the loop, but not inside it. testsuite/ * gcc.dg/tree-ssa/pr64183.c: Ensure test does not vectorize. * testsuite/gcc.dg/vect/no-scevccp-vect-iv-2.c: Remove xfail. * gcc.dg/vect/vect-live-1.c: New test. * gcc.dg/vect/vect-live-2.c: New test. * gcc.dg/vect/vect-live-3.c: New test. * gcc.dg/vect/vect-live-4.c: New test. * gcc.dg/vect/vect-live-5.c: New test. * gcc.dg/vect/vect-live-slp-1.c: New test. * gcc.dg/vect/vect-live-slp-2.c: New test. * gcc.dg/vect/vect-live-slp-3.c: New test. From-SVN: r237064
2016-06-03[1/3] Split vect_get_vec_def_for_operand into twoAlan Hayward1-0/+1
2016-06-03 Alan Hayward <alan.hayward@arm.com> [1/3] Split vect_get_vec_def_for_operand into two gcc/ * tree-vectorizer.h (vect_get_vec_def_for_operand_1): New * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): New (vect_get_vec_def_for_operand): Split out code. From-SVN: r237063
2016-05-24Clean up PURE_SLP_STMT handlingRichard Sandiford1-2/+0
The vectorizable_* routines had many instances of: slp_node || PURE_SLP_STMT (stmt_info) which gives the misleading impression that we can have !slp_node && PURE_SLP_STMT (stmt_info). In this context it's really enough to test slp_node on its own. There are three cases: loop vectorisation only: vectorizable_foo called only with !slp_node pure SLP: vectorizable_foo called only with slp_node hybrid SLP: (e.g. a vector that's used in SLP statements and also in a reduction) - vectorizable_foo called once with slp_node for the SLP uses. - vectorizable_foo called once with !slp_node for the non-SLP uses. Hybrid SLP isn't possible for stores, so I added an explicit assert for that. I also made vectorizable_comparison static, to make it obvious that no other callers outside tree-vect-stmts.c could use it with the !slp && PURE_SLP_STMT combination. Tested on aarch64-linux-gnu and x86_64-linux-gnu. gcc/ * tree-vectorizer.h (vectorizable_comparison): Delete. * tree-vect-loop.c (vectorizable_reduction): Remove redundant PURE_SLP_STMT check. * tree-vect-stmts.c (vectorizable_call): Likewise. (vectorizable_simd_clone_call): Likewise. (vectorizable_conversion): Likewise. (vectorizable_assignment): Likewise. (vectorizable_shift): Likewise. (vectorizable_operation): Likewise. (vectorizable_load): Likewise. (vectorizable_condition): Likewise. (vectorizable_store): Likewise. Assert that we don't have hybrid SLP. (vectorizable_comparison): Make static. Remove redundant PURE_SLP_STMT check. (vect_transform_stmt): Assert that we always have an slp_node if PURE_SLP_STMT. From-SVN: r236642
2016-02-02re PR middle-end/68542 (10% 481.wrf performance regression)Yuri Rumyantsev1-0/+5
gcc/ 2016-02-02 Yuri Rumyantsev <ysrumyan@gmail.com> PR middle-end/68542 * config/i386/i386.c (ix86_expand_branch): Add support for conditional branch with vector comparison. * config/i386/sse.md (VI48_AVX): New mode iterator. (define_expand "cbranch<mode>4): Add support for conditional branch with vector comparison. * tree-vect-loop.c (optimize_mask_stores): New function. * tree-vect-stmts.c (vectorizable_mask_load_store): Initialize has_mask_store field of vect_info. * tree-vectorizer.c (vectorize_loops): Invoke optimaze_mask_stores for vectorized loops having masked stores after vec_info destroy. * tree-vectorizer.h (loop_vec_info): Add new has_mask_store field and correspondent macros. (optimize_mask_stores): Add prototype. gcc/testsuite 2016-02-02 Yuri Rumyantsev <ysrumyan@gmail.com> PR middle-end/68542 * gcc.dg/vect/vect-mask-store-move-1.c: New test. * gcc.target/i386/avx2-vect-mask-store-move1.c: New test. From-SVN: r233068
2016-01-15re PR tree-optimization/66856 (ICE in compute_live_loop_exits, at ↵Richard Biener1-0/+3
tree-ssa-loop-manip.c:234) 2016-01-15 Richard Biener <rguenther@suse.de> PR tree-optimization/66856 * tree-vect-loop.c (vect_transform_loop): Free SLP instances here. * tree-vect-slp.c (vect_free_slp_tree): Decrement stmt reference count. (vect_create_new_slp_node): Increment stmt reference count. (vect_get_and_check_slp_defs): Make sure stmts are nor already in an SLP tree before swapping operands. (vect_build_slp_tree): Likewise. (destroy_bb_vec_info): Free stmt info after SLP instances. * tree-vect-stmts.c (new_stmt_vec_info): Initialize reference count. * tree-vectorizer.h (struct _stmt_vec_info): Add num_slp_uses field. (STMT_VINFO_NUM_SLP_USES): New macro. * gcc.dg/torture/pr66856-1.c: New testcase. * gcc.dg/torture/pr66856-2.c: Likewise. From-SVN: r232435
2016-01-04Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r232055
2015-12-14re PR middle-end/68852 (ICE in vect_is_simple_use (tree-vect-stmts.c:8750) ↵Richard Biener1-0/+3
using -O3) 2015-12-14 Richard Biener <rguenther@suse.de> PR tree-optimization/68852 * tree-vectorizer.h (struct _slp_tree): Add def_type member. (SLP_TREE_DEF_TYPE): New accessor. * tree-vect-stmts.c (vect_is_simple_use): Remove BB vectorization hack. * tree-vect-slp.c (vect_create_new_slp_node): Initialize SLP_TREE_DEF_TYPE. (vect_build_slp_tree): When a node is to be built up from scalars do not push a NULL as child but instead set its def_type to vect_external_def. (vect_analyze_slp_cost_1): Check for child def-type instead of NULL. (vect_detect_hybrid_slp_stmts): Likewise. (vect_bb_slp_scalar_cost): Likewise. (vect_get_slp_defs): Likewise. (vect_slp_analyze_node_operations): Likewise. Before processing node push the children def-types to the underlying stmts vinfo and restore it afterwards. (vect_schedule_slp_instance): Likewise. (vect_slp_analyze_bb_1): Do not mark stmts not in SLP instances as not vectorizable. * g++.dg/torture/pr68852.C: New testcase. From-SVN: r231619
2015-12-09tree-vect-stmts.c (vectorizable_load): Set new vinfo only if it was not yet set.Richard Biener1-1/+4
2015-12-09 Richard Biener <rguenther@suse.de> * tree-vect-stmts.c (vectorizable_load): Set new vinfo only if it was not yet set. * tree-vectorizer.h (set_vinfo_for_stmt): Assert we don't overwrite an existing entry. From-SVN: r231443
2015-11-20re PR tree-optimization/68413 (internal compiler error: in vect_transform_stmt)Alan Hayward1-2/+5
2015-11-20 Alan Hayward <alan.hayward@arm.com> PR tree-optimization/68413 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Cache evolution base (vectorizable_reduction): Use cached base From-SVN: r230658
2015-11-17Vectorize internal functionsRichard Sandiford1-1/+0
This patch tries to vectorize built-in and internal functions as internal functions first, falling back on the current built-in target hooks otherwise. This means that we'll automatically pick up vector versions of optabs without the target having to implement any special hooks. E.g. we'll use V4SF sqrt if the target defines a "sqrtv4sf2" optab. As well as being simpler, it means that the target-independent code has more idea what the vectorized function does. Tested on x86_64-linux-gnu, aarch64-linux-gnu, arm-linux-gnu and powerpc64-linux-gnu. gcc/ * internal-fn.h (direct_internal_fn_info): Add vectorizable flag. * internal-fn.c (direct_internal_fn_array): Update accordingly. * tree-vectorizer.h (vectorizable_function): Delete. * tree-vect-stmts.c: Include internal-fn.h. (vectorizable_internal_function): New function. (vectorizable_function): Inline into... (vectorizable_call): ...here. Explicitly reject calls that read from or write to memory. Try using an internal function before falling back on the old vectorizable_function behavior. From-SVN: r230492
2015-11-13Optimize condition reductions where the result is an integer induction variableAlan Hayward1-1/+2
2015-11-13 Alan Hayward <alan.hayward@arm.com> gcc/ PR tree-optimization/66558 * tree-vect-loop.c (is_integer_induction):Add. (vectorizable_reduction): Add integer induction checks. gcc/testsuite/ PR tree-optimization/66558 * gcc.dg/vect/pr65947-1.c: Add checks. * gcc.dg/vect/pr65947-2.c: Add checks. * gcc.dg/vect/pr65947-3.c: Add checks. * gcc.dg/vect/pr65947-4.c: Add checks. * gcc.dg/vect/pr65947-5.c: Add checks. * gcc.dg/vect/pr65947-6.c: Add checks. * gcc.dg/vect/pr65947-10.c: Add checks. * gcc.dg/vect/pr65947-12.c: New test. * gcc.dg/vect/pr65947-13.c: New test. From-SVN: r230297
2015-11-12tree-vectorizer.h (vect_slp_analyze_data_ref_dependences): Rename to ↵Richard Biener1-1/+1
vect_slp_analyze_instance_dependence. 2015-11-12 Richard Biener <rguenther@suse.de> * tree-vectorizer.h (vect_slp_analyze_data_ref_dependences): Rename to vect_slp_analyze_instance_dependence. * tree-vect-data-refs.c (vect_slp_analyze_data_ref_dependence): Remove WAR special-case. (vect_slp_analyze_node_dependences): Instead add more specific code here, not relying on other instances being vectorized. (vect_slp_analyze_instance_dependence): Adjust accordingly. * tree-vect-slp.c (vect_build_slp_tree_1): Remove excessive vertical space in dump files. (vect_print_slp_tree): Likewise. (vect_analyze_slp_instance): Dump a header for the final SLP tree. (vect_slp_analyze_bb_1): Delay computing relevant stmts and not vectorized stmts until after dependence analysis removed instances. Merge alignment and dependence checks. * tree-vectorizer.c (pass_slp_vectorize::execute): Clear visited flag on all stmts. From-SVN: r230262
2015-11-11tree-vectorizer.h (vect_slp_analyze_and_verify_instance_alignment): Declare.Richard Biener1-2/+3
2015-11-11 Richard Biener <rguenther@suse.de> * tree-vectorizer.h (vect_slp_analyze_and_verify_instance_alignment): Declare. (vect_analyze_data_refs_alignment): Make loop vect specific. (vect_verify_datarefs_alignment): Likewise. * tree-vect-data-refs.c (vect_slp_analyze_data_ref_dependences): Add missing continue. (vect_compute_data_ref_alignment): Export. (vect_compute_data_refs_alignment): Merge into... (vect_analyze_data_refs_alignment): ... this. (verify_data_ref_alignment): Split out from ... (vect_verify_datarefs_alignment): ... here. (vect_slp_analyze_and_verify_node_alignment): New function. (vect_slp_analyze_and_verify_instance_alignment): Likewise. * tree-vect-slp.c (vect_supported_load_permutation_p): Remove misplaced checks on alignment. (vect_slp_analyze_bb_1): Add fatal output parameter. Do alignment analysis after SLP discovery and do it per instance. (vect_slp_bb): When vect_slp_analyze_bb_1 fatally failed do not bother to re-try using different vector sizes. From-SVN: r230173
2015-11-10optabs.c (expand_binop_directly): Allow scalar mode for vec_pack_trunc_optab.Ilya Enkovich1-1/+1
gcc/ * optabs.c (expand_binop_directly): Allow scalar mode for vec_pack_trunc_optab. * tree-vect-loop.c (vect_determine_vectorization_factor): Skip boolean vector producers from pattern sequence when computing VF. * tree-vect-patterns.c (vect_vect_recog_func_ptrs) Add vect_recog_mask_conversion_pattern. (search_type_for_mask): Choose the smallest type if different size types are mixed. (build_mask_conversion): New. (vect_recog_mask_conversion_pattern): New. (vect_pattern_recog_1): Allow scalar mode for boolean vectype. * tree-vect-stmts.c (vectorizable_mask_load_store): Support masked load with pattern. (vectorizable_conversion): Support boolean vectors. (free_stmt_vec_info): Allow patterns for statements with no lhs. * tree-vectorizer.h (NUM_PATTERNS): Increase to 14. From-SVN: r230103
2015-11-10expr.c (do_store_flag): Use expand_vec_cmp_expr for mask results.Ilya Enkovich1-2/+7
gcc/ * expr.c (do_store_flag): Use expand_vec_cmp_expr for mask results. (const_vector_mask_from_tree): New. (const_vector_from_tree): Use const_vector_mask_from_tree for boolean vectors. * optabs-query.h (get_vec_cmp_icode): New. * optabs-tree.c (expand_vec_cmp_expr_p): New. * optabs-tree.h (expand_vec_cmp_expr_p): New. * optabs.c (vector_compare_rtx): Add OPNO arg. (expand_vec_cond_expr): Adjust to vector_compare_rtx change. (expand_vec_cmp_expr): New. * optabs.def (vec_cmp_optab): New. (vec_cmpu_optab): New. * optabs.h (expand_vec_cmp_expr): New. * tree-vect-generic.c (expand_vector_comparison): Add vector comparison optabs check. * tree-vect-loop.c (vect_determine_vectorization_factor): Ignore mask operations for VF. Add mask type computation. * tree-vect-stmts.c (get_mask_type_for_scalar_type): New. (vectorizable_comparison): New. (vect_analyze_stmt): Add vectorizable_comparison. (vect_transform_stmt): Likewise. (vect_init_vector): Support boolean vector invariants. (vect_get_vec_def_for_operand): Add VECTYPE arg. (vectorizable_condition): Directly provide vectype for invariants used in comparison. * tree-vectorizer.h (get_mask_type_for_scalar_type): New. (enum vect_var_kind): Add vect_mask_var. (enum stmt_vec_info_type): Add comparison_vec_info_type. (vectorizable_comparison): New. (vect_get_vec_def_for_operand): Add VECTYPE arg. * tree-vect-data-refs.c (vect_get_new_vect_var): Support vect_mask_var. (vect_create_destination_var): Likewise. * tree-vect-patterns.c (check_bool_pattern): Check fails if we can vectorize comparison directly. (search_type_for_mask): New. (vect_recog_bool_pattern): Support cases when bool pattern check fails. * tree-vect-slp.c (vect_build_slp_tree_1): Allow comparison statements. (vect_get_constant_vectors): Support boolean vector constants. * config/i386/i386-protos.h (ix86_expand_mask_vec_cmp): New. (ix86_expand_int_vec_cmp): New. (ix86_expand_fp_vec_cmp): New. * config/i386/i386.c (ix86_expand_sse_cmp): Allow NULL for op_true and op_false. (ix86_int_cmp_code_to_pcmp_immediate): New. (ix86_fp_cmp_code_to_pcmp_immediate): New. (ix86_cmp_code_to_pcmp_immediate): New. (ix86_expand_mask_vec_cmp): New. (ix86_expand_fp_vec_cmp): New. (ix86_expand_int_sse_cmp): New. (ix86_expand_int_vcond): Use ix86_expand_int_sse_cmp. (ix86_expand_int_vec_cmp): New. (ix86_get_mask_mode): New. (TARGET_VECTORIZE_GET_MASK_MODE): New. * config/i386/sse.md (avx512fmaskmodelower): New. (vec_cmp<mode><avx512fmaskmodelower>): New. (vec_cmp<mode><sseintvecmodelower>): New. (vec_cmpv2div2di): New. (vec_cmpu<mode><avx512fmaskmodelower>): New. (vec_cmpu<mode><sseintvecmodelower>): New. (vec_cmpuv2div2di): New. gcc/testsuite/ * gcc.dg/vect/slp-cond-5.c: New test. From-SVN: r230098
2015-11-09re PR tree-optimization/56118 (Piecewise vector / complex initialization ↵Richard Biener1-0/+1
from constants not combined) 2015-11-09 Richard Biener <rguenther@suse.de> PR tree-optimization/56118 * tree-vectorizer.h (vect_find_last_scalar_stmt_in_slp): Declare. * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Export. * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): New function. (vect_slp_analyze_data_ref_dependences): Instead of computing all dependences of the region DRs just analyze the code motions SLP vectorization will perform. Remove SLP instances that cannot have their store/load motions applied. (vect_analyze_data_refs): Allow DRs without a vectype in BB vectorization. * gcc.dg/vect/no-tree-sra-bb-slp-pr50730.c: Adjust. From-SVN: r230020
2015-11-06tree-vectorizer.h (struct _bb_vec_info): Add region_begin/end members.Richard Biener1-0/+3
2015-11-06 Richard Biener <rguenther@suse.de> * tree-vectorizer.h (struct _bb_vec_info): Add region_begin/end members. (vect_stmt_in_region_p): Declare. * tree-vect-slp.c (new_bb_vec_info): Work on a region. (destroy_bb_vec_info): Likewise. (vect_bb_slp_scalar_cost): Use vect_stmt_in_region_p. (vect_get_and_check_slp_defs): Likewise. (vect_slp_analyze_bb_1): Refactor to make it work on sub-BBs. (vect_slp_bb): Likewise. * tree-vect-patterns.c (vect_same_loop_or_bb_p): Implement in terms of vect_stmt_in_region_p. (vect_pattern_recog): Iterate over the BB region. * tree-vect-stmts.c (vect_is_simple_use): Use vect_stmt_in_region_p. * tree-vectorizer.c (vect_stmt_in_region_p): New function. (pass_slp_vectorize::execute): Initialize all stmt UIDs to -1. * config/i386/i386.c: Include gimple-iterator.h. * config/aarch64/aarch64.c: Likewise. * gcc.dg/vect/bb-slp-38.c: New testcase. From-SVN: r229842
2015-11-03tree-vect-data-refs.c (vect_analyze_data_refs): Do not collect data ↵Richard Biener1-5/+2
references here. 2015-11-03 Richard Biener <rguenther@suse.de> * tree-vect-data-refs.c (vect_analyze_data_refs): Do not collect data references here. * tree-vect-loop.c: Include cgraph.h. (vect_analyze_loop_2): Collect data references here. * tree-vect-slp.c (find_bb_location): Inline ... (vect_slp_bb): ... here. Renamed from vect_slp_analyze_bb. Factor in vect_slp_transform_bb. (vect_slp_transform_bb): Removed. (vect_slp_analyze_bb_1): Collect data references here. * tree-vectorizer.c (pass_slp_vectorize::execute): Call vect_slp_bb. * tree-vectorizer.h (vect_slp_bb): Declare. (vect_slp_analyze_bb): Remove. (vect_slp_transform_bb): Remove. (find_bb_location): Remove. (vect_analyze_data_refs): Remove stmt count reference parameter. From-SVN: r229712
2015-10-23Support for vectorizing conditional expressionsAlan Hayward1-0/+11
2015-10-23 Alan Hayward <alan.hayward@arm.com> gcc/ PR tree-optimization/65947 * tree-vect-loop.c (vect_is_simple_reduction_1): Find condition reductions. (vect_model_reduction_cost): Add condition reduction costs. (get_initial_def_for_reduction): Add condition reduction initial var. (vect_create_epilog_for_reduction): Add condition reduction epilog. (vectorizable_reduction): Condition reduction support. * tree-vect-stmts.c (vectorizable_condition): Add vect reduction arg * doc/sourcebuild.texi (Vector-specific attributes): Document vect_max_reduc gcc/testsuite PR tree-optimization/65947 * lib/target-supports.exp (check_effective_target_vect_max_reduc): Add. * gcc.dg/vect/pr65947-1.c: New test. * gcc.dg/vect/pr65947-2.c: New test. * gcc.dg/vect/pr65947-3.c: New test. * gcc.dg/vect/pr65947-4.c: New test. * gcc.dg/vect/pr65947-5.c: New test. * gcc.dg/vect/pr65947-6.c: New test. * gcc.dg/vect/pr65947-7.c: New test. * gcc.dg/vect/pr65947-8.c: New test. * gcc.dg/vect/pr65947-9.c: New test. * gcc.dg/vect/pr65947-10.c: New test. * gcc.dg/vect/pr65947-11.c: New test. From-SVN: r229245
2015-10-15tree-vectorizer.h (vect_get_new_ssa_name): Declare.Richard Biener1-0/+2
2015-10-15 Richard Biener <rguenther@suse.de> * tree-vectorizer.h (vect_get_new_ssa_name): Declare. * tree-vect-data-refs.c (vect_get_new_ssa_name): New helper. * tree-vect-loop.c (get_initial_def_for_induction): Drop use of force_gimple_operand in favor of gimple_build. Use vect_get_new_ssa_name. * tree-vect-stmts.c (vect_init_vector): Use vect_get_new_ssa_name. (vectorizable_mask_load_store): Likewise. (vectorizable_call): Likewise. (vectorizable_store): Likewise. (vectorizable_load): Likewise. (vect_get_vec_def_for_stmt_copy): Remove redundant stmt. From-SVN: r228841
2015-10-14tree-vectorizer.h (vect_is_simple_use): Remove unused parameters.Richard Biener1-5/+5
2015-10-14 Richard Biener <rguenther@suse.de> * tree-vectorizer.h (vect_is_simple_use): Remove unused parameters. (vect_is_simple_use_1): Likewise. Make overload of vect_is_simple_use. (vect_get_vec_def_for_operand): Remove unused parameter. * tree-vect-loop.c (get_initial_def_for_induction): Adjust. (vect_create_epilog_for_reduction): Likewise. (vectorizable_reduction): Likewise. (vectorizable_live_operation): Likewise. * tree-vect-patterns.c (type_conversion_p): Likewise. (vect_recog_vector_vector_shift_pattern): Likewise. (check_bool_pattern): Likewise. * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise. (vect_analyze_slp_cost_1): Likewise. * tree-vect-stmts.c (process_use): Likewise. (vect_get_vec_def_for_operand): Do not handle reductions. (vect_get_vec_defs): Adjust. (vectorizable_mask_load_store): Likewise. (vectorizable_call): Likewise. (vectorizable_simd_clone_call): Likewise. (vect_get_loop_based_defs): Likewise. (vectorizable_conversion): Likewise. (vectorizable_assignment): Likewise. (vectorizable_shift): Likewise. (vectorizable_operation): Likewise. (vectorizable_store): Likewise. (vectorizable_load): Likewise. (vect_is_simple_cond): Likewise. (vectorizable_condition): Likewise. (vect_is_simple_use): Remove unused parameters. (vect_is_simple_use_1): Adjust and rename. From-SVN: r228811
2015-10-14tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Reset info at start.Richard Biener1-29/+0
2015-10-14 Richard Biener <rguenther@suse.de> * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Reset info at start. (vect_analyze_group_access_1): Add debug print. * tree-vect-loop.c (vect_get_single_scalar_iteration_cost): Rename ... (vect_compute_single_scalar_iteration_cost): ... to this. (vect_analyze_loop_2): Adjust. * tree-vect-slp.c (struct _slp_oprnd_info): Move from ... * tree-vectorizer.h: ... here. (add_stmt_info_to_vec): Remove. * tree-vect-stmts.c (record_stmt_cost): Inline add_stmt_info_to_vec. From-SVN: r228806
2015-10-13tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Allocate the data ↵Richard Biener1-47/+0
dependence vector. 2015-10-13 Richard Biener <rguenther@suse.de> * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Allocate the data dependence vector. (vect_peeling_hash_insert): Get the peeling hash table as argument. (vect_peeling_hash_get_lowest_cost): Likewise. (vect_enhance_data_refs_alignment): Adjust. (struct _vect_peel_info, struct _vect_peel_extended_info, struct peel_info_hasher): Move from ... * tree-vectorizer.h: ... here. (LOOP_VINFO_COST_MODEL_MIN_ITERS): Remove. (LOOP_VINFO_PEELING_HTAB): Likewise. (struct _loop_vec_info): Remove min_profitable_iters and peeling_htab members. * tree-vect-loop.c (new_loop_vec_info): Do not allocate vectors here. (destroy_loop_vec_info): Adjust. (vect_analyze_loop_2): Do not set LOOP_VINFO_COST_MODEL_MIN_ITERS. (vect_estimate_min_profitable_iters): Use LOOP_VINFO_COMP_ALIAS_DDRS to estimate alias versioning cost. * tree-vect-slp.c (vect_analyze_slp_cost): Dump header. From-SVN: r228751
2015-10-07tree-vectorizer.h (stmt_vec_info_vec): Use vec<stmt_vec_info>.Richard Biener1-7/+4
2015-10-07 Richard Biener <rguenther@suse.de> * tree-vectorizer.h (stmt_vec_info_vec): Use vec<stmt_vec_info>. (vinfo_for_stmt): Adjust. (set_vinfo_for_stmt): Likewise. * tree-vectorizer.c (stmt_vec_info_vec): Likewise. * tree-vect-stmts.c (free_stmt_vec_info_vec): Likewise. * tree-vect-loop.c (new_loop_vec_info): Remove special-casing of inner loop. (vect_analyze_loop_1): Remove. (vect_analyze_loop_form_1): Avoid building a loop_vec_info for inner loop when vectorizing an outer loop by splitting out from ... (vect_analyze_loop_form): ... here. From-SVN: r228563
2015-10-06tree-vectorizer.h (vec_info): New base class for...Richard Biener1-59/+70
2015-10-06 Richard Biener <rguenther@suse.de> * tree-vectorizer.h (vec_info): New base class for... (_loop_vec_info): ... this and ... (_bb_vec_info): ... this. (vect_is_simple_use, vect_is_simple_use_1, new_stmt_vec_info, vect_analyze_data_refs_alignment, vect_verify_datarefs_alignment, vect_analyze_data_ref_accesses, vect_analyze_data_refs, vect_schedule_slp, vect_analyze_slp, vect_pattern_recog, vect_destroy_datarefs): Adjust interface to take a vec_info * rather than both a loop_vec_info and a bb_vec_info argument. * tree-vect-data-refs.c (vect_compute_data_refs_alignment, vect_verify_datarefs_alignment, vect_enhance_data_refs_alignment, vect_analyze_data_refs_alignment, vect_analyze_data_ref_accesses, vect_analyze_data_refs, vect_create_data_ref_ptr): Adjust accordingly. * tree-vect-loop.c (new_loop_vec_info): Initialize base class. (destroy_loop_vec_info, vect_analyze_loop_2, vect_is_simple_reduction_1, get_initial_def_for_induction, vect_create_epilog_for_reduction, vectorizable_reduction, vectorizable_live_operation, vect_transform_loop): Adjust. * tree-vect-patterns.c (type_conversion_p, vect_recog_widen_mult_pattern, vect_recog_widen_shift_pattern, vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern, vect_recog_mixed_size_cond_pattern, check_bool_pattern, vect_recog_bool_pattern, vect_mark_pattern_stmts, vect_pattern_recog): Likewise. * tree-vect-slp.c (vect_get_and_check_slp_defs, vect_build_slp_tree_1, vect_build_slp_tree, vect_analyze_slp_cost_1, vect_analyze_slp_instance, vect_analyze_slp, destroy_bb_vec_info, vect_slp_analyze_bb_1, vect_schedule_slp): Likewise. (new_bb_vec_info): Initialize base classs. * tree-vect-stmts.c (record_stmt_cost, process_use, vect_get_vec_def_for_operand, vect_finish_stmt_generation, vectorizable_mask_load_store, vectorizable_call, vectorizable_simd_clone_call, vectorizable_conversion, vectorizable_assignment, vectorizable_shift, vectorizable_operation, vectorizable_store, vectorizable_load, vect_is_simple_cond, vectorizable_condition, new_stmt_vec_info, vect_is_simple_use, vect_is_simple_use_1): Likewise. * tree-vectorizer.c (vect_destroy_datarefs): Likewise. From-SVN: r228514
2015-09-20switch from gimple to gimple*Trevor Saunders1-61/+63
This renames the gimple_statement_base struct to gimple removes the typedef of gimple_statement_base * to gimple, and then adjusts all of the places that use the type. gcc/ChangeLog: 2015-09-19 Trevor Saunders <tbsaunde@tbsaunde.org> * coretypes.h (gimple): Change typedef to be a forward declaration. * gimple.h (gimple_statement_base): rename to gimple. * (all functions and types using gimple): Adjust. * *.[ch]: Likewise. gcc/cp/ChangeLog: 2015-09-19 Trevor Saunders <tbsaunde@tbsaunde.org> * cp-gimplify.c (gimplify_must_not_throw_expr): Adjust. From-SVN: r227941
2015-09-04tm.texi.in (TARGET_VECTORIZE_BUILTIN_SCATTER): New.Andrey Turetskiy1-5/+5
gcc/ * doc/tm.texi.in (TARGET_VECTORIZE_BUILTIN_SCATTER): New. * doc/tm.texi: Regenerate. * target.def: Add scatter builtin. * tree-vectorizer.h: Rename gather_p to gather_scatter_p and use it for loads/stores in case of gather/scatter accordingly. (STMT_VINFO_GATHER_SCATTER_P(S)): Use it instead of STMT_VINFO_GATHER_P(S). (vect_check_gather): Rename to ... (vect_check_gather_scatter): this. * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Use STMT_VINFO_GATHER_SCATTER_P instead of STMT_VINFO_SCATTER_P. (vect_check_gather_scatter): Use it instead of vect_check_gather. (vect_analyze_data_refs): Add gatherscatter enum and maybe_scatter variable and new checkings for it accordingly. * tree-vect-stmts.c (STMT_VINFO_GATHER_SCATTER_P(S)): Use it instead of STMT_VINFO_GATHER_P(S). (vect_check_gather_scatter): Use it instead of vect_check_gather. (vectorizable_store): Add checkings for STMT_VINFO_GATHER_SCATTER_P. Co-Authored-By: Kirill Yukhin <kirill.yukhin@intel.com> Co-Authored-By: Petr Murzin <petr.murzin@intel.com> From-SVN: r227481
2015-08-19remove more useless typedefsTrevor Saunders1-2/+2
gcc/c-family/ChangeLog: 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org> * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h, c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless typedefs. gcc/c/ChangeLog: 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org> * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs. gcc/cp/ChangeLog: 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org> * call.c, class.c, cp-tree.h, decl.c, except.c, mangle.c, method.c, name-lookup.h, parser.c, parser.h, rtti.c, semantics.c, typeck2.c: Remove useless typedefs. gcc/fortran/ChangeLog: 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org> * dependency.c, dependency.h, gfortran.h, io.c, module.c, parse.h, resolve.c, trans-types.h, trans.h: remove useless typedefs. gcc/lto/ChangeLog: 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org> * lto.h: Remove useless typedefs. gcc/objc/ChangeLog: 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org> * objc-act.h, objc-next-runtime-abi-02.c, objc-runtime-hooks.h: Remove useless typedefs. gcc/ChangeLog: 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org> * bb-reorder.c, cfgloop.h, collect2.c, combine.c, dse.c, dwarf2cfi.c, gcse-common.h, genopinit.c, ggc-page.c, machmode.h, mcf.c, modulo-sched.c, omp-low.c, read-rtl.c, sched-rgn.c, signop.h, tree-call-cdce.c, tree-dfa.c, tree-diagnostic.c, tree-inline.h, tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-loop-niter.c, tree-ssa-loop.h, tree-ssa-pre.c, tree-ssa-reassoc.c, tree-ssa-sccvn.h, tree-ssa-structalias.c, tree-ssa-uninit.c, tree-ssa.h, tree-vect-loop-manip.c, tree-vectorizer.h, tree-vrp.c, var-tracking.c: Remove useless typedefs. From-SVN: r227001
2015-08-06Vectorize mult expressions with power 2 constants via shift, for targets has ↵Venkataramanan Kumar1-1/+1
no vector multiplication support. 2015-08-06 Venkataramanan Kumar <Venkataramanan.kumar@amd.com> * tree-vect-patterns.c (vect_recog_mult_pattern): New function for vectorizing multiplication patterns. * tree-vectorizer.h: Adjust the number of patterns. 2015-08-06 Venkataramanan Kumar <Venkataramanan.kumar@amd.com> * gcc.dg/vect/vect-mult-pattern-1.c: New test. * gcc.dg/vect/vect-mult-pattern-2.c: New test. From-SVN: r226675
2015-08-03re PR tree-optimization/66917 (ARM: NEON: memcpy compiles to vst1 with ↵Richard Biener1-6/+9
incorrect alignment) 2015-08-03 Richard Biener <rguenther@suse.de> PR tree-optimization/66917 * tree-vectorizer.h (struct dataref_aux): Add base_element_aligned field. (DR_VECT_AUX): New macro. (set_dr_misalignment): Adjust. (dr_misalignment): Likewise. * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Compute whether the base is at least element aligned. * tree-vect-stmts.c (ensure_base_align): Adjust. (vectorizable_store): If the base is not element aligned preserve alignment of the original access if misalignment is unknown. (vectorizable_load): Likewise. From-SVN: r226487
2015-07-23Check TYPE_OVERFLOW_WRAPS for parloops reductionsTom de Vries1-1/+2
2015-07-23 Tom de Vries <tom@codesourcery.com> * tree-parloops.c (gather_scalar_reductions): Add arg to call to vect_force_simple_reduction. * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Same. (vect_is_simple_reduction_1): Add and handle need_wrapping_integral_overflow parameter. (vect_is_simple_reduction, vect_force_simple_reduction): Add and pass need_wrapping_integral_overflow parameter. (vectorizable_reduction): Add arg to call to vect_is_simple_reduction. * tree-vectorizer.h (vect_force_simple_reduction): Add parameter to decl. * gcc.dg/autopar/outer-4.c: Add xfail. * gcc.dg/autopar/outer-5.c: Same. * gcc.dg/autopar/outer-6.c: Same. * gcc.dg/autopar/reduc-2.c: Same. * gcc.dg/autopar/reduc-2char.c: Same. * gcc.dg/autopar/reduc-2short.c: Same. * gcc.dg/autopar/reduc-8.c: Same. * gcc.dg/autopar/uns-outer-4.c: New test. * gcc.dg/autopar/uns-outer-5.c: New test. * gcc.dg/autopar/uns-outer-6.c: New test. From-SVN: r226107
2015-06-25hash-traits.h (free_ptr_hash): New class.Richard Sandiford1-3/+1
gcc/ * hash-traits.h (free_ptr_hash): New class. * dwarf2out.c (decl_table_entry_hasher): Inherit from free_ptr_hash rather than typed_free_remove. Remove redudant typedefs. (external_ref_hasher): Likewise. * except.c (action_record_hasher, ttypes_filter_hasher): Likewise. (ehspec_hasher): Likewise. * ggc-common.c (saving_hasher): Likewise. * gimplify.c (gimplify_hasher): Likewise. * haifa-sched.c (delay_i2_hasher): Likewise. * loop-invariant.c (invariant_expr_hasher): Likewise. * loop-iv.c (biv_entry_hasher): Likewise. * loop-unroll.c (iv_split_hasher, var_expand_hasher): Likewise. * trans-mem.c (tm_mem_map_hasher, tm_memop_hasher): Likewise. * tree-cfg.c (locus_discrim_hasher): Likewise. * tree-eh.c (finally_tree_hasher): Likewise. * tree-into-ssa.c (var_info_hasher): Likewise. * tree-parloops.c (reduction_hasher, name_to_copy_hasher): Likewise. * tree-ssa-loop-ivopts.c (iv_inv_expr_hasher): Likewise. * tree-ssa-phiopt.c (ssa_names_hasher): Likewise. * tree-ssa-pre.c (expr_pred_trans_d): Likewise. * tree-ssa-sccvn.c (vn_constant_hasher): Likewise. * tree-ssa-structalias.c (equiv_class_hasher): Likewise. (shared_bitmap_hasher): Likewise. * tree-ssa-threadupdate.c (redirection_data): Likewise. * tree-vectorizer.h (peel_info_hasher): Likewise. * tree-vectorizer.c (simduid_to_vf, simd_array_to_simduid): Likewise. * config/mips/mips.c (mips_lo_sum_offset_hasher): Likewise. libcc1/ * plugin.cc (decl_addr_hasher): Inherit from free_ptr_hash rather than typed_free_remove. Remove redudant typedefs. From-SVN: r224958
2015-06-22tree-vectorizer.h (_loop_vec_info): Add scalar_cost_vec and ↵Richard Biener1-2/+8
single_scalar_iteration_cost members. 2015-06-22 Richard Biener <rguenther@suse.de> * tree-vectorizer.h (_loop_vec_info): Add scalar_cost_vec and single_scalar_iteration_cost members. (LOOP_VINFO_SCALAR_ITERATION_COST): New. (LOOP_VINFO_SINGLE_SCALAR_ITERATION_COST): Likewise. (vect_get_single_scalar_iteration_cost): Remove. * tree-vect-data-refs.c (vect_peeling_hash_get_lowest_cost): Use LOOP_VINFO_SCALAR_ITERATION_COST. * tree-vect-loop.c (destroy_loop_vec_info): Free scalar_cost_vec. (vect_get_single_scalar_iteration_cost): Compute result into LOOP_VINFO_SINGLE_SCALAR_ITERATION_COST and LOOP_VINFO_SCALAR_ITERATION_COST. Make static. (vect_analyze_loop_2): Call vect_get_single_scalar_iteration_cost. (vect_estimate_min_profitable_iters): Use them. From-SVN: r224723
2015-06-08coretypes.h: Include hash-table.h and hash-set.h for host files.Andrew MacLeod1-1/+0
2015-06-08 Andrew MacLeod <amacleod@redhat.com> * coretypes.h: Include hash-table.h and hash-set.h for host files. * ggc.h: Don't include statistics.h> * hash-map.h: Remove all includes. * hash-set.h: Likewise. * hash-table.h: Add statistics.h, inchash.h and hash-map-traits.h to the include list. Remove <new>. * inchash.h: Remove all includes. * mem-stats.h: Likewise. * vec.h: No special processing for generators or ggc. * alias.c : Adjust include files. * alloc-pool.c : Likewise. * alloc-pool.h : Likewise. * asan.c : Likewise. * attribs.c : Likewise. * auto-inc-dec.c : Likewise. * auto-profile.c : Likewise. * bb-reorder.c : Likewise. * bitmap.c : Likewise. * bitmap.h : Likewise. * bt-load.c : Likewise. * builtins.c : Likewise. * caller-save.c : Likewise. * calls.c : Likewise. * ccmp.c : Likewise. * cfg.c : Likewise. * cfganal.c : Likewise. * cfgbuild.c : Likewise. * cfgcleanup.c : Likewise. * cfgexpand.c : Likewise. * cfghooks.c : Likewise. * cfgloop.c : Likewise. * cfgloop.h : Likewise. * cfgloopanal.c : Likewise. * cfgloopmanip.c : Likewise. * cfgrtl.c : Likewise. * cgraph.c : Likewise. * cgraphbuild.c : Likewise. * cgraphclones.c : Likewise. * cgraphunit.c : Likewise. * cilk-common.c : Likewise. * combine-stack-adj.c : Likewise. * combine.c : Likewise. * compare-elim.c : Likewise. * context.c : Likewise. * convert.c : Likewise. * coverage.c : Likewise. * cppbuiltin.c : Likewise. * cprop.c : Likewise. * cse.c : Likewise. * cselib.c : Likewise. * data-streamer-in.c : Likewise. * data-streamer-out.c : Likewise. * data-streamer.c : Likewise. * data-streamer.h : Likewise. * dbxout.c : Likewise. * dce.c : Likewise. * ddg.c : Likewise. * debug.c : Likewise. * df-core.c : Likewise. * df-problems.c : Likewise. * df-scan.c : Likewise. * df.h : Likewise. * dfp.c : Likewise. * dojump.c : Likewise. * dominance.c : Likewise. * domwalk.c : Likewise. * double-int.c : Likewise. * dse.c : Likewise. * dumpfile.c : Likewise. * dwarf2asm.c : Likewise. * dwarf2cfi.c : Likewise. * dwarf2out.c : Likewise. * emit-rtl.c : Likewise. * et-forest.c : Likewise. * except.c : Likewise. * except.h : Likewise. * explow.c : Likewise. * expmed.c : Likewise. * expr.c : Likewise. * final.c : Likewise. * fixed-value.c : Likewise. * fold-const.c : Likewise. * function.c : Likewise. * fwprop.c : Likewise. * gcc-plugin.h : Likewise. * gcc.c : Likewise. * gcse-common.c : Likewise. * gcse.c : Likewise. * genattrtab.c : Likewise. * genautomata.c : Likewise. * genconditions.c : Likewise. * genemit.c : Likewise. * generic-match-head.c : Likewise. * genextract.c : Likewise. * gengtype-state.c : Likewise. * gengtype.c : Likewise. * genhooks.c : Likewise. * genmatch.c : Likewise. * genmodes.c : Likewise. * genrecog.c : Likewise. * gensupport.c : Likewise. * ggc-common.c : Likewise. * ggc-internal.h : Likewise. * ggc-none.c : Likewise. * ggc-page.c : Likewise. * gimple-builder.c : Likewise. * gimple-expr.c : Likewise. * gimple-fold.c : Likewise. * gimple-iterator.c : Likewise. * gimple-low.c : Likewise. * gimple-match-head.c : Likewise. * gimple-pretty-print.c : Likewise. * gimple-ssa-isolate-paths.c : Likewise. * gimple-ssa-strength-reduction.c : Likewise. * gimple-ssa.h : Likewise. * gimple-streamer-in.c : Likewise. * gimple-streamer-out.c : Likewise. * gimple-streamer.h : Likewise. * gimple-walk.c : Likewise. * gimple.c : Likewise. * gimplify-me.c : Likewise. * gimplify.c : Likewise. * godump.c : Likewise. * graph.c : Likewise. * graphds.c : Likewise. * graphite-blocking.c : Likewise. * graphite-dependences.c : Likewise. * graphite-interchange.c : Likewise. * graphite-isl-ast-to-gimple.c : Likewise. * graphite-optimize-isl.c : Likewise. * graphite-poly.c : Likewise. * graphite-scop-detection.c : Likewise. * graphite-sese-to-poly.c : Likewise. * graphite.c : Likewise. * haifa-sched.c : Likewise. * hard-reg-set.h : Likewise. * hw-doloop.c : Likewise. * ifcvt.c : Likewise. * inchash.c : Likewise. * incpath.c : Likewise. * init-regs.c : Likewise. * input.c : Likewise. * internal-fn.c : Likewise. * ipa-chkp.c : Likewise. * ipa-comdats.c : Likewise. * ipa-cp.c : Likewise. * ipa-devirt.c : Likewise. * ipa-icf-gimple.c : Likewise. * ipa-icf.c : Likewise. * ipa-inline-analysis.c : Likewise. * ipa-inline-transform.c : Likewise. * ipa-inline.c : Likewise. * ipa-polymorphic-call.c : Likewise. * ipa-profile.c : Likewise. * ipa-prop.c : Likewise. * ipa-pure-const.c : Likewise. * ipa-ref.c : Likewise. * ipa-reference.c : Likewise. * ipa-split.c : Likewise. * ipa-utils.c : Likewise. * ipa-visibility.c : Likewise. * ipa.c : Likewise. * ira-build.c : Likewise. * ira-color.c : Likewise. * ira-conflicts.c : Likewise. * ira-costs.c : Likewise. * ira-emit.c : Likewise. * ira-lives.c : Likewise. * ira.c : Likewise. * jump.c : Likewise. * langhooks.c : Likewise. * lcm.c : Likewise. * libfuncs.h : Likewise. * lists.c : Likewise. * loop-doloop.c : Likewise. * loop-init.c : Likewise. * loop-invariant.c : Likewise. * loop-iv.c : Likewise. * loop-unroll.c : Likewise. * lower-subreg.c : Likewise. * lra-assigns.c : Likewise. * lra-coalesce.c : Likewise. * lra-constraints.c : Likewise. * lra-eliminations.c : Likewise. * lra-lives.c : Likewise. * lra-remat.c : Likewise. * lra-spills.c : Likewise. * lra.c : Likewise. * lto-cgraph.c : Likewise. * lto-compress.c : Likewise. * lto-opts.c : Likewise. * lto-section-in.c : Likewise. * lto-section-out.c : Likewise. * lto-streamer-in.c : Likewise. * lto-streamer-out.c : Likewise. * lto-streamer.c : Likewise. * lto-streamer.h : Likewise. * mcf.c : Likewise. * mode-switching.c : Likewise. * modulo-sched.c : Likewise. * omega.c : Likewise. * omp-low.c : Likewise. * optabs.c : Likewise. * opts-global.c : Likewise. * opts.h : Likewise. * passes.c : Likewise. * plugin.c : Likewise. * postreload-gcse.c : Likewise. * postreload.c : Likewise. * predict.c : Likewise. * print-rtl.c : Likewise. * print-tree.c : Likewise. * profile.c : Likewise. * read-md.c : Likewise. * read-md.h : Likewise. * read-rtl.c : Likewise. * real.c : Likewise. * realmpfr.c : Likewise. * recog.c : Likewise. * ree.c : Likewise. * reg-stack.c : Likewise. * regcprop.c : Likewise. * reginfo.c : Likewise. * regrename.c : Likewise. * regstat.c : Likewise. * reload.c : Likewise. * reload1.c : Likewise. * reorg.c : Likewise. * resource.c : Likewise. * rtl-chkp.c : Likewise. * rtl.c : Likewise. * rtl.h : Likewise. * rtlanal.c : Likewise. * rtlhash.c : Likewise. * rtlhash.h : Likewise. * rtlhooks.c : Likewise. * sanopt.c : Likewise. * sched-deps.c : Likewise. * sched-ebb.c : Likewise. * sched-rgn.c : Likewise. * sched-vis.c : Likewise. * sdbout.c : Likewise. * sel-sched-dump.c : Likewise. * sel-sched-ir.c : Likewise. * sel-sched-ir.h : Likewise. * sel-sched.c : Likewise. * sese.c : Likewise. * shrink-wrap.c : Likewise. * shrink-wrap.h : Likewise. * simplify-rtx.c : Likewise. * stack-ptr-mod.c : Likewise. * statistics.c : Likewise. * stmt.c : Likewise. * stor-layout.c : Likewise. * store-motion.c : Likewise. * stringpool.c : Likewise. * symtab.c : Likewise. * target-globals.c : Likewise. * targhooks.c : Likewise. * tlink.c : Likewise. * toplev.c : Likewise. * tracer.c : Likewise. * trans-mem.c : Likewise. * tree-affine.c : Likewise. * tree-affine.h : Likewise. * tree-browser.c : Likewise. * tree-call-cdce.c : Likewise. * tree-cfg.c : Likewise. * tree-cfgcleanup.c : Likewise. * tree-chkp-opt.c : Likewise. * tree-chkp.c : Likewise. * tree-chrec.c : Likewise. * tree-complex.c : Likewise. * tree-data-ref.c : Likewise. * tree-dfa.c : Likewise. * tree-diagnostic.c : Likewise. * tree-dump.c : Likewise. * tree-eh.c : Likewise. * tree-eh.h : Likewise. * tree-emutls.c : Likewise. * tree-hasher.h : Likewise. * tree-if-conv.c : Likewise. * tree-inline.c : Likewise. * tree-inline.h : Likewise. * tree-into-ssa.c : Likewise. * tree-iterator.c : Likewise. * tree-loop-distribution.c : Likewise. * tree-nested.c : Likewise. * tree-nrv.c : Likewise. * tree-object-size.c : Likewise. * tree-outof-ssa.c : Likewise. * tree-parloops.c : Likewise. * tree-phinodes.c : Likewise. * tree-predcom.c : Likewise. * tree-pretty-print.c : Likewise. * tree-profile.c : Likewise. * tree-scalar-evolution.c : Likewise. * tree-sra.c : Likewise. * tree-ssa-address.c : Likewise. * tree-ssa-alias.c : Likewise. * tree-ssa-ccp.c : Likewise. * tree-ssa-coalesce.c : Likewise. * tree-ssa-copy.c : Likewise. * tree-ssa-copyrename.c : Likewise. * tree-ssa-dce.c : Likewise. * tree-ssa-dom.c : Likewise. * tree-ssa-dse.c : Likewise. * tree-ssa-forwprop.c : Likewise. * tree-ssa-ifcombine.c : Likewise. * tree-ssa-live.c : Likewise. * tree-ssa-loop-ch.c : Likewise. * tree-ssa-loop-im.c : Likewise. * tree-ssa-loop-ivcanon.c : Likewise. * tree-ssa-loop-ivopts.c : Likewise. * tree-ssa-loop-manip.c : Likewise. * tree-ssa-loop-niter.c : Likewise. * tree-ssa-loop-prefetch.c : Likewise. * tree-ssa-loop-unswitch.c : Likewise. * tree-ssa-loop.c : Likewise. * tree-ssa-math-opts.c : Likewise. * tree-ssa-operands.c : Likewise. * tree-ssa-phiopt.c : Likewise. * tree-ssa-phiprop.c : Likewise. * tree-ssa-pre.c : Likewise. * tree-ssa-propagate.c : Likewise. * tree-ssa-reassoc.c : Likewise. * tree-ssa-sccvn.c : Likewise. * tree-ssa-scopedtables.c : Likewise. * tree-ssa-sink.c : Likewise. * tree-ssa-strlen.c : Likewise. * tree-ssa-structalias.c : Likewise. * tree-ssa-tail-merge.c : Likewise. * tree-ssa-ter.c : Likewise. * tree-ssa-threadedge.c : Likewise. * tree-ssa-threadupdate.c : Likewise. * tree-ssa-uncprop.c : Likewise. * tree-ssa-uninit.c : Likewise. * tree-ssa.c : Likewise. * tree-ssanames.c : Likewise. * tree-stdarg.c : Likewise. * tree-streamer-in.c : Likewise. * tree-streamer-out.c : Likewise. * tree-streamer.c : Likewise. * tree-streamer.h : Likewise. * tree-switch-conversion.c : Likewise. * tree-tailcall.c : Likewise. * tree-vect-data-refs.c : Likewise. * tree-vect-generic.c : Likewise. * tree-vect-loop-manip.c : Likewise. * tree-vect-loop.c : Likewise. * tree-vect-patterns.c : Likewise. * tree-vect-slp.c : Likewise. * tree-vect-stmts.c : Likewise. * tree-vectorizer.c : Likewise. * tree-vectorizer.h : Likewise. * tree-vrp.c : Likewise. * tree.c : Likewise. * tsan.c : Likewise. * ubsan.c : Likewise. * valtrack.c : Likewise. * valtrack.h : Likewise. * value-prof.c : Likewise. * var-tracking.c : Likewise. * varasm.c : Likewise. * varpool.c : Likewise. * vec.c: Likewise. * vmsdbgout.c : Likewise. * vtable-verify.c : Likewise. * vtable-verify.h : Likewise. * web.c : Likewise. * wide-int.cc : Likewise. * xcoffout.c : Likewise. * config/aarch64/aarch64-builtins.c : Likewise. * config/aarch64/aarch64.c : Likewise. * config/aarch64/cortex-a57-fma-steering.c : Likewise. * config/alpha/alpha.c : Likewise. * config/arc/arc.c : Likewise. * config/arm/aarch-common.c : Likewise. * config/arm/arm-builtins.c : Likewise. * config/arm/arm-c.c : Likewise. * config/arm/arm.c : Likewise. * config/avr/avr-c.c : Likewise. * config/avr/avr-log.c : Likewise. * config/avr/avr.c : Likewise. * config/bfin/bfin.c : Likewise. * config/c6x/c6x.c : Likewise. * config/cr16/cr16.c : Likewise. * config/cris/cris.c : Likewise. * config/darwin-c.c : Likewise. * config/darwin.c : Likewise. * config/default-c.c : Likewise. * config/epiphany/epiphany.c : Likewise. * config/epiphany/mode-switch-use.c : Likewise. * config/epiphany/resolve-sw-modes.c : Likewise. * config/fr30/fr30.c : Likewise. * config/frv/frv.c : Likewise. * config/ft32/ft32.c : Likewise. * config/glibc-c.c : Likewise. * config/h8300/h8300.c : Likewise. * config/i386/i386-c.c : Likewise. * config/i386/i386.c : Likewise. * config/i386/msformat-c.c : Likewise. * config/i386/winnt-cxx.c : Likewise. * config/i386/winnt-stubs.c : Likewise. * config/i386/winnt.c : Likewise. * config/ia64/ia64-c.c : Likewise. * config/ia64/ia64.c : Likewise. * config/iq2000/iq2000.c : Likewise. * config/lm32/lm32.c : Likewise. * config/m32c/m32c-pragma.c : Likewise. * config/m32c/m32c.c : Likewise. * config/m32r/m32r.c : Likewise. * config/m68k/m68k.c : Likewise. * config/mcore/mcore.c : Likewise. * config/mep/mep-pragma.c : Likewise. * config/mep/mep.c : Likewise. * config/microblaze/microblaze-c.c : Likewise. * config/microblaze/microblaze.c : Likewise. * config/mips/mips.c : Likewise. * config/mmix/mmix.c : Likewise. * config/mn10300/mn10300.c : Likewise. * config/moxie/moxie.c : Likewise. * config/msp430/msp430-c.c : Likewise. * config/msp430/msp430.c : Likewise. * config/nds32/nds32-cost.c : Likewise. * config/nds32/nds32-fp-as-gp.c : Likewise. * config/nds32/nds32-intrinsic.c : Likewise. * config/nds32/nds32-isr.c : Likewise. * config/nds32/nds32-md-auxiliary.c : Likewise. * config/nds32/nds32-memory-manipulation.c : Likewise. * config/nds32/nds32-pipelines-auxiliary.c : Likewise. * config/nds32/nds32-predicates.c : Likewise. * config/nds32/nds32.c : Likewise. * config/nios2/nios2.c : Likewise. * config/nvptx/nvptx.c : Likewise. * config/pa/pa.c : Likewise. * config/pdp11/pdp11.c : Likewise. * config/rl78/rl78-c.c : Likewise. * config/rl78/rl78.c : Likewise. * config/rs6000/rs6000-c.c : Likewise. * config/rs6000/rs6000.c : Likewise. * config/rx/rx.c : Likewise. * config/s390/s390-c.c : Likewise. * config/s390/s390.c : Likewise. * config/sh/sh-c.c : Likewise. * config/sh/sh-mem.cc : Likewise. * config/sh/sh.c : Likewise. * config/sh/sh_optimize_sett_clrt.cc : Likewise. * config/sh/sh_treg_combine.cc : Likewise. * config/sol2-c.c : Likewise. * config/sol2-cxx.c : Likewise. * config/sol2-stubs.c : Likewise. * config/sol2.c : Likewise. * config/sparc/sparc-c.c : Likewise. * config/sparc/sparc.c : Likewise. * config/spu/spu-c.c : Likewise. * config/spu/spu.c : Likewise. * config/stormy16/stormy16.c : Likewise. * config/tilegx/mul-tables.c : Likewise. * config/tilegx/tilegx-c.c : Likewise. * config/tilegx/tilegx.c : Likewise. * config/tilepro/mul-tables.c : Likewise. * config/tilepro/tilepro-c.c : Likewise. * config/tilepro/tilepro.c : Likewise. * config/v850/v850-c.c : Likewise. * config/v850/v850.c : Likewise. * config/vax/vax.c : Likewise. * config/visium/visium.c : Likewise. * config/vms/vms-c.c : Likewise. * config/vms/vms.c : Likewise. * config/vxworks.c : Likewise. * config/winnt-c.c : Likewise. * config/xtensa/xtensa.c : Likewise. ada 2015-06-08 Andrew MacLeod <amacleod@redhat.com> * gcc-interface/cuintp.c : Adjust include files. * gcc-interface/decl.c : Likewise. * gcc-interface/misc.c : Likewise. * gcc-interface/targtyps.c : Likewise. * gcc-interface/trans.c : Likewise. * gcc-interface/utils.c : Likewise. * gcc-interface/utils2.c : Likewise. c 2015-06-08 Andrew MacLeod <amacleod@redhat.com> * c-array-notation.c : Adjust include files. * c-aux-info.c : Likewise. * c-convert.c : Likewise. * c-decl.c : Likewise. * c-errors.c : Likewise. * c-lang.c : Likewise. * c-lang.h : Likewise. * c-objc-common.c : Likewise. * c-parser.c : Likewise. * c-typeck.c : Likewise. cfamily 2015-06-08 Andrew MacLeod <amacleod@redhat.com> * array-notation-common.c : Adjust include files. * c-ada-spec.c : Likewise. * c-cilkplus.c : Likewise. * c-common.c : Likewise. * c-common.h : Likewise. * c-cppbuiltin.c : Likewise. * c-dump.c : Likewise. * c-format.c : Likewise. * c-gimplify.c : Likewise. * c-indentation.c : Likewise. * c-lex.c : Likewise. * c-omp.c : Likewise. * c-opts.c : Likewise. * c-pch.c : Likewise. * c-ppoutput.c : Likewise. * c-pragma.c : Likewise. * c-pretty-print.c : Likewise. * c-semantics.c : Likewise. * c-ubsan.c : Likewise. * cilk.c : Likewise. * stub-objc.c : Likewise. cp 2015-06-08 Andrew MacLeod <amacleod@redhat.com> * call.c : Adjust include files. * class.c : Likewise. * constexpr.c : Likewise. * cp-array-notation.c : Likewise. * cp-cilkplus.c : Likewise. * cp-gimplify.c : Likewise. * cp-lang.c : Likewise. * cp-objcp-common.c : Likewise. * cp-tree.h : Likewise. * cp-ubsan.c : Likewise. * cvt.c : Likewise. * decl.c : Likewise. * decl2.c : Likewise. * dump.c : Likewise. * error.c : Likewise. * except.c : Likewise. * expr.c : Likewise. * friend.c : Likewise. * init.c : Likewise. * lambda.c : Likewise. * lex.c : Likewise. * mangle.c : Likewise. * method.c : Likewise. * name-lookup.c : Likewise. * optimize.c : Likewise. * parser.c : Likewise. * pt.c : Likewise. * ptree.c : Likewise. * repo.c : Likewise. * rtti.c : Likewise. * search.c : Likewise. * semantics.c : Likewise. * tree.c : Likewise. * typeck.c : Likewise. * typeck2.c : Likewise. * vtable-class-hierarchy.c : Likewise. fortran 2015-06-08 Andrew MacLeod <amacleod@redhat.com> * convert.c : Adjust include files. * cpp.c : Likewise. * decl.c : Likewise. * f95-lang.c : Likewise. * gfortran.h : Likewise. * iresolve.c : Likewise. * match.c : Likewise. * module.c : Likewise. * openmp.c : Likewise. * options.c : Likewise. * target-memory.c : Likewise. * trans-array.c : Likewise. * trans-common.c : Likewise. * trans-const.c : Likewise. * trans-decl.c : Likewise. * trans-expr.c : Likewise. * trans-intrinsic.c : Likewise. * trans-io.c : Likewise. * trans-openmp.c : Likewise. * trans-stmt.c : Likewise. * trans-types.c : Likewise. * trans.c : Likewise. go 2015-06-08 Andrew MacLeod <amacleod@redhat.com> * go-backend.c : Adjust include files. * go-gcc.cc : Likewise. * go-lang.c : Likewise. java 2015-06-08 Andrew MacLeod <amacleod@redhat.com> * boehm.c : Adjust include files. * builtins.c : Likewise. * class.c : Likewise. * constants.c : Likewise. * decl.c : Likewise. * except.c : Likewise. * expr.c : Likewise. * java-gimplify.c : Likewise. * java-tree.h : Likewise. * jcf-dump.c : Likewise. * jcf-io.c : Likewise. * jcf-parse.c : Likewise. * jcf-reader.c : Likewise. * jvgenmain.c : Likewise. * lang.c : Likewise. * mangle.c : Likewise. * mangle_name.c : Likewise. * resource.c : Likewise. * typeck.c : Likewise. * verify-glue.c : Likewise. * verify-impl.c : Likewise. jit 2015-06-08 Andrew MacLeod <amacleod@redhat.com> * dummy-frontend.c : Adjust include files. * jit-common.h : Likewise. * jit-playback.c : Likewise. lto 2015-06-08 Andrew MacLeod <amacleod@redhat.com> * lto-lang.c : Adjust include files. * lto-object.c : Likewise. * lto-partition.c : Likewise. * lto-partition.h : Likewise. * lto-symtab.c : Likewise. * lto.c : Likewise. * lto.h : Likewise. objc 2015-06-08 Andrew MacLeod <amacleod@redhat.com> * objc-act.c : Adjust include files. * objc-encoding.c : Likewise. * objc-gnu-runtime-abi-01.c : Likewise. * objc-lang.c : Likewise. * objc-map.c : Likewise. * objc-next-runtime-abi-01.c : Likewise. * objc-next-runtime-abi-02.c : Likewise. * objc-runtime-shared-support.c : Likewise. objcp 2015-06-08 Andrew MacLeod <amacleod@redhat.com> * objcp-decl.c : Adjust include files. * objcp-lang.c : Likewise. From-SVN: r224250
2015-05-28tree-vectorizer.h (struct _slp_instance): Remove body_cost_vec member.Richard Biener1-6/+2
2015-05-28 Richard Biener <rguenther@suse.de> * tree-vectorizer.h (struct _slp_instance): Remove body_cost_vec member. (SLP_INSTANCE_BODY_COST_VEC): Remove. (vect_update_slp_costs_according_to_vf): Likewise. (vect_slp_analyze_operations): Update prototype. * tree-vect-loop.c (vect_analyze_loop_2): Remove call to vect_update_slp_costs_according_to_vf, adjust. * tree-vect-slp.c (vect_free_slp_instance): Adjust. (vect_analyze_slp_cost_1): Likewise. (vect_analyze_slp_cost): Likewise. Properly deal with widening reduction ops. Commit body costs. (vect_analyze_slp_instance): Adjust. Do not analyze SLP cost for loops from here. (vect_slp_analyze_operations): But do it from here when the vectorization factor is known and stmts are analyzed. (vect_bb_vectorization_profitable_p): Simplify. (vect_slp_analyze_bb_1): Do not compute SLP cost here. (vect_update_slp_costs_according_to_vf): Remove. From-SVN: r223798
2015-05-26tree-vect-loop.c (vect_update_vf_for_slp): Split out from ...Richard Biener1-0/+1
2015-05-26 Richard Biener <rguenther@suse.de> * tree-vect-loop.c (vect_update_vf_for_slp): Split out from ... (vect_analyze_loop_operations): ... here. Remove slp parameter, detect whether we apply SLP. Remove call to vect_update_slp_costs_according_to_vf. (vect_analyze_loop_2): Call vect_update_vf_for_slp and vect_update_slp_costs_according_to_vf from here. Dispatch to vect_slp_analyze_operations to analyze SLP stmts. * tree-vect-slp.c (vect_slp_analyze_node_operations): Drop unused bb_vec_info parameter, adjust assert. (vect_slp_analyze_operations): Pass in the slp instance tree instead of bb_vec_info. (vect_slp_analyze_bb_1): Adjust call to vect_slp_analyze_operations. * tree-vectorizer.h (vect_slp_analyze_operations): Declare. From-SVN: r223670