1. 21 Jun, 2018 7 commits
    • [ARM] libgcc: Remove unsupported code for __ARM_ARCH__ < 4 · d1b0dd54
      2018-06-21  Christophe Lyon  <christophe.lyon@linaro.org>
      
      	libgcc/
      	* config/arm/ieee754-df.S: Remove code for __ARM_ARCH__ < 4, no
      	longer supported.
      	* config/arm/ieee754-sf.S: Likewise.
      
      From-SVN: r261840
      Christophe Lyon committed
    • [AArch64][PATCH 2/2] Combine AES instructions with xor and zero operands · 9b57fd3d
      gcc
      2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
      
      	* config/aarch64/aarch64-simd.md
      	(*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
      
      gcc/testsuite
      2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
      
      	* gcc/gcc.target/aarch64/aes_xor_combine.c: New test.
      
      From-SVN: r261836
      Andre Vieira committed
    • [AArch64][PATCH 1/2] Make AES unspecs commutative · ff029883
      gcc
      2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
      
      	* config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
      	Make opernads of the unspec commutative.
      
      gcc/testsuite
      2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
      
      	* gcc/gcc.target/aarch64/aes_2.c: New test.
      
      From-SVN: r261835
      Andre Vieira committed
    • tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP. · 5fa23466
      2018-06-21  Richard Biener  <rguenther@suse.de>
      
      	* tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
      	* tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
      	Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
      	(vect_analyze_data_ref_dependence): Re-order checks to deal with
      	NULL DR_STEP.
      	(vect_record_base_alignments): Do not record base alignment
      	for gathers or scatters.
      	(vect_compute_data_ref_alignment): Drop return value that is always
      	true.  Bail out early for gathers or scatters.
      	(vect_enhance_data_refs_alignment): Bail out early for gathers
      	or scatters.
      	(vect_find_same_alignment_drs): Likewise.
      	(vect_analyze_data_refs_alignment): Remove dead code.
      	(vect_slp_analyze_and_verify_node_alignment): Likewise.
      	(vect_analyze_data_refs): For possible gathers or scatters do
      	not create an alternate DR, just check their possible validity
      	and mark them.  Adjust DECL_NONALIASED handling to not rely
      	on DR_BASE_ADDRESS.
      	* tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
      	update inits of gathers or scatters.
      	* tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
      	Also copy gather/scatter flag to pattern vinfo.
      
      From-SVN: r261834
      Richard Biener committed
    • re PR other/86198 (Libbacktrace does not properly work with ".note.gnu.build-id" section) · 1ac6620a
      libbacktrace/
      
      2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>
      
      	PR other/86198
      	* elf.c (elf_add): Increase ".note.gnu.build-id" section size
      	checking up to 36 bytes.
      
      From-SVN: r261832
      Denis Khalikov committed
    • debug.h (_Safe_iterator<>(const _Safe_iterator<_MutableIterator,>& __x)):… · 802743ba
      debug.h (_Safe_iterator<>(const _Safe_iterator<_MutableIterator,>& __x)): Compare __x base iterator with a default initialized iterator of the same type.
      
      2018-06-21  François Dumont  <fdumont@gcc.gnu.org>
      
      	* include/debug/debug.h
      	(_Safe_iterator<>(const _Safe_iterator<_MutableIterator,>& __x)):
      	Compare __x base iterator with a default initialized iterator of the
      	same type.
      
      From-SVN: r261831
      François Dumont committed
    • Daily bump. · a788a23c
      From-SVN: r261830
      GCC Administrator committed
  2. 20 Jun, 2018 30 commits
    • re PR libgcc/86213 (-fsplit-stack runtime may clobber SSE input param reg) · 1f3fa525
      libgcc/:
      	PR libgcc/86213
      	* generic-morestack.c (allocate_segment): Move calls to getenv and
      	getpagesize to __morestack_load_mmap.
      	(__morestack_load_mmap) Initialize static_pagesize and
      	use_guard_page here so as to avoid clobbering SSE regs during a
      	__morestack call.
      gcc/testsuite/:
      	* gcc.dg/split-8.c: New.
      
      From-SVN: r261823
      Than McIntosh committed
    • rs6000-c.c (altivec_overloaded_builtins): Change behavior of vec_packsu (vector… · d8e7bf49
      rs6000-c.c (altivec_overloaded_builtins): Change behavior of vec_packsu (vector unsigned long long...
      
      gcc/ChangeLog:
      
      2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
      
      	* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
      	behavior of vec_packsu (vector unsigned long long, vector unsigned
      	long long) to match behavior of vec_packs with same signature.
      
      gcc/testsuite/ChangeLog:
      
      2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
      
      	* gcc.target/powerpc/builtins-1.c: Adjust dg directives to scan
      	for vpkudus in place of vpksdus.
      	* gcc.target/powerpc/builtins-3-p8.c: Likewise.
      
      From-SVN: r261819
      Kelvin Nilsen committed
    • PR libstdc++/70966 make pmr::new_delete_resource() immortal · e70359b3
      Construct the program-wide resource objects using placement new. This
      means they have dynamic storage duration and won't be destroyed during
      termination.
      
      	PR libstdc++/70966
      	* include/experimental/memory_resource (__resource_adaptor_imp): Add
      	static assertions to enforce requirements on pointer types.
      	(__resource_adaptor_imp::get_allocator()): Add noexcept.
      	(new_delete_resource, null_memory_resource): Return address of an
      	object with dynamic storage duration.
      	(__null_memory_resource): Remove.
      	* testsuite/experimental/memory_resource/70966.cc: New.
      
      From-SVN: r261818
      Jonathan Wakely committed
    • [PR c++/85634] Fix tsubst ICE · c1456656
      https://gcc.gnu.org/ml/gcc-patches/2018-06/msg01274.html
      	PR c++/85634
      	* friend.c (add_friend): Keep lookup sets of tempate sets.
      
      	PR c++/85634
      	* g++.dg/lookup/pr85634-2.C: New.
      
      From-SVN: r261817
      Nathan Sidwell committed
    • decl.c (grokfndecl): Add const cp_decl_specifier_seq* parameter... · f2cb6e64
      /cp
      2018-06-20  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	* decl.c (grokfndecl): Add const cp_decl_specifier_seq* parameter;
      	tidy handling of a null location_t argument; use proper location
      	information in a few additional error messages.
      	(grokdeclarator): Update calls.
      
      /testsuite
      2018-06-20  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	* g++.dg/template/friend65.C: New.
      	* g++.dg/cpp0x/main1.C: Likewise.
      	* g++.dg/other/main2.C: Likewise.
      	* g++.dg/other/main3.C: Likewise.
      	* g++.dg/template/friend42.C: Test location too.
      	* g++.dg/concepts/decl-diagnose.C: Likewise.
      	* g++.dg/warn/main-2.C: Update.
      
      From-SVN: r261816
      Paolo Carlini committed
    • Update OpenACC data clause semantics to the 2.5 behavior · 829c6349
      	gcc/c-family/
      	* c-pragma.h (enum pragma_omp_clause): Add
      	PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
      	PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
      
      	gcc/c/
      	* c-parser.c (c_parser_omp_clause_name): Add support for finalize
      	and if_present. Make present_or_{copy,copyin,copyout,create} aliases
      	to their non-present_or_* counterparts. Make 'self' an alias to
      	PRAGMA_OACC_CLAUSE_HOST.
      	(c_parser_oacc_data_clause): Update GOMP mappings for
      	PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
      	PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
      	(c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
      	Remove support for present_or_* clauses.
      	(OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
      	(OACC_PARALLEL_CLAUSE_MASK): Likewise.
      	(OACC_DECLARE_CLAUSE_MASK): Likewise.
      	(OACC_DATA_CLAUSE_MASK): Likewise.
      	(OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
      	(OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
      	(OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
      	(c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
      	* c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
      
      	gcc/cp/
      	* parser.c (cp_parser_omp_clause_name): Add support for finalize
      	and if_present. Make present_or_{copy,copyin,copyout,create} aliases
      	to their non-present_or_* counterparts. Make 'self' an alias to
      	PRAGMA_OACC_CLAUSE_HOST.
      	(cp_parser_oacc_data_clause): Update GOMP mappings for
      	PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
      	PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
      	(cp_parser_oacc_all_clauses): Handle finalize and if_present clauses.
      	Remove support for present_or_* clauses.
      	(OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
      	(OACC_PARALLEL_CLAUSE_MASK): Likewise.
      	(OACC_DECLARE_CLAUSE_MASK): Likewise.
      	(OACC_DATA_CLAUSE_MASK): Likewise.
      	(OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
      	(OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
      	(OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
      	(cp_parser_oacc_declare): Remove PRESENT_OR_* clauses.
      	* pt.c (tsubst_omp_clauses): Handle IF_PRESENT and FINALIZE.
      	* semantics.c (finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
      
      	gcc/fortran/
      	* gfortran.h (gfc_omp_clauses): Add unsigned if_present, finalize
      	bitfields.
      	* openmp.c (enum omp_mask2): Remove OMP_CLAUSE_PRESENT_OR_*. Add
      	OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
      	(gfc_match_omp_clauses): Update handling of copy, copyin, copyout,
      	create, deviceptr, present_of_*. Add support for finalize and
      	if_present.
      	(OACC_PARALLEL_CLAUSES): Remove PRESENT_OR_* clauses.
      	(OACC_KERNELS_CLAUSES): Likewise.
      	(OACC_DATA_CLAUSES): Likewise.
      	(OACC_DECLARE_CLAUSES): Likewise.
      	(OACC_UPDATE_CLAUSES): Add IF_PRESENT clause.
      	(OACC_ENTER_DATA_CLAUSES): Remove PRESENT_OR_* clauses.
      	(OACC_EXIT_DATA_CLAUSES): Add FINALIZE clause.
      	(gfc_match_oacc_declare): Update to OpenACC 2.5 semantics.
      	* trans-openmp.c (gfc_trans_omp_clauses): Add support for IF_PRESENT
      	and FINALIZE.
      
      	gcc/
      	* gimplify.c (gimplify_scan_omp_clauses): Add support for
      	OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
      	(gimplify_adjust_omp_clauses): Likewise.
      	(gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
      	support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
      	(gimplify_omp_target_update): Update handling of acc update and
      	enter/exit data.
      	* omp-low.c (install_var_field): Remove unused parameter
      	base_pointers_restrict.
      	(scan_sharing_clauses): Remove base_pointers_restrict parameter.
      	Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
      	FINALIZE}
      	(omp_target_base_pointers_restrict_p): Delete.
      	(scan_omp_target): Update call to scan_sharing_clauses.
      	* tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
      	FINALIZE}.
      	* tree-nested.c (convert_nonlocal_omp_clauses): Handle
      	OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
      	(convert_local_omp_clauses): Likewise.
      	* tree-pretty-print.c (dump_omp_clause): Likewise.
      	* tree.c (omp_clause_num_ops): Add entries for 	OMP_CLAUSE_{IF_PRESENT,
      	FINALIZE}.
      	(omp_clause_code_name): Likewise.
      
      	gcc/testsuite/
      	* c-c++-common/goacc/declare-1.c: Update test case to utilize OpenACC
      	2.5 data clause semantics.
      	* c-c++-common/goacc/declare-2.c: Likewise.
      	* c-c++-common/goacc/default-4.c: Likewise.
      	* c-c++-common/goacc/finalize-1.c: New test.
      	* c-c++-common/goacc/kernels-alias-2.c: Update test case to utilize
      	OpenACC 2.5 data clause semantics.
      	* c-c++-common/goacc/kernels-alias.c: Likewise.
      	* c-c++-common/goacc/routine-5.c: Likewise.
      	* c-c++-common/goacc/update-if_present-1.c: New test.
      	* c-c++-common/goacc/update-if_present-2.c: New test.
      	* g++.dg/goacc/template.C: Update test case to utilize OpenACC
      	2.5 data clause semantics.
      	* gfortran.dg/goacc/combined-directives.f90: Likewise.
      	* gfortran.dg/goacc/data-tree.f95: Likewise.
      	* gfortran.dg/goacc/declare-2.f95: Likewise.
      	* gfortran.dg/goacc/default-4.f: Likewise.
      	* gfortran.dg/goacc/enter-exit-data.f95: Likewise.
      	* gfortran.dg/goacc/finalize-1.f: New test.
      	* gfortran.dg/goacc/kernels-alias-2.f95: Update test case to utilize
      	OpenACC 2.5 data clause semantics.
      	* gfortran.dg/goacc/kernels-alias.f95: Likewise.
      	* gfortran.dg/goacc/kernels-tree.f95: Likewise.
      	* gfortran.dg/goacc/nested-function-1.f90: Likewise.
      	* gfortran.dg/goacc/parallel-tree.f95: Likewise.
      	* gfortran.dg/goacc/reduction-promotions.f90: Likewise.
      	* gfortran.dg/goacc/update-if_present-1.f90: New test.
      	* gfortran.dg/goacc/update-if_present-2.f90: New test.
      
      	libgomp/
      	* libgomp.h (struct splay_tree_key_s): Add dynamic_refcount member.
      	(gomp_acc_remove_pointer): Update declaration.
      	(gomp_acc_declare_allocate): Declare.
      	(gomp_remove_var): Declare.
      	* libgomp.map (OACC_2.5): Define.
      	* oacc-mem.c (acc_map_data): Update refcount.
      	(acc_unmap_data): Likewise.
      	(present_create_copy): Likewise.
      	(acc_create): Add FLAG_PRESENT when calling present_create_copy.
      	(acc_copyin): Likewise.
      	(FLAG_FINALIZE): Define.
      	(delete_copyout): Update dynamic refcounts, add support for FINALIZE.
      	(acc_delete_finalize): New function.
      	(acc_delete_finalize_async): New function.
      	(acc_copyout_finalize): New function.
      	(acc_copyout_finalize_async): New function.
      	(gomp_acc_insert_pointer): Update refcounts.
      	(gomp_acc_remove_pointer): Return if data is not present on the
      	accelerator.
      	* oacc-parallel.c (find_pset): Rename to find_pointer.
      	(find_pointer): Add support for GOMP_MAP_POINTER.
      	(handle_ftn_pointers): New function.
      	(GOACC_parallel_keyed): Update refcounts of variables.
      	(GOACC_enter_exit_data): Add support for finalized data mappings.
      	Add support for GOMP_MAP_{TO,ALLOC,RELESE,FROM}. Update handling
      	of fortran arrays.
      	(GOACC_update): Add support for GOMP_MAP_{ALWAYS_POINTER,TO,FROM}.
      	(GOACC_declare): Add support for GOMP_MAP_RELEASE, remove support
      	for GOMP_MAP_FORCE_FROM.
      	* openacc.f90 (module openacc_internal): Add
      	acc_copyout_finalize_{32_h,64_h,array_h,_l}, and
      	acc_delete_finalize_{32_h,64_h,array_h,_l}. Add interfaces for
      	acc_copyout_finalize and acc_delete_finalize.
      	(acc_copyout_finalize_32_h): New subroutine.
      	(acc_copyout_finalize_64_h): New subroutine.
      	(acc_copyout_finalize_array_h): New subroutine.
      	(acc_delete_finalize_32_h): New subroutine.
      	(acc_delete_finalize_64_h): New subroutine.
      	(acc_delete_finalize_array_h): New subroutine.
      	* openacc.h (acc_copyout_finalize): Declare.
      	(acc_copyout_finalize_async): Declare.
      	(acc_delete_finalize): Declare.
      	(acc_delete_finalize_async): Declare.
      	* openacc_lib.h (acc_copyout_finalize): New interface.
      	(acc_delete_finalize): New interface.
      	* target.c (gomp_map_vars): Update dynamic_refcount.
      	(gomp_remove_var): New function.
      	(gomp_unmap_vars): Use it.
      	(gomp_unload_image_from_device): Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/data-already-1.c: Update test
      	case to utilize OpenACC 2.5 data clause semantics.
      	* testsuite/libgomp.oacc-c-c++-common/data-already-2.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/data-already-3.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/data-already-4.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/data-already-5.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/data-already-6.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/data-already-7.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/data-already-8.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-16.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-25.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-32.c: Likewise.
      	* testsuite/libgomp.oacc-c-c++-common/lib-83.c: Likewise.
      	* testsuite/libgomp.oacc-fortran/data-5.f90: New test.
      	* testsuite/libgomp.oacc-fortran/data-already-1.f: Update test case to
      	utilize OpenACC 2.5 data clause semantics.
      	* testsuite/libgomp.oacc-fortran/data-already-2.f: Likewise.
      	* testsuite/libgomp.oacc-fortran/data-already-3.f: Likewise.
      	* testsuite/libgomp.oacc-fortran/data-already-4.f: Likewise.
      	* testsuite/libgomp.oacc-fortran/data-already-5.f: Likewise.
      	* testsuite/libgomp.oacc-fortran/data-already-6.f: Likewise.
      	* testsuite/libgomp.oacc-fortran/data-already-7.f: Likewise.
      	* testsuite/libgomp.oacc-fortran/data-already-8.f: Likewise.
      	* testsuite/libgomp.oacc-fortran/lib-32-1.f: Likewise.
      	* testsuite/libgomp.oacc-fortran/lib-32-2.f: Likewise.
      
      Co-Authored-By: Cesar Philippidis <cesar@codesourcery.com>
      Co-Authored-By: Thomas Schwinge <thomas@codesourcery.com>
      
      From-SVN: r261813
      Chung-Lin Tang committed
    • re PR c++/86210 (Missing -Wnonnull warning for function defined in the same TU) · f41b7612
      	PR c++/86210
      	* c-common.c (check_nonnull_arg): Use fold_for_warn.  Adjust obsolete
      	comment.
      
      	* g++.dg/warn/Wnonnull4.C: New test.
      
      From-SVN: r261811
      Jakub Jelinek committed
    • Add testcase accidentally not committed earlier · d9addf33
      	* testsuite/20_util/duration/arithmetic/dr3050.cc: Add new test
      	missed from recent commit.
      
      From-SVN: r261810
      Jonathan Wakely committed
    • re PR c++/86240 (ice: unexpected expression absu_expr) · e28fadbc
      	PR c++/86240
      	* constexpr.c (cxx_eval_constant_expression): Handle ABSU_EXPR.
      	(fold_simple_1): Likewise.
      	* error.c (dump_expr): Likewise.
      
      	* g++.dg/pr86240.C: New test.
      
      From-SVN: r261809
      Marek Polacek committed
    • re PR debug/86194 (ICE: SIGSEGV in avoid_constant_pool_reference… · 125fe9ab
      re PR debug/86194 (ICE: SIGSEGV in avoid_constant_pool_reference (simplify-rtx.c:215) with -O -g -mavx512bw)
      
      	PR debug/86194
      	* var-tracking.c (use_narrower_mode_test): Check if shift amount can
      	be narrowed.
      
      	* gcc.target/i386/pr86194.c: New test.
      
      From-SVN: r261807
      Jakub Jelinek committed
    • re PR tree-optimization/86231 (vrp_meet causes wrong-code) · c81a5aec
      	PR tree-optimization/86231
      	* tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
      	anti-range don't overwrite *vr0min before using it to compute *vr0max.
      
      	* gcc.dg/tree-ssa/vrp119.c: New test.
      	* gcc.c-torture/execute/pr86231.c: New test.
      
      From-SVN: r261805
      Jakub Jelinek committed
    • Generate correctly typed compare in canonicalize_loop_ivs · 60f02f90
      2018-06-20  Tom de Vries  <tdevries@suse.de>
      
      	PR tree-optimization/86097
      	* tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
      	iv type if signedness of iv type is not the same as that of *nit.
      
      	* gcc.dg/autopar/pr86097.c: New test.
      
      From-SVN: r261804
      Tom de Vries committed
    • cfgrtl.c (rtl_verify_edges): Formatting fix. · d53e8ef4
      	* cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
      	EDGE_EH edges, verify they are all EDGE_EH.
      
      From-SVN: r261803
      Jakub Jelinek committed
    • [PR c++/85634] Fix tsubst ICE · 335a120f
      https://gcc.gnu.org/ml/gcc-patches/2018-06/msg01237.html
      	PR c++/85634
      	* cp-tree.h (lookup_keep): Drop KEEP parm.
      	(lookup_list_keep): Delete.
      	(maybe_get_fns): Declare.
      	* parser.c (cp_parser_primary_expression): Call lookup_keep here.
      	(cp_parser_template_id): Not here ...
      	* decl.c (cp_finish_decl): ... nor here ...
      	* init.c (build_raw_new_expr): ... nor here ...
      	* pt.c (process_template_parm): ... nor here ...
      	* semantics.c (perform_koenig_lookup): Call lookup_keep.
      	(finish_call_expr): Not here.
      	* tree.c (ovl_cache): Delete.
      	(ovl_make, ovl_copy): No cache.
      	(lookup_keep): Always keep.
      	(lookup_list_keep): Delete.
      	(maybe_get_fns): New, broken out of ...
      	(get_fns): ... here.  Call it.
      	(built_min_nt_loc, build_min, build_min_non_dep): Drop lookup_keep.
      	(build_min_nt_call_vec): Likewise.
      
      	PR c++/85634
      	* g++.dg/lookup/pr85634.C: New.
      
      From-SVN: r261802
      Nathan Sidwell committed
    • Remove not longer valid FIXME comment. · b54006ae
      2018-06-20  Martin Liska  <mliska@suse.cz>
      
      	* lto-symtab.c (lto_symtab_merge_p): Remove not valid
              FIXME comment.
      
      From-SVN: r261798
      Martin Liska committed
    • [AArch64] Support for LDP/STP of Q-registers · 9f5361c8
      This patch adds support for generating LDPs and STPs of Q-registers.
      This allows for more compact code generation and makes better use of the ISA.
      
      It's implemented in a straightforward way by allowing 16-byte modes in the
      sched-fusion machinery and adding appropriate peepholes in aarch64-ldpstp.md
      as well as the patterns themselves in aarch64-simd.md.
      
      It adds a new no_ldp_stp_qregs tuning flag.
      I use it to restrict the peepholes in aarch64-ldpstp.md from merging the
      operations together into PARALLELs. I also use it to restrict the sched fusion
      check that brings such loads and stores together. This is enough to avoid
      forming the pairs when the tuning flag is set.
      
      I didn't see any non-noise performance effect on SPEC2017 on Cortex-A72 and Cortex-A53.
      
              * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
              * config/aarch64/aarch64.c (xgene1_tunings): Add
              AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
              (aarch64_mode_valid_for_sched_fusion_p):
              Allow 16-byte modes.
              (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
              * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
              128-bit modes.
              * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
              New pattern.
              (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
              * config/aarch64/iterators.md (VQ2): New mode iterator.
      
              * gcc.target/aarch64/ldp_stp_q.c: New test.
              * gcc.target/aarch64/stp_vec_128_1.c: Likewise.
              * gcc.target/aarch64/ldp_stp_q_disable.c: Likewise.
      
      From-SVN: r261796
      Kyrylo Tkachov committed
    • Change default for jump_table expansion ratio to 8. · de840bde
      2018-06-20  Martin Liska  <mliska@suse.cz>
      
      	* tree-switch-conversion.c (jump_table_cluster::can_be_handled):
              Change default ratio from 10 to 8.
      
      From-SVN: r261795
      Martin Liska committed
    • Enable clustering for switch statements. · 2f928c1b
      2018-06-20  Martin Liska  <mliska@suse.cz>
      
      	* tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
              New.
      	(bit_test_cluster::find_bit_tests): Likewise.
      	(switch_decision_tree::analyze_switch_statement): Find clusters.
      	* tree-switch-conversion.h (struct jump_table_cluster): Document
              hierarchy.
      
      From-SVN: r261794
      Martin Liska committed
    • Switch other switch expansion methods into classes. · dc223ad4
      2018-06-20  Martin Liska  <mliska@suse.cz>
      
      	* tree-switch-conversion.c (switch_conversion::collect):
              Record m_uniq property.
      	(switch_conversion::expand): Bail out for special conditions.
      	(group_cluster::~group_cluster): New.
      	(group_cluster::group_cluster): Likewise.
      	(group_cluster::dump): Likewise.
      	(jump_table_cluster::emit): New.
      	(switch_decision_tree::fix_phi_operands_for_edges): New.
      	(struct case_node): Remove struct.
      	(jump_table_cluster::can_be_handled): New.
      	(case_values_threshold): Moved to header.
      	(reset_out_edges_aux): Likewise.
      	(jump_table_cluster::is_beneficial): New.
      	(bit_test_cluster::can_be_handled): Likewise.
      	(add_case_node): Remove.
      	(bit_test_cluster::is_beneficial): New.
      	(case_bit_test::cmp): New.
      	(bit_test_cluster::emit): New.
      	(expand_switch_as_decision_tree_p): Remove.
      	(bit_test_cluster::hoist_edge_and_branch_if_true): New.
      	(fix_phi_operands_for_edge): Likewise.
      	(switch_decision_tree::analyze_switch_statement): New.
      	(compute_cases_per_edge): Move ...
      	(switch_decision_tree::compute_cases_per_edge): ... here.
      	(try_switch_expansion): Likewise.
      	(switch_decision_tree::try_switch_expansion): Likewise.
      	(record_phi_operand_mapping): Likewise.
      	(switch_decision_tree::record_phi_operand_mapping): Likewise.
      	(emit_case_decision_tree): Likewise.
      	(switch_decision_tree::emit): Likewise.
      	(balance_case_nodes): Likewise.
      	(switch_decision_tree::balance_case_nodes): Likewise.
      	(dump_case_nodes): Likewise.
      	(switch_decision_tree::dump_case_nodes): Likewise.
      	(emit_jump): Likewise.
      	(switch_decision_tree::emit_jump): Likewise.
      	(emit_cmp_and_jump_insns): Likewise.
      	(switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
      	(emit_case_nodes): Likewise.
      	(switch_decision_tree::emit_case_nodes): Likewise.
      	(conditional_probability): Remove.
      	* tree-switch-conversion.h (enum cluster_type): New.
      	(PRINT_CASE): New.
      	(struct cluster): Likewise.
      	(cluster::cluster): Likewise.
      	(struct simple_cluster): Likewise.
      	(simple_cluster::simple_cluster): Likewise.
      	(struct group_cluster): Likewise.
      	(struct jump_table_cluster): Likewise.
      	(struct bit_test_cluster): Likewise.
      	(struct min_cluster_item): Likewise.
      	(struct case_tree_node): Likewise.
      	(case_tree_node::case_tree_node): Likewise.
      	(jump_table_cluster::case_values_threshold): Likewise.
      	(struct case_bit_test): Likewise.
      	(struct switch_decision_tree): Likewise.
      	(struct switch_conversion): Likewise.
      	(switch_decision_tree::reset_out_edges_aux): Likewise.
      2018-06-20  Martin Liska  <mliska@suse.cz>
      
      	* gcc.dg/tree-ssa/vrp104.c: Grep just for GIMPLE IL.
      
      From-SVN: r261793
      Martin Liska committed
    • Transform switch_conversion into a class. · 789410e4
      2018-06-20  Martin Liska  <mliska@suse.cz>
      
      	* tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
      	(hoist_edge_and_branch_if_true): Likewise.
      	(expand_switch_using_bit_tests_p): Likewise.
      	(struct case_bit_test): Likewise.
      	(case_bit_test_cmp): Likewise.
      	(emit_case_bit_tests): Likewise.
      	(switch_conversion::switch_conversion): New class.
      	(struct switch_conv_info): Remove old struct.
      	(collect_switch_conv_info): More to ...
      	(switch_conversion::collect): ... this.
      	(check_range): Likewise.
      	(switch_conversion::check_range): Likewise.
      	(check_all_empty_except_final): Likewise.
      	(switch_conversion::check_all_empty_except_final): Likewise.
      	(check_final_bb): Likewise.
      	(switch_conversion::check_final_bb): Likewise.
      	(create_temp_arrays): Likewise.
      	(switch_conversion::create_temp_arrays): Likewise.
      	(free_temp_arrays): Likewise.
      	(gather_default_values): Likewise.
      	(switch_conversion::gather_default_values): Likewise.
      	(build_constructors): Likewise.
      	(switch_conversion::build_constructors): Likewise.
      	(constructor_contains_same_values_p): Likewise.
      	(switch_conversion::contains_same_values_p): Likewise.
      	(array_value_type): Likewise.
      	(switch_conversion::array_value_type): Likewise.
      	(build_one_array): Likewise.
      	(switch_conversion::build_one_array): Likewise.
      	(build_arrays): Likewise.
      	(switch_conversion::build_arrays): Likewise.
      	(gen_def_assigns): Likewise.
      	(switch_conversion::gen_def_assigns): Likewise.
      	(prune_bbs): Likewise.
      	(switch_conversion::prune_bbs): Likewise.
      	(fix_phi_nodes): Likewise.
      	(switch_conversion::fix_phi_nodes): Likewise.
      	(gen_inbound_check): Likewise.
      	(switch_conversion::gen_inbound_check): Likewise.
      	(process_switch): Use the newly created class.
      	(switch_conversion::expand): New.
      	(switch_conversion::~switch_conversion): New.
      	* tree-switch-conversion.h: New file.
      
      From-SVN: r261792
      Martin Liska committed
    • [8/n] PR85694: Make patterns check for target support · 1cbfeccc
      This patch makes pattern recognisers do their own checking for vector
      types and target support.  Previously some recognisers did this
      themselves and some left it to vect_pattern_recog_1.
      
      Doing this means we can get rid of the type_in argument, which was
      ignored if the recogniser did its own checking.  It also means
      we create fewer junk statements.
      
      2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
      	tree-vect-patterns.c.
      	* tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
      	(vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
      	(vect_recog_sad_pattern): Likewise.
      	(vect_recog_widen_sum_pattern): Likewise.
      	(vect_recog_pow_pattern): Likewise.  Check for a null vectype.
      	(vect_recog_widen_shift_pattern): Remove the type_in argument.
      	(vect_recog_rotate_pattern): Likewise.
      	(vect_recog_mult_pattern): Likewise.
      	(vect_recog_vector_vector_shift_pattern): Likewise.
      	(vect_recog_divmod_pattern): Likewise.
      	(vect_recog_mixed_size_cond_pattern): Likewise.
      	(vect_recog_bool_pattern): Likewise.
      	(vect_recog_mask_conversion_pattern): Likewise.
      	(vect_try_gather_scatter_pattern): Likewise.
      	(vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
      	(vect_recog_over_widening_pattern): Likewise.
      	(vect_recog_gather_scatter_pattern): Likewise.
      	(vect_recog_func_ptr): Move from tree-vectorizer.h
      	(vect_vect_recog_func_ptrs): Move further down the file.
      	(vect_recog_func): Likewise.  Remove the third argument.
      	(NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
      	(vect_pattern_recog_1): Expect the pattern function to do any
      	necessary target tests.  Also expect it to provide a vector type.
      	Remove the type_in handling.
      
      From-SVN: r261791
      Richard Sandiford committed
    • [7/n] PR85694: Add a vect_pattern_detected helper · 49d8df1b
      This message is a long write-up for a patch that simply adds a common
      routine for printing the "vector_foo_pattern: detected:" messages.
      
      The reason for doing this is that some routines check for target support
      themselves and some leave it to vect_pattern_recog_1.  Those that leave
      it to vect_pattern_recog_1 currently print these "detected:" messages if
      the statements have the right form, even if the pattern is eventually
      discarded.  IMO that's useful, and a lot of existing scan tests rely on it.
      
      However, a later patch makes patterns do their own testing, and stops
      them creating pattern statements until the tests have passed.  This means
      (a) they need to print the "detected:" message earlier and (b) the pattern
      statement won't be around to print.
      
      The patch therefore makes all routines print the original statement
      rather than the pattern one.  That information isn't obvious otherwise,
      whereas vect_pattern_recog_1 already prints the pattern statement
      in the case of a successful match.  This also avoids the previous
      situation in which a routine could print "detected:" and then
      silently bail out before saying what had been detected.
      
      2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* tree-vect-patterns.c (vect_pattern_detected): New function.
      	(vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
      	(vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
      	(vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
      	(vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
      	(vect_recog_mult_pattern, vect_recog_divmod_pattern)
      	(vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
      	(vect_recog_mask_conversion_pattern)
      	(vect_try_gather_scatter_pattern): Likewise.
      
      From-SVN: r261790
      Richard Sandiford committed
    • [6/n] PR85694: Add a vect_get_internal_def helper · 25927307
      This patch adds a helper for pattern code that wants to find an
      internal (vectorisable) definition of an SSA name.
      
      A later patch will make more use of this, and alter the definition.
      
      2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* tree-vect-patterns.c (vect_get_internal_def): New function.
      	(vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
      	(vect_recog_vector_vector_shift_pattern, check_bool_pattern)
      	(search_type_for_mask_1): Use it.
      
      From-SVN: r261789
      Richard Sandiford committed
    • [5/n] PR85694: Remove dead WIDEN_SUM handling · 1f786170
      vect_recog_dot_prod_pattern and vect_recog_sad_pattern both checked
      whether the statement passed in had already been recognised as a
      WIDEN_SUM_EXPR pattern.  That isn't possible (any more?), since the
      first recognised pattern wins, and since vect_recog_widen_sum_pattern
      never matches a later statement than the one it's given.
      
      2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
      	redundant WIDEN_SUM_EXPR handling.
      	(vect_recog_sad_pattern): Likewise.
      
      From-SVN: r261788
      Richard Sandiford committed
    • [4/n] PR85694: Remove redundant calls to types_compatible_p · 44ae7a00
      tree-vect-patterns.c checked that operands to primitive arithmetic ops
      are compatible with each other and with the result.  The checks date
      back years and have long been redundant with verify_gimple_stmt.
      
      2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
      	redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
      	(vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
      	(vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
      	(vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
      
      From-SVN: r261787
      Richard Sandiford committed
    • [3/n] PR85694: Fix dummy assignment handling in vectorizable_call · ed7b8123
      vectorizable_call stubs out the original scalar statement with
      a dummy assignment to the same lhs, so that we don't leave any bogus
      scalar calls around.  If the call is actually a pattern statement,
      the code rightly took the lhs of the original bb statement:
      
        if (is_pattern_stmt_p (stmt_info))
          lhs = gimple_call_lhs (STMT_VINFO_RELATED_STMT (stmt_info));
        else
          lhs = gimple_call_lhs (stmt);
      
      But it then associated the new statement with the stmt_vec_info of the
      pattern statement rather than the bb statement, which meant we had two
      stmt_vec_infos assigning to the same lhs.  This seems to be latent at
      the moment but caused problems further into the series.
      
      2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* tree-vect-stmts.c (vectorizable_call): Make sure that we
      	use the stmt_vec_info of the original bb statement for the
      	new zero assignment, even if the call is part of a pattern.
      
      From-SVN: r261786
      Richard Sandiford committed
    • [2/n] PR85694: Attach a DEF_SEQ only to the original statement · e3947d80
      A pattern's PATTERN_DEF_SEQ was attached to both the original statement
      and the main pattern statement, which made it harder to update later.
      This patch attaches it to just the original statement.  In practice,
      anything that cared had ready access to both.
      
      2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
      	that the sequence is attached to the original statement rather
      	than the pattern statement.
      	* tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
      	PATTERN_DEF_SEQ from the original statement rather than
      	the main pattern statement.
      	* tree-vect-stmts.c (free_stmt_vec_info): Likewise.
      	* tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
      	(vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
      
      From-SVN: r261785
      Richard Sandiford committed
    • [1/n] PR85694: Allow pattern definition statements to be reused · d54a098e
      This patch is the first part of a series to fix to PR85694.
      Later patches can make the pattern for a statement S2 reuse the
      results of a PATTERN_DEF_SEQ statement attached to an earlier
      statement S1.  Although vect_mark_stmts_to_be_vectorized handled
      this fine, vect_analyze_stmt and vect_transform_loop both skipped the
      PATTERN_DEF_SEQ for S1 if S1's main pattern wasn't live or relevant.
      
      I couldn't wrap my head around the flow in vect_transform_loop,
      so ended up moving the per-statement handling into a subroutine.
      That makes the patch look bigger than it actually is.
      
      2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
      	definition statements before the early exit for statements that aren't
      	live or relevant.
      	* tree-vect-loop.c (vect_transform_loop_stmt): New function,
      	split out from...
      	(vect_transform_loop): ...here.  Process pattern definition
      	statements without first checking whether the main pattern
      	statement is live or relevant.
      
      From-SVN: r261784
      Richard Sandiford committed
    • Daily bump. · 036a9082
      From-SVN: r261779
      GCC Administrator committed
  3. 19 Jun, 2018 3 commits