GCC Administrator [Wed, 8 May 2019 00:16:19 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r270997
Cherry Zhang [Wed, 8 May 2019 00:14:17 +0000 (00:14 +0000)]
compiler: add an option to emit optimization diagnostics
Add a -fgo-debug-optimization option to emit optimization
diagnostics. This can be used for testing optimizations. Apply
this to the range clear optimizations of maps and arrays.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/170002
gcc/go:
* lang.opt (-fgo-debug-optimization): New option.
* go-c.h (struct go_create_gogo_args): Add debug_optimization
field.
* go-lang.c (go_langhook_init): Set debug_optimization field.
* gccgo.texi (Invoking gccgo): Document -fgo-debug-optimization.
gcc/testsuite:
* go.dg/arrayclear.go: New test.
* go.dg/mapclear.go: New test.
From-SVN: r270993
Joseph Myers [Wed, 8 May 2019 00:05:06 +0000 (01:05 +0100)]
Update .po files.
* be.po, da.po, de.po, el.po, es.po, fi.po, fr.po, hr.po, id.po,
ja.po, nl.po, ru.po, sr.po, sv.po, tr.po, uk.po, vi.po, zh_CN.po,
zh_TW.po: Update.
From-SVN: r270991
Jonathan Wakely [Tue, 7 May 2019 23:22:01 +0000 (00:22 +0100)]
Improve API docs for Filesystem TS and Networking TS
* include/experimental/bits/fs_path.h: Improve docs.
* include/experimental/bits/net.h: Fix wrong header name in comment.
Do not document implementation details.
* include/experimental/netfwd: Fix doxygen grouping.
From-SVN: r270990
Jonathan Wakely [Tue, 7 May 2019 22:46:56 +0000 (23:46 +0100)]
Improve API docs for std::pair
* include/bits/stl_pair.h: Improve docs.
* include/std/tuple: Likewise.
From-SVN: r270989
Jonathan Wakely [Tue, 7 May 2019 22:46:53 +0000 (23:46 +0100)]
Improve API docs for <chrono> and <ratio>
* doc/doxygen/doxygroups.cc (std::literals): Add documentation for
inline namespace.
* include/std/chrono: Improve docs.
* include/std/ratio: Do not document implementation details.
* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
line numbers.
* testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
From-SVN: r270988
Jonathan Wakely [Tue, 7 May 2019 22:46:39 +0000 (23:46 +0100)]
PR libstdc++/89102 implement new common_type rules (P0435R1, P0548R1)
This change ensures that std::common_type<> is a complete type (LWG
2408), and that std::common_type<T>, std::common_type<cv T1, cv T2>, and
std::common_type<T1, T2, R...> will use program-defined specializations
for std::common_type<T1, T2> (LWG 2465).
The implementation of common_type<T1, T2, R...> is changed to use
void_t, and the specializations for duration and time_point are modified
to also use void_t instead of depending on implementation details of
common_type.
PR libstdc++/89102
* doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
* include/std/chrono (__duration_common_type_wrapper): Replace with ...
(__duration_common_type): New helper.
(common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
__duration_common_type.
(__timepoint_common_type_wrapper): Replace with ...
(__timepoint_common_type): New helper.
(common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
Use __time_point_common_type.
* include/std/type_traits (common_type<>): Define, as per LWG 2408.
(__common_type_impl): If either argument is transformed by decay,
use the common_type of the decayed types.
(__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
decayed, use __do_common_type_impl to get the common_type.
(common_type<_Tp>): Use common_type<_Tp, _Tp>.
(__do_member_type_wrapper, __member_type_wrapper)
(__expanded_common_type_wrapper): Remove.
(__common_type_pack, __common_type_fold): New helpers.
(common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
__member_type_wrapper and __expanded_common_type_wrapper.
* testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
Test zero-length template argument list.
* testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
Test single argument cases and argument types that should decay.
* testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
Adjust expected error.
* testsuite/20_util/duration/literals/range_neg.cc: Use zero for
dg-error lineno.
* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
From-SVN: r270987
Jason Merrill [Tue, 7 May 2019 22:37:24 +0000 (18:37 -0400)]
PR c++/90171 - reorganize usual_deallocation_fn_p
When fixing 90171 it struck me as undesirable to have so many separate
functions that all needed to know about the definition of a usual
deallocation function. So this patch condenses them into one. I left
destroying_delete_p because it is used by other files as well.
* call.c (struct dealloc_info): New.
(usual_deallocation_fn_p): Take a dealloc_info*.
(aligned_deallocation_fn_p, sized_deallocation_fn_p): Remove.
(build_op_delete_call): Adjust.
From-SVN: r270986
Jason Merrill [Tue, 7 May 2019 22:37:19 +0000 (18:37 -0400)]
PR c++/86485 - -Wmaybe-unused with empty class ?:
* typeck.c (build_static_cast_1): Use cp_build_addr_expr.
For GCC 9 I fixed this bug with a patch to gimplify_cond_expr, but this
function was also doing the wrong thing.
Using build_address does not push the ADDR_EXPR down into the arms of a
COND_EXPR, which we need for proper handling of conversion of an lvalue ?:
to another reference type.
From-SVN: r270985
Jason Merrill [Tue, 7 May 2019 22:37:14 +0000 (18:37 -0400)]
A non-type template parm with a placeholder type is type-dependent.
* pt.c (type_dependent_expression_p): A non-type template parm with
a placeholder type is type-dependent.
From-SVN: r270984
Segher Boessenkool [Tue, 7 May 2019 22:25:05 +0000 (00:25 +0200)]
rs6000: Remove reload leftovers
There are a few things left in the rs6000 port that are unused now
that we do not support old reload anymore. This removes those.
* config/rs6000/rs6000-protos.h (rs6000_legitimize_reload_address_ptr):
Delete declaration.
* config/rs6000/rs6000.c (rs6000_legitimize_reload_address): Delete.
(rs6000_debug_legitimize_reload_address): Delete.
(rs6000_legitimize_reload_address_ptr): Delete.
(rs6000_option_override_internal): Adjust.
(mem_operand_gpr): Adjust comment.
(legitimate_lo_sum_address_p): Ditto.
(rs6000_legitimize_reload_address): Delete.
(rs6000_debug_legitimize_reload_address): Delete.
* config/rs6000/rs6000.h (LEGITIMIZE_RELOAD_ADDRESS): Delete.
From-SVN: r270983
Kelvin Nilsen [Tue, 7 May 2019 21:40:46 +0000 (21:40 +0000)]
re PR middle-end/89765 (Multiple problems with vec-insert implementation on PowerPC)
gcc/ChangeLog:
2019-05-07 Kelvin Nilsen <kelvin@gcc.gnu.org>
PR target/89765
* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
In handling of ALTIVEC_BUILTIN_VEC_INSERT, use modular arithmetic
to compute vector element selector for both constant and variable
operands.
gcc/testsuite/ChangeLog:
2019-05-07 Kelvin Nilsen <kelvin@gcc.gnu.org>
PR target/89765
* gcc.target/powerpc/pr89765-mc.c: New test.
* gcc.target/powerpc/vsx-builtin-10c.c: New test.
* gcc.target/powerpc/vsx-builtin-10d.c: New test.
* gcc.target/powerpc/vsx-builtin-11c.c: New test.
* gcc.target/powerpc/vsx-builtin-11d.c: New test.
* gcc.target/powerpc/vsx-builtin-12c.c: New test.
* gcc.target/powerpc/vsx-builtin-12d.c: New test.
* gcc.target/powerpc/vsx-builtin-13c.c: New test.
* gcc.target/powerpc/vsx-builtin-13d.c: New test.
* gcc.target/powerpc/vsx-builtin-14c.c: New test.
* gcc.target/powerpc/vsx-builtin-14d.c: New test.
* gcc.target/powerpc/vsx-builtin-15c.c: New test.
* gcc.target/powerpc/vsx-builtin-15d.c: New test.
* gcc.target/powerpc/vsx-builtin-16c.c: New test.
* gcc.target/powerpc/vsx-builtin-16d.c: New test.
* gcc.target/powerpc/vsx-builtin-17c.c: New test.
* gcc.target/powerpc/vsx-builtin-17d.c: New test.
* gcc.target/powerpc/vsx-builtin-18c.c: New test.
* gcc.target/powerpc/vsx-builtin-18d.c: New test.
* gcc.target/powerpc/vsx-builtin-19c.c: New test.
* gcc.target/powerpc/vsx-builtin-19d.c: New test.
* gcc.target/powerpc/vsx-builtin-20c.c: New test.
* gcc.target/powerpc/vsx-builtin-20d.c: New test.
* gcc.target/powerpc/vsx-builtin-9c.c: New test.
* gcc.target/powerpc/vsx-builtin-9d.c: New test.
From-SVN: r270982
Uros Bizjak [Tue, 7 May 2019 21:36:42 +0000 (23:36 +0200)]
i386.md (cvt_mnemonic): New mode attribute.
* config/i386/i386.md (cvt_mnemonic): New mode attribute.
(ashr<mode>3_cvt): Merge insn pattern from ashrsi3_cvt and
ashrdi3_cvt using SWI48 mode iterator.
From-SVN: r270981
Nathan Sidwell [Tue, 7 May 2019 18:13:57 +0000 (18:13 +0000)]
[libcpp] Reimplement mkdeps data structures
https://gcc.gnu.org/ml/gcc-patches/2019-05/msg00323.html
* files.c (_cpp_stack_file): Empty filenames aren't dependencies.
* mkdeps.c (deps_add_dep): Assert not empty.
From-SVN: r270978
Jim Wilson [Tue, 7 May 2019 17:46:51 +0000 (17:46 +0000)]
Resign as IA-64 maintainer.
* MAINTAINERS: Remove myself as IA-64 maintainer.
From-SVN: r270977
Alejandro Martinez [Tue, 7 May 2019 16:34:20 +0000 (16:34 +0000)]
This patch adds support to vectorize sum of abslolute differences (SAD_EXPR)
using SVE.
Given this input code:
int
sum_abs (uint8_t *restrict x, uint8_t *restrict y, int n)
{
int sum = 0;
for (int i = 0; i < n; i++)
{
sum += __builtin_abs (x[i] - y[i]);
}
return sum;
}
The resulting SVE code is:
0000000000000000 <sum_abs>:
0:
7100005f cmp w2, #0x0
4:
5400026d b.le 50 <sum_abs+0x50>
8:
d2800003 mov x3, #0x0 // #0
c:
93407c42 sxtw x2, w2
10:
2538c002 mov z2.b, #0
14:
25221fe0 whilelo p0.b, xzr, x2
18:
2538c023 mov z3.b, #1
1c:
2518e3e1 ptrue p1.b
20:
a4034000 ld1b {z0.b}, p0/z, [x0, x3]
24:
a4034021 ld1b {z1.b}, p0/z, [x1, x3]
28:
0430e3e3 incb x3
2c:
0520c021 sel z1.b, p0, z1.b, z0.b
30:
25221c60 whilelo p0.b, x3, x2
34:
040d0420 uabd z0.b, p1/m, z0.b, z1.b
38:
44830402 udot z2.s, z0.b, z3.b
3c:
54ffff21 b.ne 20 <sum_abs+0x20> // b.any
40:
2598e3e0 ptrue p0.s
44:
04812042 uaddv d2, p0, z2.s
48:
1e260040 fmov w0, s2
4c:
d65f03c0 ret
50:
1e2703e2 fmov s2, wzr
54:
1e260040 fmov w0, s2
58:
d65f03c0 ret
Notice how udot is used inside a fully masked loop.
gcc/Changelog:
2019-05-07 Alejandro Martinez <alejandro.martinezvicente@arm.com>
* config/aarch64/aarch64-sve.md (<su>abd<mode>_3): New define_expand.
(aarch64_<su>abd<mode>_3): Likewise.
(*aarch64_<su>abd<mode>_3): New define_insn.
(<sur>sad<vsi2qi>): New define_expand.
* config/aarch64/iterators.md: Added MAX_OPP attribute.
* tree-vect-loop.c (use_mask_by_cond_expr_p): Add SAD_EXPR.
(build_vect_cond_expr): Likewise.
gcc/testsuite/Changelog:
2019-05-07 Alejandro Martinez <alejandro.martinezvicente@arm.com>
* gcc.target/aarch64/sve/sad_1.c: New test for sum of absolute
differences.
From-SVN: r270975
Uros Bizjak [Tue, 7 May 2019 15:42:42 +0000 (17:42 +0200)]
cfgexpand.c (asm_clobber_reg_is_valid): Reject clobbers outside of accessible_reg_set.
* cfgexpand.c (asm_clobber_reg_is_valid): Reject
clobbers outside of accessible_reg_set.
* config/i386/i386.c (ix86_conditional_register_usage):
Disable register sets by clearing corresponding bits in
accessible_reg_set. Do not set corresponding bits in fixed_regs,
call_used_regs and don't clear corresponding reg_names array members.
testsuite/ChangeLog:
* gcc.target/i386/asm-7.c: New test.
* gcc.target/i386/asm-1.c: Update expected error string.
* gcc.target/i386/pr62120.c: Ditto.
From-SVN: r270955
Jonathan Wakely [Tue, 7 May 2019 15:30:52 +0000 (16:30 +0100)]
Fix incorrect DR numbers in libstdc++ manual
* doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
From-SVN: r270954
Nina Dinka Ranns [Tue, 7 May 2019 15:30:46 +0000 (15:30 +0000)]
Make allocator propagation more consistent for operator+(basic_string) (P1165R1)
2019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
Make allocator propagation more consistent for
operator+(basic_string) (P1165R1)
* include/bits/basic_string.h
(operator+(basic_string&&, basic_string&&): Changed resulting
allocator to always be the one from the first parameter.
* include/bits/basic_string.tcc
(operator+(const _CharT*, const basic_string&)): Changed
resulting allocator to be SOCCC on the second parameter's allocator.
(operator+(_CharT, const basic_string&)): Likewise.
* testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
New.
* testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
New.
From-SVN: r270953
Jonathan Wakely [Tue, 7 May 2019 15:30:40 +0000 (16:30 +0100)]
Improve API docs for std::regex
* include/bits/regex.h: Improve docs.
* include/bits/regex.tcc: Do not document implementation details.
From-SVN: r270952
Jonathan Wakely [Tue, 7 May 2019 15:30:29 +0000 (16:30 +0100)]
Add test for std::hash<std::error_code>
Copied from 19_diagnostics/error_condition/hash.cc added recently.
* testsuite/19_diagnostics/error_code/hash.cc: New test.
From-SVN: r270951
Rainer Orth [Tue, 7 May 2019 15:19:26 +0000 (15:19 +0000)]
Fix make install-gcc-specs with empty GCC_SPECS_FILES
* gcc-interface/Makefile.in (install-gcc-specs): Use foreach.
Honor DESTDIR.
From-SVN: r270947
Richard Biener [Tue, 7 May 2019 13:07:48 +0000 (13:07 +0000)]
tree-vect-stmts.c (vect_is_simple_cond): When vectype is not specified still compute a comp_vectype for invariant compares.
2019-05-07 Richard Biener <rguenther@suse.de>
* tree-vect-stmts.c (vect_is_simple_cond): When vectype is
not specified still compute a comp_vectype for invariant
compares.
From-SVN: r270945
Richard Biener [Tue, 7 May 2019 13:03:19 +0000 (13:03 +0000)]
re PR tree-optimization/90316 (large compile time increase in opt / alias stmt walking for Go example)
2019-05-07 Richard Biener <rguenther@suse.de>
PR tree-optimization/90316
* tree-ssa-pre.c (translate_vuse_through_block): When
same_valid is NULL do not bother to search for a virtual
PHI continuation.
(phi_translate_1): When operands changed we cannot keep
the same value-number so do not bother to ask whether
that's possible from translate_vuse_through_block.
From-SVN: r270944
Nathan Sidwell [Tue, 7 May 2019 12:39:59 +0000 (12:39 +0000)]
[libcpp] Reimplement mkdeps data structures
https://gcc.gnu.org/ml/gcc-patches/2019-05/msg00293.html
* include/mkdeps.h (deps_write): Add PHONY arg.
(deps_phony_targets): Delete.
* init.c (cpp_finish): Just call deps_write.
* mkdeps.c (struct mkdeps): Add local vector class. Reimplement
vector handling.
(munge): Munge to static buffer.
(apply_vpath): Adjust vector handling.
(deps_init, deps_free): Use new, delete.
(deps_add_target): Do not munge here. Record quoting low water mark.
(deps_add_dep): Do not munge here.
(deps_add_vpath): Adjust vector handling.
(make_write_name): New. Munge on demand here.
(make_write_vec): New.
(deps_phony_targets): Delete.
(make_write): New.
(deps_write): Forward to deps_Write.
(deps_save, deps_restore): Adjust vector handling.
From-SVN: r270943
Martin Liska [Tue, 7 May 2019 12:15:45 +0000 (14:15 +0200)]
Fix bitmap registration of overheads.
2019-05-07 Martin Liska <mliska@suse.cz>
* bitmap.c (bitmap_register): Come up with
alloc_descriptor_max_uid and assign it for
a new bitmap.
(register_overhead): Use get_descriptor as
a descriptor.
(release_overhead): New.
(bitmap_elem_to_freelist): Call it.
(bitmap_elt_clear_from): Likewise.
(bitmap_obstack_free): Likewise.
(bitmap_move): Sensitively release memory.
* bitmap.h (struct GTY): Add alloc_descriptor and padding.
(bitmap_initialize): Initialize alloc_descriptor to zero.
* tree-ssa-pre.c (do_hoist_insertion): Use bitmap_move.
From-SVN: r270942
Richard Biener [Tue, 7 May 2019 11:47:48 +0000 (11:47 +0000)]
tree-vect-slp.c (vect_build_slp_tree_2): Bump size whenever we build a SLP node.
2019-05-07 Richard Biener <rguenther@suse.de>
* tree-vect-slp.c (vect_build_slp_tree_2): Bump size whenever
we build a SLP node. Remove max_size and limiting.
(vect_analyze_slp_instance): Record and dump size of the SLP graph.
From-SVN: r270941
Richard Biener [Tue, 7 May 2019 11:17:00 +0000 (11:17 +0000)]
re PR tree-optimization/90316 (large compile time increase in opt / alias stmt walking for Go example)
2019-05-07 Richard Biener <rguenther@suse.de>
PR tree-optimization/90316
* tree-ssa-alias.h (get_continuation_for_phi): Take walking
limit by reference.
(walk_non_aliased_vuses): Take walking limit argument.
* tree-ssa-alias.c (maybe_skip_until): Take limit and abort
walking if it is reached instead of just counting.
(get_continuation_for_phi): Likewise.
(walk_non_aliased_vuses): Likewise, instead of leaving counter
limiting to the callback.
* tree-ssa-sccvn.c (vn_reference_lookup_2): Adjust.
(vn_reference_lookup_3): Likewise.
(vn_reference_lookup_pieces): Likewise.
(vn_reference_lookup): Likewise.
* tree-ssa-pre.c (translate_vuse_through_block): Limit walking.
* tree-ssa-scopedtables.c (vuse_eq): Adjust.
(avail_exprs_stack::lookup_avail_expr): Likewise.
From-SVN: r270940
Rainer Orth [Tue, 7 May 2019 10:38:45 +0000 (10:38 +0000)]
Check if Solaris ld supports -z relax=transtls
* m4/druntime/os.m4 (DRUNTIME_OS_LINK_SPEC): Only use -z
relax=transtls if linker supports it.
* configure.ac (enable_libphobos, LIBPHOBOS_SUPPORTED): Move down.
(x86_64-*-solaris2.* | i?86-*-solaris2.*): Only
mark supported with either gld or ld -z relax=transtls.
* configure: Regenerate.
From-SVN: r270939
Jan Hubicka [Tue, 7 May 2019 09:36:05 +0000 (09:36 +0000)]
tree-ssa-alias.c (aliasing_component_refs_p): Continue looking for comparaible types in the second direction even if...
* tree-ssa-alias.c (aliasing_component_refs_p): Continue looking
for comparaible types in the second direction even if first one
hits incomparable type.
From-SVN: r270938
Richard Biener [Tue, 7 May 2019 08:52:33 +0000 (08:52 +0000)]
re PR lto/90369 (error: could not unlink output file)
2019-05-07 Richard Biener <rguenther@suse.de>
PR lto/90369
* lto-wrapper.c (debug_objcopy): Use the original filename
including archive offset for the filename used for -save-temps.
From-SVN: r270937
Rainer Orth [Tue, 7 May 2019 07:44:55 +0000 (07:44 +0000)]
Fix Solaris bootstrap: lto-common.c, lto-dump.c format mismatches
* lto-common.c (lto_file_read): Print section->start as int64_t,
section->len as uint64_t.
* lto-dump.c (symbol_entry::dump): Print sz as uint64_t.
From-SVN: r270935
Li Jia He [Tue, 7 May 2019 05:39:01 +0000 (05:39 +0000)]
Fix a typo in two_value_replacement function
GCC revision 267634 implemented two_value_replacement function.
However, a typo occurred during the parameter check, which caused
us to miss some optimizations.
The intent of the code might be to check that the input parameters
are const int and their difference is one. However, when I read
the code, I found that it is wrong to detect whether an input data
plus one is equal to itself. This could be a typo.
2019-05-07 Li Jia He <helijia@linux.ibm.com>
* tree-ssa-phiopt.c (two_value_replacement): Fix a typo in parameter
detection.
* gcc.dg/tree-ssa/pr37508.c: Add the no-ssa-phiopt option to skip phi
optimization.
* gcc.dg/tree-ssa/pr88676-2.c: New testcase.
From-SVN: r270934
GCC Administrator [Tue, 7 May 2019 00:17:00 +0000 (00:17 +0000)]
Daily bump.
From-SVN: r270933
Segher Boessenkool [Mon, 6 May 2019 23:50:42 +0000 (01:50 +0200)]
rs6000: Renumber the registers
This renumbers the registers.
It moves the VRs to 64..95, right after the GPRs and the FPRS. This
means that the VSRs (which are aliases to the FPRs and the VRs, in
that order) are consecutive now.
It removes MQ, which has been just a stub for ages (it is a leftover
from RIOS, old POWER).
It moves the CR fields to 100..107, which is a bit easier to read
than the 68..75 is was before.
The rest fills the holes. It should be easy to move anything else
after this series, so the exact order isn't very important anymore,
we aren't stuck with it if we dislike it.
Many things still want the GPRs to be at 0..31, and some things want
the FPRs at 32..63. I don't think we'll ever want to change that,
so I left it be.
Small things... It removes DWARF_FRAME_REGISTERS, it used to save
1000 or so words of memory, but it has been just a handful for a
while, and now it is one. Some whitespace fixes. Testing showed one
or two places where register allocation was different (not worse, not
better, just different).
* config/rs6000/rs6000.md (FIRST_ALTIVEC_REGNO, LAST_ALTIVEC_REGNO)
(LR_REGNO, CTR_REGNO, CA_REGNO, ARG_POINTER_REGNUM, CR0_REGNO)
(CR1_REGNO, CR2_REGNO, CR3_REGNO, CR4_REGNO, CR5_REGNO, CR6_REGNO)
(CR7_REGNO, MAX_CR_REGNO, VRSAVE_REGNO, VSCR_REGNO)
(FRAME_POINTER_REGNUM): Change numbering.
* config/rs6000/rs6000.c (rs6000_reg_names): Adjust.
(alt_reg_names): Adjust.
(rs6000_conditional_register_usage): Don't mark hard register 64 as
fixed.
* config/rs6000/rs6000.h (FIRST_PSEUDO_REGISTER): Adjust.
(DWARF_FRAME_REGISTERS): Delete.
(DWARF2_FRAME_REG_OUT): Fix whitespace.
(FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS):
Adjust.
(REG_ALLOC_ORDER): Adjust.
(FRAME_POINTER_REGNUM, ARG_POINTER_REGNUM): Adjust.
(REG_CLASS_CONTENTS): Adjust.
(RETURN_ADDR_RTX): Change comment.
(REGNO_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_P): Use ARG_POINTER_REGNUM
instead of 67.
(REGISTER_NAMES): Adjust.
(ADDITIONAL_REGISTER_NAMES): Adjust.
* config/rs6000/darwin.h (REGISTER_NAMES): Adjust.
From-SVN: r270929
Steven G. Kargl [Mon, 6 May 2019 23:24:32 +0000 (23:24 +0000)]
re PR fortran/90290 (-std=f2008 should reject non-constant stop and error stop codes)
2019-05-06 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/90290
* match.c (gfc_match_stopcode): Check F2008 condition on stop code.
2019-05-06 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/90290
* gfortran.dg/pr90290.f90: New test.
From-SVN: r270928
Segher Boessenkool [Mon, 6 May 2019 22:04:19 +0000 (00:04 +0200)]
rs6000: Remove TM regs
We do not need to expose the TM registers in debug info. It isn't
actually useful there, because none of the things that can modify
these registers (other than explicit moves) are marked.
We also do not need the registers for GCC itself internally. This
patch deletes them.
* config/rs6000/rs6000.md (TFHAR_REGNO, TFIAR_REGNO, TEXASR_REGNO):
Delete.
* config/rs6000/rs6000.h (FIRST_PSEUDO_REGISTER): Adjust.
(DWARF_FRAME_REGISTERS): Adjust.
(FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS):
Adjust.
(REG_ALLOC_ORDER): Adjust.
(enum reg_class): Delete SPR_REGS.
(REG_CLASS_NAMES): Delete SPR_REGS.
(REG_CLASS_CONTENTS): Delete SPR_REGS. Adjust for deleted TM regs.
(REGISTER_NAMES): Adjust.
(ADDITIONAL_REGISTER_NAMES): Adjust.
* config/rs6000/darwin.h (REGISTER_NAMES): Adjust.
* config/rs6000/htm.md (htm_mfspr_<mode>, htm_mtspr_<mode>): Adjust.
* config/rs6000/predicates.md (htm_spr_reg_operand): Delete.
* config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Adjust.
(htm_spr_regno): Delete.
(htm_expand_builtin): Adjust: the HTM builtins now have one fewer
argument.
(rs6000_dbx_register_number): Adjust.
From-SVN: r270927
Segher Boessenkool [Mon, 6 May 2019 22:02:24 +0000 (00:02 +0200)]
rs6000: Delete PRE_GCC3_DWARF_FRAME_REGISTERS
We don't need this.
* config/rs6000/rs6000.h (PRE_GCC3_DWARF_FRAME_REGISTERS): Delete.
From-SVN: r270926
Segher Boessenkool [Mon, 6 May 2019 22:01:27 +0000 (00:01 +0200)]
rs6000: rs6000_dbx_register_number for fp/ap/mq
The frame pointer and the argument pointer aren't real registers. MQ
was a register on old POWER. All three are still used as arguments to
rs6000_dbx_register_number during initialisation. If we handle them
explicitly we can do a gcc_unreachable to catch other unexpected
registers.
* config/rs6000/rs6000.c (rs6000_dbx_register_number): Handle
FRAME_POINTER_REGNUM, ARG_POINTER_REGNUM, and 64 (which was MQ).
From-SVN: r270925
Jakub Jelinek [Mon, 6 May 2019 21:50:14 +0000 (23:50 +0200)]
re PR tree-optimization/88709 (Improve store-merging)
PR tree-optimization/88709
PR tree-optimization/90271
* params.def (PARAM_STORE_MERGING_MAX_SIZE): New parameter.
* gimple-ssa-store-merging.c (encode_tree_to_bitpos): Handle
non-clobber CONSTRUCTORs with no elts. Remove useless tmp_int
variable.
(imm_store_chain_info::coalesce_immediate_stores): Punt if the size
of the store merging group is larger than
PARAM_STORE_MERGING_MAX_SIZE parameter.
(split_group): Add bzero_first argument. If set, always emit first
the first store which must be = {} of the whole area and then for the
rest of the stores consider all zero bytes as paddings.
(imm_store_chain_info::output_merged_store): Check if first store
is = {} of the whole area and if yes, determine which setting of
bzero_first for split_group gives smaller number of stores. Adjust
split_group callers.
(lhs_valid_for_store_merging_p): Allow decls.
(rhs_valid_for_store_merging_p): Allow non-clobber CONTRUCTORs with
no elts.
(pass_store_merging::process_store): Likewise.
* gcc.dg/store_merging_26.c: New test.
* gcc.dg/store_merging_27.c: New test.
* gcc.dg/store_merging_28.c: New test.
* gcc.dg/store_merging_29.c: New test.
From-SVN: r270924
Kelvin Nilsen [Mon, 6 May 2019 17:00:46 +0000 (17:00 +0000)]
re PR target/89424 (__builtin_vec_ext_v1ti (v, i) results in ICE with variable i (RS6000))
gcc/ChangeLog:
2019-05-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
PR target/89424
* config/rs6000/rs6000.c (rs6000_expand_vector_extract): Add
handling of V1TImode.
gcc/testsuite/ChangeLog:
2019-05-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
PR target/89424
* gcc.target/powerpc/pr89424-0.c: New test.
* gcc.target/powerpc/vsx-builtin-13a.c: Define macro PR89424 to
enable testing of newly patched capability.
* gcc.target/powerpc/vsx-builtin-13b.c: Likewise.
* gcc.target/powerpc/vsx-builtin-20a.c: Likewise.
* gcc.target/powerpc/vsx-builtin-20b.c: Likewise.
From-SVN: r270918
Marek Polacek [Mon, 6 May 2019 16:56:39 +0000 (16:56 +0000)]
PR c++/90265 - ICE with generic lambda.
* pt.c (tsubst_copy_and_build): Use a dedicated variable for the last
element in the vector.
* g++.dg/cpp1y/lambda-generic-90265.C: New test.
From-SVN: r270917
Uros Bizjak [Mon, 6 May 2019 14:58:57 +0000 (16:58 +0200)]
re PR target/89221 (--enable-frame-pointer does not work as intended)
PR target/89221
* config.gcc (i[34567]86-*-*, x86_64-*-*): Move tests for enable_cld
and enable_frame_pointer ...
* configure.ac: ... here. Update help strings for
--enable-frame-pointer.
* configure: Regenerate.
* config/i386/i386-options.c (ix86_option_override_internal): Remove
USE_X86_64_FRAME_POINTER define, use USE_IX86_FRAME_POINTER instead.
* config/i386/sol2.h (USE_IX86_FRAME_POINTER): Remove.
(USE_X86_64_FRAME_POINTER): Ditto.
From-SVN: r270914
Martin Liska [Mon, 6 May 2019 14:03:27 +0000 (16:03 +0200)]
Append to target_gtfiles in order to fix Darwin bootstrap.
2019-05-06 Martin Liska <mliska@suse.cz>
* config.gcc: Append to target_gtfiles and fix indentation.
From-SVN: r270913
Richard Biener [Mon, 6 May 2019 13:40:00 +0000 (13:40 +0000)]
re PR tree-optimization/90358 (526.blender_r train run does not finish after r270847 on znver1)
2019-05-06 Richard Biener <rguenther@suse.de>
PR tree-optimization/90358
* tree-vect-stmts.c (get_group_load_store_type): Properly
detect unused upper half of load.
(vectorizable_load): Likewise.
* gcc.target/i386/pr90358.c: New testcase.
From-SVN: r270911
Li Jia He [Mon, 6 May 2019 13:17:20 +0000 (13:17 +0000)]
This reverts commit r270894, as new testcase fails on arm and aarch64, I am sorry for this.
From-SVN: r270910
Richard Biener [Mon, 6 May 2019 12:43:30 +0000 (12:43 +0000)]
re PR tree-optimization/88828 (Inefficient update of the first element of vector registers)
2019-05-06 Richard Biener <rguenther@suse.de>
PR tree-optimization/88828
* tree-ssa-forwprop.c (get_bit_field_ref_def): Split out from...
(simplify_vector_constructor): ...here. Handle constants in
the constructor.
* gcc.target/i386/pr88828-0.c: New testcase.
From-SVN: r270908
Richard Biener [Mon, 6 May 2019 12:38:35 +0000 (12:38 +0000)]
re PR tree-optimization/90328 (Wrong loop distribution with aliasing)
2019-05-06 Richard Biener <rguenther@suse.de>
PR tree-optimization/90328
* tree-data-ref.h (dr_may_alias_p): Pass in the actual loop nest.
* tree-data-ref.c (dr_may_alias_p): Check whether the clique
is valid in the loop nest before using it.
(initialize_data_dependence_relation): Adjust.
* graphite-scop-detection.c (build_alias_set): Pass the SCOP enclosing
loop as loop-nest to dr_may_alias_p.
* gcc.dg/torture/pr90328.c: New testcase.
From-SVN: r270906
Nathan Sidwell [Mon, 6 May 2019 11:34:47 +0000 (11:34 +0000)]
[libcpp] struct deps renaming
https://gcc.gnu.org/ml/gcc-patches/2019-05/msg00199.html
libcpp/
* include/mkdeps.h: Rename struct deps to struct mkdeps.
* mkdeps.c: Likewise.
* include/cpplib.h (cpp_get_deps): Rename return type..
* directives.c (cpp_get_deps): Likewise.
* internal.h (struct cpp_reader): Rename deps field type.
gcc/c-family/
* c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
From-SVN: r270905
Richard Biener [Mon, 6 May 2019 09:38:09 +0000 (09:38 +0000)]
dwarf2out.c (mem_loc_descriptor): Initialize int_mode.
2019-05-06 Richard Biener <rguenther@suse.de>
* dwarf2out.c (mem_loc_descriptor): Initialize int_mode.
From-SVN: r270903
Richard Biener [Mon, 6 May 2019 08:54:40 +0000 (08:54 +0000)]
re PR tree-optimization/90316 (large compile time increase in opt / alias stmt walking for Go example)
2019-05-06 Richard Biener <rguenther@suse.de>
PR tree-optimization/90316
* tree-ssa-alias.c (maybe_skip_until): Pass in target BB,
compute target on demand.
(get_continuation_for_phi): Remove code walking stmts to
get to a target virtual operand which could end up being
quadratic.
From-SVN: r270902
Thomas Schwinge [Mon, 6 May 2019 08:49:55 +0000 (10:49 +0200)]
Clean up libgomp GCC 5 legacy support
libgomp/
* oacc-parallel.c: Add comments to legacy entry points (GCC 5).
From-SVN: r270901
Richard Biener [Mon, 6 May 2019 07:38:26 +0000 (07:38 +0000)]
re PR testsuite/90331 (New test case gcc.dg/pr87314-1.c fails)
2019-05-06 Richard Biener <rguenther@suse.de>
PR testsuite/90331
* gcc.dg/pr87314-1.c: Align the substring to open up
string merging for targets aligning strings to 8 bytes.
From-SVN: r270900
Martin Liska [Mon, 6 May 2019 07:35:59 +0000 (09:35 +0200)]
Error only when a non-default -mabi is used with sanitizers (PR sanitizer/90312).
2019-05-06 Martin Liska <mliska@suse.cz>
PR sanitizer/90312
* config/i386/i386-options.c (ix86_option_override_internal): Error only
when -mabi is selected to a non-default version.
2019-05-06 Martin Liska <mliska@suse.cz>
PR sanitizer/90312
* gcc.dg/asan/pr87930.c: Run the test only on *linux or *gnu
systems.
* gcc.dg/tsan/pr88017.c: Likewise.
From-SVN: r270899
Martin Liska [Mon, 6 May 2019 07:23:35 +0000 (09:23 +0200)]
Fix GNU coding style in lto-common.c.
2019-05-06 Martin Liska <mliska@suse.cz>
* lto-common.c: Update coding style.
* lto.c (materialize_cgraph): Likewise.
From-SVN: r270898
Hrishikesh Kulkarni [Mon, 6 May 2019 07:23:25 +0000 (07:23 +0000)]
Add lto-dump tool.
2019-05-06 Hrishikesh Kulkarni <hrishikeshparag@gmail.com>
Martin Liska <mliska@suse.cz>
* Makefile.in: Add lto-dump.texi.
* cgraph.h: Add new functions get_visibility_string and
get_symtab_type_string.
* doc/gcc.texi: Include lto-dump section.
* doc/lto-dump.texi: New file.
* dumpfile.c (dump_switch_p_1): Use parse_dump_option.
(parse_dump_option): Factor out this function.
* dumpfile.h (enum dump_flag): Add new value TDF_ERROR.
(parse_dump_option): Export the function.
* symtab.c (symtab_node::get_visibility_string): New function.
(symtab_node::get_symtab_type_string): Likewise.
2019-05-06 Hrishikesh Kulkarni <hrishikeshparag@gmail.com>
Martin Liska <mliska@suse.cz>
* Make-lang.in: Add lto_dump-related definition.
* config-lang.in: Likewise.
* lang.opt: Add new language LTODump and options related
to LTO dump tool.
* lto-common.c (lto_read_decls): Support type statistics dump.
(lto_file_read): Likewise for object files.
* lto-dump.c: New file.
* lto-lang.c (lto_option_lang_mask): Move from ..
* lto.c (lto_option_lang_mask): .. here.
* lto.h (lto_option_lang_mask): New declaration.
Co-Authored-By: Martin Liska <mliska@suse.cz>
From-SVN: r270897
Martin Liska [Mon, 6 May 2019 07:23:03 +0000 (09:23 +0200)]
Split part of functionality from lto.c to lto-common.c.
2019-05-06 Martin Liska <mliska@suse.cz>
Hrishikesh Kulkarni <hrishikeshparag@gmail.com>
* Make-lang.in: Add lto-common.o.
* config-lang.in: Likewise for gtfiles.
* lto-common.c: New file.
* lto-common.h: New file.
* lto-lang.c: Include lto-common.h.
* lto.c: Move most of the functionality
into lto-common.c file.
Co-Authored-By: Hrishikesh Kulkarni <hrishikeshparag@gmail.com>
From-SVN: r270896
Martin Liska [Mon, 6 May 2019 07:18:26 +0000 (09:18 +0200)]
Split i386.c.
2019-05-06 Martin Liska <mliska@suse.cz>
* config/i386/i386-builtins.c: New file.
* config/i386/i386-builtins.h: New file.
* config/i386/i386-expand.c: New file.
* config/i386/i386-expand.h: New file.
* config/i386/i386-features.c: New file.
* config/i386/i386-features.h: New file.
* config/i386/i386-options.c: New file.
* config/i386/i386-options.h: New file.
* config.gcc: Add new files into extra_objs and
target_gtfiles.
* config/i386/i386.c: Split content of the file
into newly introduced files.
* config/i386/i386.h: Declare common variables
and macros.
* config/i386/t-i386: Define dependencies for new files.
From-SVN: r270895
Li Jia He [Mon, 6 May 2019 06:00:03 +0000 (06:00 +0000)]
Fix a typo in two_value_replacement function
GCC revision 267634 implemented two_value_replacement function.
However, a typo occurred during the parameter check, which caused
us to miss some optimizations.
The intent of the code might be to check that the input parameters
are const int and their difference is one. However, when I read
the code, I found that it is wrong to detect whether an input data
plus one is equal to itself. This could be a typo.
2019-05-06 Li Jia He <helijia@linux.ibm.com>
* tree-ssa-phiopt.c (two_value_replacement): Fix a typo in parameter
detection.
* gcc.dg/tree-ssa/pr37508.c: Add the no-ssa-phiopt option to skip phi
optimization.
* gcc.dg/tree-ssa/pr88676-2.c: New testcase.
From-SVN: r270894
François Dumont [Mon, 6 May 2019 05:33:23 +0000 (05:33 +0000)]
printers.py (add_one_template_type_printer): Add type printer for container types in std::__debug namespace.
2019-05-06 François Dumont <fdumont@gcc.gnu.org>
* python/libstdcxx/v6/printers.py (add_one_template_type_printer):
Add type printer for container types in std::__debug namespace.
* testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
(gdb-tests): Use distinct parameters for the type of test and use of
regex.
(gdb-test): Check for regex test even if 'whatis' test.
* testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
mode.
* testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
* testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
* testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
* testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
* testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
* testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
* testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
From-SVN: r270893
GCC Administrator [Mon, 6 May 2019 00:16:16 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r270892
Thomas Koenig [Sun, 5 May 2019 13:53:24 +0000 (13:53 +0000)]
re PR fortran/90344 (small code that compiles and runs in 7.3.0 but not 7.4.1)
2019-05-05 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/90344
* gfortran.dg/pr90344.f90: New test.
From-SVN: r270882
GCC Administrator [Sun, 5 May 2019 00:16:19 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r270881
Jonathan Wakely [Sat, 4 May 2019 15:52:52 +0000 (16:52 +0100)]
Fix reference to wrong class in comment
* include/std/system_error (error_category): Fix comment.
From-SVN: r270877
Jonathan Wakely [Sat, 4 May 2019 14:35:33 +0000 (15:35 +0100)]
PR libstdc++/90299 make filesystem::absolute overloads consistent
In this implementation it is an error to pass the empty path to absolute,
because the empty path doesn't represent any file in the filesystem so
the function cannot meet its postcondition.
Currently the absolute(const path&, error_code&) overload reports an
error for the empty path, but using errc::no_such_file_or_directory, and
the other overload does not report an error. This patch makes them
consistntly report an errc::invalid_argument error for the empty path.
PR libstdc++/90299
* src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
argument is an empty path.
(absolute(const path&, error_code&)): Use invalid_argument as error
code instead of no_such_file_or_directory.
* testsuite/27_io/filesystem/operations/absolute.cc: Check handling
of non-existent paths and empty paths with both overloads of absolute.
From-SVN: r270874
Jonathan Wakely [Sat, 4 May 2019 14:35:29 +0000 (15:35 +0100)]
Improve API docs for <system_error> header
* include/std/system_error (error_category, error_code)
(error_condition): Improve docs.
* libsupc++/exception: Add missing @addtogroup Doxygen command.
* libsupc++/exception_ptr.h (exception_ptr): Link equality operators
to class documentation. Suppress documentation for implementation
details.
* libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
Suppress documentation for implementation details.
From-SVN: r270873
Jonathan Wakely [Sat, 4 May 2019 14:35:25 +0000 (15:35 +0100)]
Fix std::hash<std::error_condition>
The hash value should be based on the identity (i.e. address) of the
error_category member, not its object representation (i.e. underlying
bytes).
* include/std/system_error (error_code): Remove friend declaration
for hash<error_code>.
(hash<error_code>::operator()): Use public member functions to access
value and category.
(hash<error_condition>::operator()): Use address of category, not
its object representation.
* src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
Use public member functions to access value and category.
* testsuite/19_diagnostics/error_condition/hash.cc: New test.
From-SVN: r270872
Gerald Pfeifer [Sat, 4 May 2019 13:28:49 +0000 (13:28 +0000)]
crontab: Snapshots from trunk are now GCC 10 related.
* crontab: Snapshots from trunk are now GCC 10 related.
Add GCC 9 snapshots from the respective branch.
From-SVN: r270871
François Dumont [Sat, 4 May 2019 07:41:39 +0000 (07:41 +0000)]
Add missing PR libstdc++/90277 reference.
From-SVN: r270870
Roland Illig [Sat, 4 May 2019 07:38:52 +0000 (07:38 +0000)]
Add myself to MAINTAINERS.
2019-05-04 Roland Illig <roland.illig@gmx.de>
* MAINTAINERS (Write After Approval): Add myself.
From-SVN: r270869
François Dumont [Sat, 4 May 2019 07:38:46 +0000 (07:38 +0000)]
hashtable.h (_Hashtable<>::rehash): Review comment.
2019-05-04 François Dumont <fdumont@gcc.gnu.org>
* include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
* include/bits/hashtable_policy.h
(_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
(_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
(_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
smaller than input value rather than always greater. Preserve
_M_next_resize if called with 0 input. Use __builtin_floorl.
(_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
elements + number of insertions is greater than _M_next_resize. Start
with 11 buckets if not told otherwise. Use __builtin_floorl.
(_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
* src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
(_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
told otherwise. Use __builtin_floorl.
* testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
to also validate _Power2_rehash_policy.
* testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
Adapt.
From-SVN: r270868
GCC Administrator [Sat, 4 May 2019 00:16:16 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r270867
Ian Lance Taylor [Fri, 3 May 2019 21:45:35 +0000 (21:45 +0000)]
compiler: recognize and optimize array range clear
Recognize
for i := range a { a[i] = zero }
for array or slice a, and rewrite it to call memclr, as the gc
compiler does.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/169398
From-SVN: r270862
Jonathan Wakely [Fri, 3 May 2019 19:25:05 +0000 (20:25 +0100)]
Fix new testcase to not require std::copysign
Use __builtin_copysign{,f,l} when std::copysign isn't available.
PR libstdc++/61761
* testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
std::copysign.
From-SVN: r270859
Jonathan Wakely [Fri, 3 May 2019 19:13:31 +0000 (20:13 +0100)]
Avoid -Woverflow warning in __numeric_limits_integer
This is the same fix as was done for std::numeric_limits in r183905.
PR libstdc++/52119
* include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
overflow warning with -Wpedantic -Wsystem-headers.
From-SVN: r270858
Ian Lance Taylor [Fri, 3 May 2019 17:15:54 +0000 (17:15 +0000)]
os/user: disable TestGroupIds for AIX
The corresponding Go Toolchain patch is CL 164039
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/175079
From-SVN: r270857
Richard Earnshaw [Fri, 3 May 2019 13:45:59 +0000 (13:45 +0000)]
[arm] PR target/89400 fix thumb1 unaligned access expansion
Armv6 has support for unaligned accesses to memory. However, the
thumb1 code patterns were trying to use the 32-bit code constraints.
One failure mode from this was that the patterns are designed to be
compatible with conditional execution and this was then causing an
assert in the compiler.
The unaligned_loadhis pattern is only used for expanding extv, which
in turn is only enabled for systems supporting thumb2. Given that
there is no simple expansion for a thumb1 sign-extending load (the
instruction has no immediate offset form and requires two registers in
the address) it seems simpler to just disable this for thumb1.
Fixed thusly:
PR target/89400
* config/arm/arm.md (unaligned_loadsi): Add variant for thumb1.
Restrict 'all' variant to 32-bit configurations.
(unaligned_loadhiu): Likewise.
(unaligned_storehi): Likewise.
(unaligned_storesi): Likewise.
(unaligned_loadhis): Disable when compiling for thumb1.
From-SVN: r270853
Marc Glisse [Fri, 3 May 2019 13:41:36 +0000 (15:41 +0200)]
Let ldist ignore clobbers
2019-05-03 Marc Glisse <marc.glisse@inria.fr>
PR tree-optimization/90269
gcc/
* tree-loop-distribution.c (find_seed_stmts_for_distribution):
Ignore clobbers.
gcc/testsuite/
* g++.dg/tree-ssa/ldist-1.C: New file.
From-SVN: r270852
Martin Liska [Fri, 3 May 2019 12:37:22 +0000 (14:37 +0200)]
Come up with is_empty for hash_{table,map,set}.
2019-05-03 Martin Liska <mliska@suse.cz>
* hash-map.h: Add is_empty function.
* hash-set.h: Likewise.
* hash-table.h: Likewise.
* dwarf2out.c (dwarf2out_finish): Use is_empty instead of
elements () == 0 (and similar usages).
* gimple-ssa-store-merging.c (pass_store_merging::terminate_and_process_all_chains): Likewise.
* gimplify.c (gimplify_bind_expr): Likewise.
(gimplify_switch_expr): Likewise.
* hash-map-tests.c (test_map_of_strings_to_int): Likewise.
* ipa-icf.c (sem_item_optimizer::remove_symtab_node): Likewise.
* postreload-gcse.c (dump_hash_table): Likewise.
(gcse_after_reload_main): Likewise.
* predict.c (combine_predictions_for_bb): Likewise.
* tree-parloops.c (reduction_phi): Likewise.
(separate_decls_in_region): Likewise.
(transform_to_exit_first_loop): Likewise.
(gen_parallel_loop): Likewise.
(gather_scalar_reductions): Likewise.
(try_create_reduction_list): Likewise.
* var-tracking.c (dump_vars): Likewise.
(emit_notes_for_changes): Likewise.
(vt_emit_notes): Likewise.
2019-05-03 Martin Liska <mliska@suse.cz>
* call.c (build_aggr_conv): Use is_empty instead of
elements () == 0 (and similar usages).
* parser.c (cp_parser_lambda_introducer): Likewise.
From-SVN: r270851
Richard Biener [Fri, 3 May 2019 11:21:18 +0000 (11:21 +0000)]
re PR tree-optimization/90316 (large compile time increase in opt / alias stmt walking for Go example)
2019-05-03 Richard Biener <rguenther@suse.de>
PR tree-optimization/90316
* tree-ssa-pre.c (pass_pre::execute): Re-compute DOM fast queries
before running VN.
From-SVN: r270848
Richard Biener [Fri, 3 May 2019 10:47:21 +0000 (10:47 +0000)]
tree-vect-stmts.c (get_group_load_store_type): Avoid peeling for gaps by loading only lower halves of vectors if possible.
2019-05-03 Richard Biener <rguenther@suse.de>
* tree-vect-stmts.c (get_group_load_store_type): Avoid
peeling for gaps by loading only lower halves of vectors
if possible.
(vectorizable_load): Likewise.
* gcc.dg/vect/slp-reduc-sad-2.c: New testcase.
From-SVN: r270847
Richard Biener [Fri, 3 May 2019 10:46:13 +0000 (10:46 +0000)]
re PR tree-optimization/89518 (missed optimisation for array address calculations)
2019-05-03 Richard Biener <rguenther@suse.de>
PR middle-end/89518
* match.pd: Add pattern to optimize (A / B) * B + (A % B) to A.
* gcc.dg/pr89518.c: New testcase.
From-SVN: r270846
Richard Biener [Fri, 3 May 2019 10:44:17 +0000 (10:44 +0000)]
re PR tree-optimization/87314 (pointless comparison of malloc result to a string not eliminated)
2019-05-03 Richard Biener <rguenther@suse.de>
PR middle-end/87314
* match.pd (cmp (convert1?@2 addr@0) (convert2? addr@1)):
Handle STRING_CST vs DECL or STRING_CST.
* gcc.dg/pr87314-1.c: New testcase.
From-SVN: r270845
Richard Biener [Fri, 3 May 2019 10:39:56 +0000 (10:39 +0000)]
re PR middle-end/88963 (gcc generates terrible code for vectors of 64+ length which are not natively supported)
2019-05-03 Richard Biener <rguenther@suse.de>
PR tree-optimization/88963
* tree-ssa-forwprop.c (pass_forwprop::execute): Rewrite
vector loads feeding only BIT_FIELD_REFs to component
loads. Rewrite stores fed by CONSTRUCTORs to component
stores.
* gcc.dg/tree-ssa/ssa-fre-31.c: Disable forwprop.
* gcc.target/i386/pr88963-1.c: New testcase.
* gcc.target/i386/pr88963-2.c: Likewise.
From-SVN: r270844
Dominique d'Humieres [Fri, 3 May 2019 10:00:27 +0000 (12:00 +0200)]
re PR target/88809 (do not use rep-scasb for inline strlen/memchr)
2019-05-03 Dominique d'Humieres <dominiq@gcc.gnu.org>
PR target/88809
* gcc.target/i386/pr88809.c: Adjust for darwin.
* gcc.target/i386/pr88809-2.c: Adjust for i386 and darwin.
From-SVN: r270843
Jakub Jelinek [Fri, 3 May 2019 07:40:10 +0000 (09:40 +0200)]
* gennews (files): Add files for GCC 9.
From-SVN: r270837
Jakub Jelinek [Fri, 3 May 2019 07:33:04 +0000 (09:33 +0200)]
opts.h (finish_options): Remove lang_mask argument.
* opts.h (finish_options): Remove lang_mask argument.
(print_help, help_option_argument): Declare.
* opts.c (print_help): Remove forward declaration, no longer static.
(finish_options): Remove lang_mask argument, don't call print_help
here.
* opts-global.c (decode_options): Adjust finish_option caller, call
print_help here.
From-SVN: r270836
Jakub Jelinek [Fri, 3 May 2019 07:32:06 +0000 (09:32 +0200)]
re PR tree-optimization/90303 (ICE in hash_odr_name with fastcall attribute starting with r267359)
PR tree-optimization/90303
* ipa-devirt.c (obj_type_ref_class, get_odr_type): Don't use
TYPE_CANONICAL for TYPE_STRUCTURAL_EQUALITY_P types in !in_lto_p mode.
* g++.target/i386/pr90303.C: New test.
From-SVN: r270835
Jakub Jelinek [Fri, 3 May 2019 07:20:04 +0000 (09:20 +0200)]
Makefile.am (finclude): Remove.
* Makefile.am (finclude): Remove.
* Makefile.in: Regenerated.
From-SVN: r270834
Richard Biener [Fri, 3 May 2019 07:07:28 +0000 (07:07 +0000)]
re PR c++/89698 (Run-time error due to optimization of field access after cast at -Os/-O2 and higher)
2019-05-03 Richard Biener <rguenther@suse.de>
PR tree-optimization/89698
* gimple-fold.c (canonicalize_constructor_val): Early out
for constants, handle unfolded INTEGER_CSTs as they appear in
C++ virtual table ctors.
* g++.dg/tree-ssa/pr89698.C: New testcase.
From-SVN: r270833
Richard Biener [Fri, 3 May 2019 07:05:34 +0000 (07:05 +0000)]
passes.c (execute_function_todo): Remove dead code.
2019-05-03 Richard Biener <rguenther@suse.de>
* passes.c (execute_function_todo): Remove dead code.
From-SVN: r270832
GCC Administrator [Fri, 3 May 2019 00:16:20 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r270831
Jonathan Wakely [Thu, 2 May 2019 21:23:38 +0000 (22:23 +0100)]
PR libstdc++/90314 fix non-equivalent declarations of std::swap
In order to use the _GLIBCXX_NOEXCEPT_IF macro for an expression
containing commas I enclosed it in parentheses, so the preprocessor
wouldn't treat it as two arguments to the function-like macro. Clang
gives an error because now the noexcept-specifier noexcept((C)) is not
equivalent to the noexcept(C) one on the declaration of swap in
<type_traits>.
Instead of requiring extra parentheses around the expression, redefine
_GLIBCXX_NOEXCEPT_IF as a variadic macro (even though supporting that in
C++98 is a GNU extension).
PR libstdc++/90314
* include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
* include/bits/move.h (swap): Remove extra parentheses.
From-SVN: r270827
Jonathan Wakely [Thu, 2 May 2019 21:23:35 +0000 (22:23 +0100)]
Remove redundant __constexpr_addressof function
The std::__addressof function is always constexpr, even in C++14, so we
can just use that.
* include/experimental/bits/lfts_config.h: Improve doc markup.
* include/experimental/optional: Improve docs.
(_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
(__constexpr_addressof): Remove.
(optional::operator->()): Use std::__addressof().
* include/std/optional (optional::operator->()): Adjust whitespace.
* testsuite/experimental/optional/constexpr/observers/2.cc: Check
that operator-> is still constexpr with overloaded operator&. Change
to compile-only test.
* testsuite/experimental/optional/constexpr/observers/3.cc: Change to
compile-only test.
From-SVN: r270826
Jonathan Wakely [Thu, 2 May 2019 21:23:25 +0000 (22:23 +0100)]
Improve smart pointer docs
* include/bits/shared_ptr.h: Improve docs.
* include/bits/shared_ptr_atomic.h: Likewise.
* include/bits/unique_ptr.h: Likewise. Adjust whitespace.
From-SVN: r270825
Joseph Myers [Thu, 2 May 2019 20:30:14 +0000 (21:30 +0100)]
* gcc.pot: Regenerate.
From-SVN: r270822
Segher Boessenkool [Thu, 2 May 2019 18:46:38 +0000 (20:46 +0200)]
rs6000: Make debug regnums independent of internal ones
Where we use "internal GCC register numbers" in debug info, that
defines an ABI, so we cannot change those numbers. But we want to
change the internal numbers, and sometimes we do that without
remembering this gotcha anyway; so let's make everything independent
of the internal numbers.
For those registers that are not recognised here (we still have MQ for
example, but also the GCC-internal frame pointer and arg pointer
registers), this just returns the internal register number. This is a
bit worrying: that number could be the same as that for a register we
validly want to have in debug info. I first had a gcc_unreachable ()
for that, but this does now work because dwarf2cfi calls
rs6000_dbx_register_number for every internal register. Then I just
returned 0 for the internal regs, but that causes various regression
tests to fail. So now I return the internal register number again,
as it was before; but this needs to be fixed.
* config/rs6000/rs6000.c (rs6000_dbx_register_number): Do not use
the internal register number, for any "real" register.
From-SVN: r270820
Segher Boessenkool [Thu, 2 May 2019 18:45:22 +0000 (20:45 +0200)]
rs6000: Debug regnums for TM registers
Since GCC 8, we have output incorrect numbers for the transactional
memory registers.
Also, we didn't output the correct DWARF register numbers for those.
The number for sprN is 100+N.
This fixes both these issues.
* config/rs6000/rs6000.c (rs6000_dbx_register_number): Return the
correct numbers for TFHAR, TFIAR, TEXASR.
From-SVN: r270819
Maciej W. Rozycki [Thu, 2 May 2019 17:03:25 +0000 (17:03 +0000)]
libphobos: Correct my identity in the last ChangeLog entry
From-SVN: r270817
Maciej W. Rozycki [Thu, 2 May 2019 16:38:08 +0000 (16:38 +0000)]
libphobos: RISC-V: Fix soft-float build errors with IEEE exception flags
Fix assembly errors:
.../libphobos/src/std/math.d: Assembler messages:.../libphobos/src/std/math.d:4773: Error: unrecognized opcode `frflags a0'.../libphobos/src/std/math.d:4856: Error: unrecognized opcode `fsflags a5'.../libphobos/src/std/math.d:4856: Error: unrecognized opcode `fsflags a5'.../libphobos/src/std/math.d:4773: Error: unrecognized opcode `frflags a0'.../libphobos/src/std/math.d:5549: Error: unrecognized opcode `fscsr a5'.../libphobos/src/std/math.d:5456: Error: unrecognized opcode `frcsr a5'.../libphobos/src/std/math.d:5456: Error: unrecognized opcode `frcsr a5'.../libphobos/src/std/math.d:5549: Error: unrecognized opcode `fscsr a5'.../libphobos/src/std/math.d:5456: Error: unrecognized opcode `frcsr a5'.../libphobos/src/std/math.d:5549: Error: unrecognized opcode `fscsr a0'.../libphobos/src/std/math.d:5456: Error: unrecognized opcode `frcsr a0'.../libphobos/src/std/math.d:5456: Error: unrecognized opcode `frcsr a0'.../libphobos/src/std/math.d:5549: Error: unrecognized opcode `fscsr s2'make[8]: *** [Makefile:1119: std/math.lo] Error 1
triggered with the RISC-V lp64 multilib in a GCC build configured with
`--enable-multilib --enable-languages=all --target=riscv64-linux-gnu'.
This is due to unconditional explicit use of F extension instructions
within inline assembly, to access IEEE exception flags. The use of
these instructions is not allowed when building for a soft-float ABI.
Correct the problem by wrapping said inline assembly into a conditional
such that if `D_SoftFloat' is true, then reads from IEEE exception flags
return 0 and writes are ignored instead, complementing r270522
("libphobos: Add D support for RISC-V Linux"), which is an updated
version of <https://gcc.gnu.org/ml/gcc-patches/2019-04/msg00325.html>,
where the problematic code has originated from.
libphobos/ChangeLog:
2019-05-02 Maciej W. Rozycki <macro@wdc.com>
* std/math.d (IeeeFlags.getIeeeFlags): Handle RISC-V soft-float ABI.
(IeeeFlags.resetIeeeFlags): Likewise.
(FloatingPointControl.getControlState): Likewise.
(FloatingPointControl.setControlState): Likewise.
From-SVN: r270815