1. 16 Mar, 2017 23 commits
    • stabilize store merging · 50b6d676
      Don't let pointer randomization change the order in which we process
      store chains.  This may cause SSA_NAMEs to be released in different
      order, and if they're reused later, they may cause differences in SSA
      partitioning, leading to differences in expand, and ultimately to
      different code.
      
      bootstrap-debug-lean (-fcompare-debug) on i686-linux-gnu has failed in
      haifa-sched.c since r245196 exposed the latent ordering problem in
      store merging.  In this case, the IR differences (different SSA names
      selected for copies in out-of-SSA, resulting in some off-by-one
      differences in pseudos) were not significant enough to be visible in
      the compiler output.
      
      
      for  gcc/ChangeLog
      
      	* gimple-ssa-store-merging.c (struct imm_store_chain_info):
      	Add linked-list forward and backlinks.  Insert on
      	construction, remove on destruction.
      	(class pass_store_merging): Add m_stores_head field.
      	(pass_store_merging::terminate_and_process_all_chains):
      	Iterate over m_stores_head list.
      	(pass_store_merging::terminate_all_aliasing_chains):
      	Likewise.
      	(pass_store_merging::execute): Check for debug stmts first.
      	Push new chains onto the m_stores_head stack.
      
      From-SVN: r246213
      Alexandre Oliva committed
    • * decl.c (start_enum): std::byte aliases anything. · 2e92d7ad
      From-SVN: r246212
      Jason Merrill committed
    • * init.c (cpp_init_builtins): Update __cplusplus for C++17. · 85e653c9
      From-SVN: r246211
      Jason Merrill committed
    • re PR c++/79797 (ICE with NSDMI, this pointer and constexpr) · fbd603c4
      	PR c++/79797
      	* constexpr.c (lookup_placeholder): Tweak.
      
      From-SVN: r246210
      Jason Merrill committed
    • re PR target/71294 (ICE in gen_add2_insn, at optabs.c:4442 on powerpc64le-linux) · 207f3423
      [gcc]
      2017-03-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
      
      	PR target/71294
      	* config/rs6000/vsx.md (vsx_splat_<mode>, VSX_D iterator): Allow a
      	SPLAT operation on ISA 2.07 64-bit systems that have direct move,
      	but no MTVSRDD support, by doing MTVSRD and XXPERMDI.
      
      [gcc/testsuite]
      2017-03-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
      
      	PR target/71294
      	* g++.dg/pr71294.C: New test.
      
      From-SVN: r246209
      Michael Meissner committed
    • re PR tree-optimization/71437 (Performance regression after r235817) · c8755022
      	PR tree-optimization/71437
      	* tree-ssa-dom.c (dom_opt_dom_walker): Remove thread_across_edge
      	member function.  Implementation moved into after_dom_children
      	member function and into the threader's thread_outgoing_edges
      	function.
      	(dom_opt_dom_walker::after_dom_children): Simplify by moving
      	some code into new thread_outgoing_edges.
      	* tree-ssa-threadedge.c (thread_across_edge): Make static and simplify
      	definition.  Simplify marker handling (do it here).   Assume we always
      	have the available expression and the const/copies tables.
      	(thread_outgoing_edges): New function extracted from tree-ssa-dom.c
      	and tree-vrp.c
      	* tree-ssa-threadedge.h (thread_outgoing_edges): Declare.
      	* tree-vrp.c (equiv_stack): No longer file scoped.
      	(vrp_dom_walker): New class.
      	(vrp_dom_walker::before_dom_children): New member function.
      	(vrp_dom_walker::after_dom_children): Likewise.
      	(identify_jump_threads):  Setup domwalker.  Use it rather than
      	walking edges in a random order by hand.  Simplify setup/finalization.
      	(finalize_jump_threads): Remove.
      	(vrp_finalize): Do not call identify_jump_threads here.
      	(execute_vrp): Do it here instead and call thread_through_all_blocks
      	here too.
      
      From-SVN: r246208
      Jeff Law committed
    • re PR tree-optimization/71437 (Performance regression after r235817) · 8d7437be
      	PR tree-optimization/71437
      	* tree-ssa-dom.c (pfn_simplify): Add basic_block argument.  All
      	callers changed.
      	(simplify_stmt_for_jump_threading): Add basic_block argument.  All
      	callers changed.
      	(lhs_of_dominating_assert): Moved from here into tree-vrp.c.
      	(dom_opt_dom_walker::thread_across_edge): Remove
      	handle_dominating_asserts argument.  All callers changed.
      	(record_temporary_equivalences_from_stmts_at_dest): Corresponding
      	changes.  Remove calls to lhs_of_dominating_assert.  Other
      	uses of handle_dominating_asserts turn into unconditional code
      	(simplify_control_stmt_condition_1): Likewise.
      	(simplify_control_stmt_condition): Likewise.
      	(thread_through_normal_block, thread_across_edge): Likewise.
      	* tree-ssa-threadedge.h (thread_across_edge): Corresponding changes.
      	* tree-vrp.c (lhs_of_dominating_assert): Move here.  Return original
      	object if it is not an SSA_NAME.
      	(simplify_stmt_for_jump_threading): Call lhs_of_dominating_assert
      	before calling into the VRP specific simplifiers.
      	(identify_jump_threads): Remove handle_dominating_asserts
      	argument.
      
      From-SVN: r246207
      Jeff Law committed
    • Fix tree-prof/pr66295.c · 9fc900af
      This testcase can only ever be built on x86 (it needs the "avx*"
      attributes).  This patch skips the test elsewhere.
      
      
      gcc/testsuite/
      	* gcc.dg/tree-prof/pr66295.c: Skip unless on an x86 target.
      
      From-SVN: r246206
      Segher Boessenkool committed
    • PR libstdc++/79980 fix target type of cast · e363c939
      	PR libstdc++/79980
      	* src/c++11/codecvt.cc (to_integer(codecvt_mode)): Fix target type.
      
      From-SVN: r246205
      Jonathan Wakely committed
    • re PR fortran/80010 (diagnostics: typo $!) · e711928b
      	PR fortran/80010
      	* parse.c (gfc_ascii_statement): Use !$ACC for ST_OACC_ATOMIC
      	and ST_OACC_END_ATOMIC, instead of !ACC.
      	* trans-decl.c (finish_oacc_declare): Use !$ACC instead of $!ACC.
      	* openmp.c (gfc_match_oacc_declare, gfc_match_oacc_wait,
      	gfc_resolve_oacc_declare): Likewise.
      
      	* gfortran.dg/goacc/asyncwait-3.f95: Adjust expected diagnostic.
      
      From-SVN: r246204
      Jakub Jelinek committed
    • re PR fortran/79886 (ICE in pp_format, at pretty-print.c:681) · c05c2380
      	PR fortran/79886
      	* tree-diagnostic.c (default_tree_printer): No longer static.
      	* tree-diagnostic.h (default_tree_printer): New prototype.
      fortran/
      	* error.c (gfc_format_decoder): Rename plus argument to set_locus,
      	remove ATTRIBUTE_UNUSED from all arguments, call default_tree_printer
      	if not a Fortran specific spec.
      	* trans-io.c: Include options.h.
      	(gfc_build_st_parameter): Temporarily disable -Wpadded around layout
      	of artificial IO data structures.
      testsuite/
      	* gfortran.dg/pr79886.f90: New test.
      
      From-SVN: r246203
      Jakub Jelinek committed
    • PR libstdc++/80041 fix codecvt_utf16<wchar_t> to use UTF-16 not UTF-8 · a4c687d6
      	PR libstdc++/80041
      	* src/c++11/codecvt.cc (__codecvt_utf16_base<wchar_t>::do_out)
      	(__codecvt_utf16_base<wchar_t>::do_in): Convert char arguments to
      	char16_t to work with UTF-16 instead of UTF-8.
      	* testsuite/22_locale/codecvt/codecvt_utf16/80041.cc: New test.
      
      From-SVN: r246202
      Jonathan Wakely committed
    • Fix encoding() and max_length() values for codecvt facets · 516231de
      	* src/c++11/codecvt.cc (codecvt<char16_t, char, mbstate_t>)
      	(codecvt<char32_t, char, mbstate_t>, __codecvt_utf8_base<char16_t>)
      	(__codecvt_utf8_base<char32_t>, __codecvt_utf8_base<wchar_t>)
      	(__codecvt_utf16_base<char16_t>, __codecvt_utf16_base<char32_t>)
      	(__codecvt_utf16_base<wchar_t>, __codecvt_utf8_utf16_base<char16_t>)
      	(__codecvt_utf8_utf16_base<char32_t>)
      	(__codecvt_utf8_utf16_base<wchar_t>): Fix do_encoding() and
      	do_max_length() return values.
      	* testsuite/22_locale/codecvt/codecvt_utf16/members.cc: New test.
      	* testsuite/22_locale/codecvt/codecvt_utf8/members.cc: New test.
      	* testsuite/22_locale/codecvt/codecvt_utf8_utf16/members.cc: New test.
      
      From-SVN: r246201
      Jonathan Wakely committed
    • PR libstdc++/79980 fix BOM detection, maxcode checks, UCS2 handling · bcd682e1
      	PR libstdc++/79980
      	* include/bits/locale_conv.h (__do_str_codecvt): Set __count on
      	error path.
      	* src/c++11/codecvt.cc (operator&=, operator|=, operator~): Overloads
      	for manipulating codecvt_mode values.
      	(read_utf16_bom): Compare input to BOM constants instead of integral
      	constants that depend on endianness.  Take mode parameter by
      	reference and adjust it, to distinguish between no BOM present and
      	UTF-16BE BOM present.
      	(ucs4_in, ucs2_span, ucs4_span): Adjust calls to read_utf16_bom.
      	(surrogates): New enumeration type.
      	(utf16_in, utf16_out): Add surrogates parameter to choose between
      	UTF-16 and UCS2 behaviour.
      	(utf16_span, ucs2_span): Use std::min not std::max.
      	(ucs2_out): Use std::min not std::max.  Disallow surrogate pairs.
      	(ucs2_in): Likewise. Adjust calls to read_utf16_bom.
      	* testsuite/22_locale/codecvt/codecvt_utf16/79980.cc: New test.
      	* testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: New test.
      
      From-SVN: r246200
      Jonathan Wakely committed
    • PR libstdc++/79511 fix endianness of UTF-16 data · 02e12bda
      	PR libstdc++/79511
      	* src/c++11/codecvt.cc (write_utf16_code_point): Don't write 0xffff
      	as a surrogate pair.
      	(__codecvt_utf8_utf16_base<char32_t>::do_in): Use native endianness
      	for internal representation.
      	(__codecvt_utf8_utf16_base<wchar_t>::do_in): Likewise.
      	* testsuite/22_locale/codecvt/codecvt_utf8_utf16/79511.cc: New test.
      
      From-SVN: r246199
      Jonathan Wakely committed
    • PR libstdc++/80064 make heap algorithms work with function types · 8d85abab
      	PR libstdc++/80064
      	* include/bits/stl_heap.h (__is_heap, push_heap, __adjust_heap)
      	(pop_heap, make_heap, sort_heap, is_heap_until, is_heap): Cope with
      	invalid instantiations using function types for _Compare argument.
      	* testsuite/25_algorithms/make_heap/80064.cc: New test.
      
      From-SVN: r246197
      Jonathan Wakely committed
    • PR libstdc++/67440 make pretty printers work with GDB 7.6 again · 7acc5349
      	PR libstdc++/67440
      	* python/libstdcxx/v6/printers.py (find_type): Avoid gdb.Type.name
      	for GDB 7.6 compatibility, use gdb.Type.unqualified instead.
      
      From-SVN: r246196
      Jonathan Wakely committed
    • 2017-03-16 Tamar Christina <tamar.christina@arm.com> · d78607f5
      	* config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>)
      	Change ins into fmov.
      
      From-SVN: r246190
      Tamar Christina committed
    • [AArch64] Use 'x' constraint for vector HFmode multiplication by indexed element instructions · 6d06971d
      	* config/aarch64/iterators.md (h_con): Return "x" for V4HF and V8HF.
      	* config/aarch64/aarch64-simd.md (*aarch64_fma4_elt_from_dup<mode>):
      	Use h_con constraint for operand 1.
      	(*aarch64_fnma4_elt_from_dup<mode>): Likewise.
      	(*aarch64_mulx_elt_from_dup<mode>): Likewise for operand 2.
      
      From-SVN: r246189
      Kyrylo Tkachov committed
    • re PR tree-optimization/71437 (Performance regression after r235817) · f5a3ad8a
      	PR tree-optimization/71437
      	* tree-ssa-dom.c (derive_equivalences_from_bit_ior): New function.
      	(record_temporary_equivalences): Use it.
      
      From-SVN: r246187
      Jeff Law committed
    • re PR tree-optimization/71437 (Performance regression after r235817) · a3d514f2
      	PR tree-optimization/71437
      	* tree-ssa-dom.c (struct cond_equivalence): Moved from here into
      	tree-ssa-scopedtables.
      	(lookup_avail_expr, build_and_record_new_cond): Likewise.
      	(record_conditions, record_cond, vuse_eq): Likewise.
      	(record_edge_info): Adjust to API tweak of record_conditions.
      	(simplify_stmt_for_jump_threading): Similarly for lookup_avail_expr.
      	(record_temporary_equivalences, optimize_stmt): Likewise.
      	(eliminate_redundant_computations): Likewise.
      	(record_equivalences_from_stmt): Likewise.
      	* tree-ssa-scopedtables.c: Include options.h and params.h.
      	(vuse_eq): New function, moved from tree-ssa-dom.c
      	(build_and_record_new_cond): Likewise.
      	(record_conditions): Likewise.  Accept vector of conditions rather
      	than edge_equivalence structure for first argument.
      	for the first argument.
      	(avail_exprs_stack::lookup_avail_expr): New member function, moved
      	from tree-ssa-dom.c.
      	(avail_exprs_stack::record_cond): Likewise.
      	* tree-ssa-scopedtables.h (struct cond_equivalence): Moved here
      	from tree-ssa-dom.c.
      	(avail_exprs_stack): Add new member functions lookup_avail_expr
      	and record_cond.
      	(record_conditions): Declare.
      
      From-SVN: r246186
      Jeff Law committed
    • Daily bump. · 47ee2e07
      From-SVN: r246185
      GCC Administrator committed
  2. 15 Mar, 2017 17 commits