* include/bits/alloc_traits.h (__is_allocator, _RequireAllocator):
New trait and alias for detecting Allocator-like types.
* include/bits/basic_string.h (basic_string): Add deduction guide
from P0433.
* include/ext/alloc_traits.h (__gnu_cxx::__alloc_traits): Add template
parameter with default template argument that causes substitution
failures for types that cannot be allocators.
* testsuite/21_strings/basic_string/cons/char/deduction.cc: New.
* testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc: New.
From-SVN: r248967
* graphds.c (add_edge): Intitialize edge's attached data.
(foll_in_subgraph, dfs_fst_edge, dfs_next_edge): New function
pointer parameter. Call pointed function on each edge during
graph traversing. Skip traversing the edge when the function
returns true.
(graphds_dfs, graphds_scc): Ditto.
(for_each_edge): New parameter. Pass the new parameter to callback
function.
* graphds.h (skip_edge_callback): New function pointer type.
(graphds_dfs, graphds_scc): New function pointer parameter.
(graphds_edge_callback, for_each_edge): New parameter.
From-SVN: r248964
* tree-vect-data-refs.c (vect_mark_for_runtime_alias_test): Factor
out code checking if runtime alias check is possible to below ...
Call the new function.
* tree-data-ref.c (runtime_alias_check_p): ... to new function.
* tree-data-ref.h (runtime_alias_check_p): New decalaration.
From-SVN: r248962
* tree-vect-loop-manip.c (vect_do_peeling): Don't skip vector loop
if versioning is required.
* tree-vect-loop.c (vect_analyze_loop_2): Merge niter check for loop
peeling with the check for versioning.
From-SVN: r248959
* tree-vectorizer.h (vect_build_loop_niters): New parameter.
* tree-vect-loop-manip.c (vect_build_loop_niters): New parameter.
Set true to new parameter if new ssa variable is defined.
(vect_gen_vector_loop_niters): Refactor. Set range information
for the new vector loop bound variable.
(vect_do_peeling): Ditto.
From-SVN: r248958
* tree-affine.c (ssa.h): Include header file.
(tree_to_aff_combination): Handle (T1)(X - CST) when inner type
has wrapping overflow behavior.
From-SVN: r248957
* tree-ssa-loop-ivopts.c (ivopts_estimate_reg_pressure): New
reg_pressure model function.
(ivopts_global_cost_for_size): Delete.
(determine_set_costs, iv_ca_recount_cost): Call new model function
ivopts_estimate_reg_pressure.
From-SVN: r248954
2017-06-07 Tamar Christina <tamar.christina@arm.com>
* config/aarch64/aarch64.c (aarch64_rtx_costs): Make sdiv more expensive than udiv.
Remove floating point cases from mod.
From-SVN: r248953
Do not use the RTEMS-specific task variables for the Ada run-time since
they are not available in RTEMS 4.12 or later. Use thread-local storage
instead.
gcc/ada
* Makefile.in (rtems): Use TLS implementation for s-tpopsp.adb.
* s-tpopsp-rtems.adb: Delete.
From-SVN: r248952
* dumpfile.h (enum tree_dump_index): Rename TDI_generic to
TDI_gimple.
(class dump_manager): Add register_dumps method.
* dumpfile.c: Include langhooks.h.
(dump_files): Use 0 instead of 3/4/5 for TDI_{original,gimple,nested}.
(FIRST_AUTO_NUMBERED_DUMP): Decrease to 1.
(FIRST_ME_AUTO_NUMBERED_DUMP): Define.
(dump_manager::dump_register): Start with 512 entries instead of 32.
(dump_manager::register_dumps): New method.
* toplev.c (general_init): Instead of invoking register_dumps
langhook, invoke register_dumps method on the dump manager.
* gimplify.c (gimplify_function_tree): Use TDI_gimple instead of
TDI_generic.
* gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
of TDI_generic.
From-SVN: r248947
This patch tries to clarify some of the restrictions on define_insn
conditions, and also on the use of "#".
2017-06-06 Richard Sandiford <richard.sandiford@linaro.org>
gcc/
* doc/md.texi: Clarify the restrictions on a define_insn condition.
Say that # requires an associated define_split to exist, and that
the define_split must be suitable for use after register allocation.
From-SVN: r248946
* cfgbuild.c (find_bb_boundaries): Initialize profile of split blocks.
(compute_outgoing_frequencies): Also initialize zero counts.
(find_many_sub_basic_blocks): Do not produce uninitialized profile
around loops; preserve more of profile when nothing changes.
From-SVN: r248945
* name-lookup.c (suggest_alternatives_for): Use qualified lookup
sans using directives. Don't walk into inline namespaces.
* g++.dg/pr45330.C: Add inline namespace case.
From-SVN: r248938
Interface_mtable_expression::do_type computes a type that incorporates
Go type descriptors for the interface methods, whereas in order to
have strict type agreement with the mtable data, the interface method
fields need to be C function ptrs. Change the type recipe accordingly,
and then update Interface_mtable_expression::do_get_backend to compute
a revised backend type that uses the correct fcn types.
Reviewed-on: https://go-review.googlesource.com/44750
From-SVN: r248934
PR c/79983
* c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
ref.
(start_enum): Use the location of TYPE_STUB_DECL of enumtype.
* gcc.dg/pr79983.c: New test.
From-SVN: r248927
* tree-ssa-loop-prefetch.c (struct mem_ref_group, struct mem_ref):
New "uid" fields to hold pretty-print IDs of group and ref.
Memory references are now identified as <group_id>:<ref_id>
instead of using [random] addresses.
(dump_mem_details): Simplify, no functional change.
(dump_mem_ref): Simplify and make output more concise.
Replace couple of fprintf's throughout code with calls to dump_mem_ref.
(find_or_create_group): Initialize group uid.
(record_ref): Initialize ref uid. Improve debug output.
(prune_group_by_reuse, should_issue_prefetch_p,)
(should_issue_prefetch_p, schedule_prefetches, issue_prefetch_ref,)
(mark_nontemporal_store, determine_loop_nest_reuse):
Improve debug output.
Change-Id: Ia594d5854de96183f3c5a669c161e5a9a73a29d7
From-SVN: r248925
2017-06-06 Richard Biener <rguenther@suse.de>
PR tree-optimization/80974
* tree-ssa-sccvn.c (set_ssa_val_to): Do not change but only
keep or clear leaders SSA info.
* gcc.dg/torture/pr80974.c: New testcase.
From-SVN: r248919
2017-06-06 Tom de Vries <tom@codesourcery.com>
* config/nvptx/nvptx.c (split_mode_p): New function.
(nvptx_declare_function_name, nvptx_print_operand): Use split_mode_p.
From-SVN: r248918
2017-06-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
gcc/testsuite/
* gcc.dg/utf16-4.c: Accept "long unsigned int" as well as
"unsigned int" in conversation warning on line 15.
From-SVN: r248914