aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-07-31* check.c (gfc_check_num_images): Fix a pasto.Jakub Jelinek2-1/+5
From-SVN: r250734
2017-07-31Learn GIMPLE pretty printer to produce nicer dump output.Martin Liska5-29/+22
2017-07-31 Martin Liska <mliska@suse.cz> * gimple-pretty-print.c (dump_gimple_label): Never dump BB info. (dump_gimple_bb_header): Always dump BB info. (pp_cfg_jump): Do not append info about BB when dumping a jump. 2017-07-31 Martin Liska <mliska@suse.cz> * gcc.dg/builtin-unreachable-6.c: Update scanned patterns. * gcc.dg/tree-ssa/attr-hotcold-2.c: Likewise. From-SVN: r250731
2017-07-31Do UBSAN sanitization just when current_function_decl != NULL_TREE (PR ↵Martin Liska16-6/+62
sanitize/81530). 2017-07-31 Martin Liska <mliska@suse.cz> PR sanitize/81530 * cp-gimplify.c (cp_genericize): Guard condition with flag_sanitize_p also with current_function_decl non-null equality. * cp-ubsan.c (cp_ubsan_instrument_vptr_p): Likewise. * decl.c (compute_array_index_type): Likewise. * init.c (finish_length_check): Likewise. * typeck.c (cp_build_binary_op): Likewise. 2017-07-31 Martin Liska <mliska@suse.cz> PR sanitize/81530 * c-convert.c (convert): Guard condition with flag_sanitize_p also with current_function_decl non-null equality. * c-decl.c (grokdeclarator): Likewise. * c-typeck.c (build_binary_op): Likewise. 2017-07-31 Martin Liska <mliska@suse.cz> PR sanitize/81530 * convert.c (convert_to_integer_1): Guard condition with flag_sanitize_p also with current_function_decl non-null equality. 2017-07-31 Martin Liska <mliska@suse.cz> PR sanitize/81530 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Guard condition with flag_sanitize_p also with current_function_decl non-null equality. (ubsan_maybe_instrument_reference_or_call): Likewise. 2017-07-31 Martin Liska <mliska@suse.cz> PR sanitize/81530 * g++.dg/ubsan/pr81530.C: New test. From-SVN: r250730
2017-07-31re PR sanitizer/81604 (Ubsan type reporting can be bogus in some cases)Jakub Jelinek4-6/+48
PR sanitizer/81604 * ubsan.c (ubsan_type_descriptor): For UBSAN_PRINT_ARRAY don't change type to the element type, instead add eltype variable and use it where we are interested in the element type. * c-c++-common/ubsan/pr81604.c: New test. From-SVN: r250728
2017-07-31re PR tree-optimization/81603 (Various compiler UB on very large constant ↵Jakub Jelinek2-5/+22
offsets) PR tree-optimization/81603 * ipa-polymorphic-call.c (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Perform offset arithmetic in offset_int, bail out if the resulting bit offset doesn't fit into shwi. From-SVN: r250727
2017-07-31Remove a Java-specific hunk.Martin Liska2-8/+7
2017-07-31 Martin Liska <mliska@suse.cz> * gimplify.c (mostly_copy_tree_r): Remove Java specific hunk. (gimplify_save_expr): Fix comment. From-SVN: r250726
2017-07-31Daily bump.GCC Administrator1-1/+1
From-SVN: r250725
2017-07-30i386: Update INCOMING_FRAME_SP_OFFSET for exception handlerH.J. Lu8-36/+88
Since there is an extra error code passed to the exception handler, INCOMING_FRAME_SP_OFFSET is return address plus error code for the exception handler. This patch updates INCOMING_FRAME_SP_OFFSET to the correct value for the exception handler. This patch exposed a bug in DWARF stack frame CFI generation, which assumes that INCOMING_FRAME_SP_OFFSET is the same for all functions: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81570 It sets and caches the incoming stack frame offset with the same INCOMING_FRAME_SP_OFFSET for all functions. When there are both exception handler and normal function in the same input, the wrong incoming stack frame offset is used for exception handler or normal function, which leads to FAIL: gcc.dg/guality/pr68037-1.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects line 33 error == 0x12345670 FAIL: gcc.dg/guality/pr68037-1.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects line 33 frame->ip == 0x12345671 FAIL: gcc.dg/guality/pr68037-1.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects line 33 frame->cs == 0x12345672 FAIL: gcc.dg/guality/pr68037-1.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects line 33 frame->flags == 0x12345673 FAIL: gcc.dg/guality/pr68037-1.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects line 33 frame->sp == 0x12345674 FAIL: gcc.dg/guality/pr68037-1.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects line 33 frame->ss == 0x12345675 With the patch for PR 81570: https://gcc.gnu.org/ml/gcc-patches/2017-07/msg01851.html applied, there are no regressions on i686 and x86-64. gcc/ PR target/79793 * config/i386/i386.c (ix86_function_arg): Update arguments for exception handler. (ix86_compute_frame_layout): Set the initial stack offset to INCOMING_FRAME_SP_OFFSET. Update red-zone offset with INCOMING_FRAME_SP_OFFSET. (ix86_expand_epilogue): Don't pop the 'ERROR_CODE' off the stack before exception handler returns. * config/i386/i386.h (INCOMING_FRAME_SP_OFFSET): Add the the 'ERROR_CODE' for exception handler. gcc/testsuite/ PR target/79793 * gcc.dg/guality/pr68037-1.c: Update gdb breakpoints. * gcc.target/i386/interrupt-5.c (interrupt_frame): New struct. (foo): Check the builtin return address against the return address in interrupt frame. * gcc.target/i386/pr79793-1.c: New test. * gcc.target/i386/pr79793-2.c: Likewise. From-SVN: r250721
2017-07-30i386.h (ASM_PRINTF_EXTENSIONS): New macro.Uros Bizjak3-24/+35
* config/i386/i386.h (ASM_PRINTF_EXTENSIONS): New macro. (ASM_OUTPUT_REG_PUSH): Rewrite with new operand modifiers. (ASM_OUTPUT_REG_POP): Ditto. * config/i386/i386.c (ix86_asm_output_function_label): Use fputs instead of asm_fprintf to output pure string. From-SVN: r250720
2017-07-30c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.Uros Bizjak2-0/+5
* c-format.c (asm_fprintf_char_table): Add 'z' to format_chars. From-SVN: r250719
2017-07-30Daily bump.GCC Administrator1-1/+1
From-SVN: r250718
2017-07-29c-ada-spec.c (dump_generic_ada_node): Take into account signedness for ↵Eric Botcazou4-2/+30
enumeral types. * c-ada-spec.c (dump_generic_ada_node): Take into account signedness for enumeral types. (print_ada_declaration): Add missing guard for record types. From-SVN: r250714
2017-07-29debug.h (struct gcc_debug_hooks): Add IMPLICIT argument to ↵Jakub Jelinek17-26/+148
imported_module_or_decl hook. * debug.h (struct gcc_debug_hooks): Add IMPLICIT argument to imported_module_or_decl hook. (debug_nothing_tree_tree_tree_bool): Remove. (debug_nothing_tree_tree_tree_bool_bool): New declaration. * debug.c (do_nothing_debug_hooks): Use debug_nothing_tree_tree_tree_bool_bool instead of debug_nothing_tree_tree_tree_bool. * vmsdbgout.c (vmsdbg_debug_hooks): Likewise. * dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Likewise. * sdbout.c (sdb_debug_hooks): Likewise. * dwarf2out.c (dwarf2_lineno_debug_hooks): Likewise. (gen_namespace_die): Add DW_AT_export_symbols attribute if langhook wants it. (dwarf2out_imported_module_or_decl): Add IMPLICIT argument, if true, -gdwarf-5 and decl will have DW_AT_export_symbols attribute, don't add anything. cp/ * cp-objcp-common.c (cp_decl_dwarf_attribute): Handle DW_AT_export_symbols. * name-lookup.c (emit_debug_info_using_namespace): Add IMPLICIT argument, pass it through to the debug hook. (finish_namespace_using_directive): Adjust emit_debug_info_using_namespace caller. (push_namespace): Likewise. Call it after setting DECL_NAMESPACE_INLINE_P. (cp_emit_debug_info_for_using): Pass false as new argument to the imported_module_or_decl debug hook. fortran/ * trans-decl.c (gfc_trans_use_stmts): Pass false as new argument to the imported_module_or_decl debug hook. ada/ * gcc-interface/utils.c (gnat_write_global_declarations): Pass false as new argument to the imported_module_or_decl debug hook. testsuite/ * g++.dg/debug/dwarf2/inline-ns-1.C: New test. * g++.dg/debug/dwarf2/inline-ns-2.C: New test. From-SVN: r250713
2017-07-29use c++ for fold_buildN_locTrevor Saunders3-19/+23
gcc/ChangeLog: 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * fold-const.c (fold_build1_stat_loc): Remove _stat from name. (fold_build2_stat_loc): Likewise. (fold_build3_stat_loc): Likewise. * fold-const.h (fold_build1, fold_build2, fold_build3): Adjust. (fold_build1_loc): Remove macro. (fold_build2_loc): Likewise. (fold_build3_loc): Likewise. From-SVN: r250712
2017-07-29use c++ for gimple_build_debug_bind{,_source}Trevor Saunders3-8/+11
gcc/ChangeLog: 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * gimple.c (gimple_build_debug_bind_stat): Remove _stat from name. (gimple_build_debug_bind_source_stat): Likewise. * gimple.h (gimple_build_debug_bind): Remove macro. (gimple_build_debug_bind_source): Likewise. From-SVN: r250711
2017-07-29use c++ for bitmap_initializeTrevor Saunders3-4/+9
gcc/ChangeLog: 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * bitmap.c (bitmap_alloc): Adjust. (bitmap_gc_alloc): Likewise. * bitmap.h (bitmap_initialize_stat): Remove _stat from name. From-SVN: r250710
2017-07-29simplify the bitmap alloc_stat functions with c++Trevor Saunders5-13/+19
gcc/fortran/ChangeLog: 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * resolve.c (find_reachable_labels): Adjust. gcc/ChangeLog: 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * bitmap.c (bitmap_obstack_alloc_stat): Rename to bitmap_alloc. (bitmap_gc_alloc_stat): Rename to bitmap_gc_alloc. * bitmap.h (bitmap_obstack_alloc_stat): Adjust prototype. (bitmap_gc_alloc_stat): Likewise. (BITMAP_ALLOC, BITMAP_GGC_ALLOC): Adjust. From-SVN: r250709
2017-07-29replace shallow_copy_rtx_stat with c++Trevor Saunders3-3/+7
gcc/ChangeLog: 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * rtl.c (shallow_copy_rtx_stat): Remove _stat from name. * rtl.h (shallow_copy_rtx): Remove macro. From-SVN: r250708
2017-07-29replace rtx_alloc_stat with c++Trevor Saunders5-5/+11
gcc/ChangeLog: 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * emit-rtl.c (gen_raw_REG): Adjust. * gengenrtl.c (gendef): Likewise. * rtl.c (rtx_alloc_stat): Remove _stat from name. * rtl.h (rtx_alloc): Remove macro. From-SVN: r250707
2017-07-29use c++ for build_tree_list{,_vec}_statTrevor Saunders3-7/+12
gcc/ChangeLog: 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * tree.c (build_tree_list_vec_stat): Remove _stat from name. (build_tree_list_stat): Likewise. * tree.h (build_tree_list): Remove macro. (build_tree_list_vec): Likewise. From-SVN: r250706
2017-07-29use C++ for {make,build}_vector_statTrevor Saunders3-6/+11
gcc/ChangeLog: 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * tree.c (make_vector_stat): Remove _stat from name. (build_vector_stat): Likewise. * tree.h (make_vector_stat): Remove macro. (build_vector_stat): Likewise. From-SVN: r250705
2017-07-29remove unused build_var_debug_value prototypeTrevor Saunders2-4/+4
gcc/ChangeLog: 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * tree.h (build_var_debug_value): Remove prototype. From-SVN: r250704
2017-07-29use c++ for tree_cons_statTrevor Saunders3-3/+7
gcc/ChangeLog: 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * tree.c (tree_cons_stat): Remove _stat from name. * tree.h (tree_cons): Remove macro. From-SVN: r250703
2017-07-29use c++ instead of build_vl_exp_statTrevor Saunders3-3/+7
gcc/ChangeLog: 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * tree.c (build_vl_exp_stat): Remove _stat from name. * tree.h (build_vl_exp): Remove macro. From-SVN: r250702
2017-07-29use c++ instead of build_decl_statTrevor Saunders3-4/+8
gcc/ChangeLog: 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * tree.c (build_decl_stat): Remove _stat from name. * tree.h (build_decl): Remove macro. From-SVN: r250701
2017-07-29replace gimple_alloc_stat with c++Trevor Saunders3-4/+9
gcc/ChangeLog: 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * gimple.c (gimple_build_with_ops_stat): Adjust. (gimple_alloc_stat): Remove _stat from name. * gimple.h (gimple_alloc): Remove macro. From-SVN: r250700
2017-07-29use c++ instead of {make,grow}_tree_vec_statTrevor Saunders3-6/+13
gcc/ChangeLog: 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * tree.c (make_tree_vec_stat): Remove _stat from name. (grow_tree_vec_stat): Likewise. * tree.h (make_tree_vec_stat): Adjust prototype. (grow_tree_vec_stat): Likewise. (make_tree_vec): Remove macro. (grow_tree_vec): Likewise. From-SVN: r250699
2017-07-29use c++ instead of buildN_stat{,_loc}Trevor Saunders4-49/+53
gcc/ChangeLog: 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * fold-const.c (fold_build1_stat_loc): Adjust. (fold_build2_stat_loc): Likewise. (fold_build3_stat_loc): Likewise. * tree.c (build0_stat): Remove _stat from name. (build1_stat): Likewise. (build2_stat): Likewise. (build3_stat): Likewise. (build4_stat): Likewise. (build5_stat): Likewise. * tree.h (build1_loc): Remove macro, and rename _stat function to this. (build2_loc): Likewise. (build3_loc): Likewise. (build4_loc): Likewise. (build5_loc): Likewise. From-SVN: r250698
2017-07-29use c++ for make_int_cst_statTrevor Saunders3-4/+8
gcc/ChangeLog: 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * tree.c (make_int_cst_stat): Remove _stat from name. * tree.h (make_int_cst_stat): Adjust prototype. (make_int_cst): Remove macro. From-SVN: r250697
2017-07-29use cxx instead of make_tree_binfo_statTrevor Saunders3-3/+8
gcc/ChangeLog: 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * tree.c (make_tre_binfo_stat): Remove _stat from name. * tree.h (make_tree_binfo_stat): Adjust prototype. (make_tree_binfo): Remove. From-SVN: r250696
2017-07-29use c++ instead of _stat for copy_node_statTrevor Saunders5-6/+17
gcc/cp/ChangeLog: 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * lex.c (copy_decl): Adjust. (copy_type): Likewise. gcc/ChangeLog: 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * tree.c (copy_node_stat): Rename to copy_node. (build_distinct_type_copy): Adjust. * tree.h (copy_node_stat): Adjust prototype. (copy_node): Remove macro. From-SVN: r250695
2017-07-29use c++ instead of make_node_statTrevor Saunders3-10/+22
gcc/ChangeLog: 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * tree.c (make_node_stat): rename to make_node. (build_tree_list_stat): Adjust. (build0_stat): Likewise. (build2_stat): Likewise. (build3_stat): Likewise. (build4_stat): Likewise. (build5_stat): Likewise. (build_decl_stat): Likewise. * tree.h (make_node_stat): Adjust prototype. (make_node): remove macro. From-SVN: r250694
2017-07-29Daily bump.GCC Administrator1-1/+1
From-SVN: r250693
2017-07-28ppc-auxv.h (PPC_FEATURE2_DARN): New define.Peter Bergner5-1/+17
gcc/ * config/rs6000/ppc-auxv.h (PPC_FEATURE2_DARN): New define. (PPC_FEATURE2_SCV): Likewise. * config/rs6000/rs6000.c (cpu_supports_info): Use them. gcc/testsuite/ * gcc.target/powerpc/cpu-builtin-1.c (darn, scv): Add tests. From-SVN: r250687
2017-07-28compiler: add backend type conversionIan Lance Taylor2-2/+5
Tweak Interface_field_reference_expression::do_get_backend to apply an additional backend type conversion to the returned result. This is needed due to the fact that the top level type of the expression is a function descriptor, however the value being manufactured is a pointer to <thunk-descriptor, value> struct. Reviewed-on: https://go-review.googlesource.com/51712 From-SVN: r250686
2017-07-28configure.ac (target-libffi): Don't disable for AIX.Tony Reix3-14/+9
2017-07-28 Tony Reix <tony.reix@atos.net> * configure.ac (target-libffi): Don't disable for AIX. (go): Don't add to unsupported_languages on AIX. (target-libgo): Don't disable for AIX. * configure: Regenerate. From-SVN: r250685
2017-07-28* xcoff.c: Don't leak a file descriptor if an archive is malformed.Tony Reix2-4/+9
From-SVN: r250684
2017-07-28compiler: track placeholder pointer types for conversionIan Lance Taylor3-5/+15
We recently started walking through the hash table of pointer types to finalize them. Unfortunately it is possible to create a new pointer type while finalizing an existing one (test case: test/fixedbugs/issue5291) and that breaks the iteration. So, instead, keep a list of placeholder pointer types, and iterate through them while permitting the list to be extended as we go. Reviewed-on: https://go-review.googlesource.com/51771 From-SVN: r250683
2017-07-28compiler: use a single temporary for calls with multiple resultsIan Lance Taylor3-135/+60
For calls that return multiple results we used to create a temporary of struct type to hold the results, and also create a separate temporary for each result. Then the call expression would copy each result out of the struct to the temporary, and Call_result_expression would refer to the desired temporary. Simplify this to just use a single temporary of struct type, and change Call_result_expression to fetch a field of the struct. This may reduce some incorrect tree sharing in the backend code. Reviewed-on: https://go-review.googlesource.com/51770 From-SVN: r250682
2017-07-282017-07-28 Tamar Christina <tamar.christina@arm.com>Tamar Christina5-6/+102
* config/aarch64/aarch64.c (aarch64_internal_mov_immediate): Add new special pattern. * config/aarch64/aarch64.md (*movdi_aarch64): Add reg/32bit const mov case. gcc/testsuite/ 2017-07-28 Tamar Christina <tamar.christina@arm.com> * gcc.target/aarch64/int_mov_immediate_1.c: New. From-SVN: r250680
2017-07-28pr80815-3.c: Require vect_perm.Bin Cheng2-1/+5
gcc/testsuite * gcc.dg/vect/pr80815-3.c: Require vect_perm. From-SVN: r250676
2017-07-28Fix pid_t printingRainer Orth2-1/+6
* fileline.c (fileline_initialize): Print pid_t as long. From-SVN: r250675
2017-07-28dbl_mov_immediate_1.c: New.Tamar Christina6-9/+217
2017-07-28 Tamar Christina <tamar.christina@arm.com> Bilyan Borisov <bilyan.borisov@arm.com> * gcc.target/aarch64/dbl_mov_immediate_1.c: New. * gcc.target/aarch64/flt_mov_immediate_1.c: New. * gcc.target/aarch64/f16_mov_immediate_1.c: New. * gcc.target/aarch64/f16_mov_immediate_2.c: New. * gcc.target/aarch64/pr63304_1.c: Changed to double. Co-Authored-By: Bilyan Borisov <bilyan.borisov@arm.com> From-SVN: r250674
2017-07-28aarch64.md (mov<mode>): Generalize.Tamar Christina4-26/+82
2017-07-28 Tamar Christina <tamar.christina@arm.com> Richard Sandiford <richard.sandiford@linaro.org> * config/aarch64/aarch64.md (mov<mode>): Generalize. (*movhf_aarch64, *movsf_aarch64, *movdf_aarch64): Add integer and movi cases. (movi-split-hf-df-sf split, fp16): New. (enabled): Added TARGET_FP_F16INST. * config/aarch64/iterators.md (GPF_HF): New. * config/aarch64/predicates.md (aarch64_reg_or_fp_float): New. Co-Authored-By: Richard Sandiford <richard.sandiford@linaro.org> From-SVN: r250673
2017-07-282017-07-28 Tamar Christina <tamar.christina@arm.com>Tamar Christina5-46/+207
* config/aarch64/aarch64.c (aarch64_simd_container_mode): Add prototype. (aarch64_expand_mov_immediate): Add HI support. (aarch64_reinterpret_float_as_int, aarch64_float_const_rtx_p: New. (aarch64_can_const_movi_rtx_p): New. (aarch64_preferred_reload_class): Remove restrictions of using FP registers for certain SIMD operations. (aarch64_rtx_costs): Added new cost for CONST_DOUBLE moves. (aarch64_valid_floating_const): Add integer move validation. (aarch64_simd_imm_scalar_p): Remove. (aarch64_output_scalar_simd_mov_immediate): Generalize function. (aarch64_legitimate_constant_p): Expand list of supported cases. * config/aarch64/aarch64-protos.h (aarch64_float_const_rtx_p, aarch64_can_const_movi_rtx_p): New. (aarch64_reinterpret_float_as_int): New. (aarch64_simd_imm_scalar_p): Remove. * config/aarch64/constraints.md (Uvi): New. (Dd): Split into Ds and new Dd. * config/aarch64/aarch64.md (*movsi_aarch64): Add SIMD mov case. (*movdi_aarch64): Add SIMD mov case. From-SVN: r250672
2017-07-28tree-predcom.c: (struct chain): Handle store-store chain in which stores for ↵Bin Cheng2-6/+135
elimination only... * tree-predcom.c: (struct chain): Handle store-store chain in which stores for elimination only store loop invariant values. (execute_pred_commoning_chain): Ditto. (prepare_initializers_chain_store_elim): Ditto. (prepare_finalizers): Ditto. (is_inv_store_elimination_chain): New function. (initialize_root_vars_store_elim_1): New function. From-SVN: r250670
2017-07-28tree-predcom.c: Revise general description of the pass.Bin Cheng14-46/+1206
* tree-predcom.c: Revise general description of the pass. (enum chain_type): New enum type for store elimination. (struct chain): New field supporting store elimination. (struct component): Ditto. (dump_chain): Dump store-stores chain. (release_chain): Release resources. (split_data_refs_to_components): Compute and create component contains only stores for elimination. (get_chain_last_ref_at): New function. (make_invariant_chain): Initialization. (make_rooted_chain): Specify chain type in parameter and record it. (add_looparound_copies): Skip for store-stores chain. (determine_roots_comp): Compute type of chain and pass it to make_rooted_chain. (initialize_root_vars_store_elim_2): New function. (finalize_eliminated_stores): New function. (remove_stmt): Handle store for elimination. (execute_pred_commoning_chain): Execute predictive commoning on store-store chains. (determine_unroll_factor): Skip unroll for store-stores chain. (prepare_initializers_chain_store_elim): New function. (prepare_initializers_chain): Hanlde store-store chain. (prepare_finalizers_chain, prepare_finalizers): New function. (tree_predictive_commoning_loop): Return integer value indicating if loop is unrolled or lcssa form is corrupted. (tree_predictive_commoning): Rewrite for lcssa form if necessary. gcc/testsuite * gcc.dg/tree-ssa/predcom-dse-1.c: New test. * gcc.dg/tree-ssa/predcom-dse-2.c: New test. * gcc.dg/tree-ssa/predcom-dse-3.c: New test. * gcc.dg/tree-ssa/predcom-dse-4.c: New test. * gcc.dg/tree-ssa/predcom-dse-5.c: New test. * gcc.dg/tree-ssa/predcom-dse-6.c: New test. * gcc.dg/tree-ssa/predcom-dse-7.c: New test. * gcc.dg/tree-ssa/predcom-dse-8.c: New test. * gcc.dg/tree-ssa/predcom-dse-9.c: New test. * gcc.dg/tree-ssa/predcom-dse-10.c: New test. * gcc.dg/tree-ssa/predcom-dse-11.c: New test. From-SVN: r250669
2017-07-28tree-predcom.c (initialize_root): Delete.Bin Cheng2-21/+16
* tree-predcom.c (initialize_root): Delete. (execute_pred_commoning_chain): Initialize root vars and replace reference of non-combined chain directly, rather than call above function. From-SVN: r250668
2017-07-28tree-predcom.c (ref_at_iteration): Add parameter NITERS.Bin Cheng2-11/+30
* tree-predcom.c (ref_at_iteration): Add parameter NITERS. Compute memory reference to DR at (NITERS + ITERS)-th iteration of loop. From-SVN: r250667
2017-07-28tree-predcom.c (struct chain): New field init_seq.Bin Cheng2-1/+33
* tree-predcom.c (struct chain): New field init_seq. (release_chain): Release init_seq. (prepare_initializers_chain): Record intialization stmts in above field. (insert_init_seqs): New function. (tree_predictive_commoning_loop): Call insert_init_seqs. From-SVN: r250666