This testcase in the PR is extremely recursive, and therefore uses a huge
amount of memory on caching the results of individual calls. We no longer
need to track all calls to catch infinite recursion, as we have other limits
on maximum depth and operations count. So let's only cache a few calls at
the top level: 8 seems to be a reasonable compromise.
gcc/c-family/
* c.opt (fconstexpr-loop-limit): New.
gcc/cp/
* constexpr.c (push_cx_call_context): Return depth.
(cxx_eval_call_expression): Don't cache past constexpr_cache_depth.
From-SVN: r272765
PR tree-optimization/91010
* tree-vect-stmts.c (scan_operand_equal_p): If offset1 == offset2,
return true. Otherwise, don't call operand_equal_p if offset1 or
offset2 is NULL and just return false.
* g++.dg/vect/simd-10.cc: New test.
From-SVN: r272763
The default for the kernel is soft-float, however a user writing a kernel
extension might want to make use of hard float. This change makes
" -mkernel -mhard-float " work as expected.
2019-06-27 Iain Sandoe <iain@sandoe.co.uk>
* config/rs6000/rs6000.c (darwin_rs6000_override_options): Honour
user-specified float mode choice for kernel mode code.
From-SVN: r272760
A recent merge dropped whitespace in the endfile specs, which affects
transactional memory cases.
2019-06-27 Iain Sandoe <iain@sandoe.co.uk>
* config/rs6000/darwin.h (ENDFILE_SPEC): Correct whitespace in the
spec.
From-SVN: r272759
The linker [ld64] that supports 64Bit does not need the JBSR longcall
optimisation, and will not work with the most generic case (where the
symbol is undefined external, but there is no symbl stub). So switch
the longcall option off. ld64 will generate branch islands as needed.
2019-06-27 Iain Sandoe <iain@sandoe.co.uk>
* config/rs6000/rs6000.c (darwin_rs6000_override_options): Do not
use longcall for 64b code.
From-SVN: r272758
2019-06-27 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/90987
* match.c (gfc_match_common): Adjust parsing of fixed and free form
source code containing, e.g., COMMONI.
2019-06-27 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/90987
* gfortran.dg/common_1.f: new test.
* gfortran.dg/common_26.f90: Ditto.
From-SVN: r272756
* class.c (layout_class_type): Set TYPE_CXX_ODR_P for as-base
type copy.
* ipa-devirt.c (odr_type_d): Add tbaa_enabled flag.
(add_type_duplicate): When odr hash is not allocated, to nothing.
(odr_based_tbaa_p): New function.
(set_type_canonical_for_odr_type): New function.
* ipa-utils.h (enable_odr_based_tbaa, odr_based_tbaa_p,
set_type_canonical_for_odr_type): New.
* tree.c (gimple_canonical_types_compatible_p): ODR types with
ODR based TBAA are not equivalent to non-ODR types.
* lto-common.c: Include demangle.h and tree-pretty-print.h
(type_streaming_finished): New static var.
(gimple_register_canonical_type_1): Return updated hash; handle ODR
types.
(iterative_hash_canonical_type): Update use of
gimple_register_canonical_type_1.
* g++.dg/lto/alias-2_0.C: New testcase.
* g++.dg/lto/alias-2_1.C: New testcase.
From-SVN: r272749
PR target/90991
* config/i386/sse.md (avx_vec_concat<mode>): Use nonimmediate_operand
instead of register_operand for operands[1], add m to its constraints
if operands[2] uses "C" constraint. Ensure in condition that if
operands[2] is not 0, then operands[1] is not a MEM. For last two
alternatives, use unaligned loads instead of aligned if operands[1] is
misaligned_operand.
* gcc.target/i386/avx2-pr90991-1.c: New test.
* gcc.target/i386/avx512dq-pr90991-2.c: New test.
From-SVN: r272745
SSE2 is the required prereq of the builtins; as x86-64 has SSE2 enabled
anyway, the test failure was noticable on 32-bit builds only.
From-SVN: r272743
When I refactored the filesystem_error code I changed it to only use the
constructor parameter in the what() string, instead of the string
returned by system_error::what(). That meant it no longer included the
description of the error_code that system_error adds. This restores the
previous behaivour, as encouraged by the standard ("Implementations
should include the system_error::what() string and the pathnames of
path1 and path2 in the native format in the returned string").
PR libstdc++/91012
* src/c++17/fs_path.cc (filesystem_error::_Impl): Use a string_view
for the what_arg parameters.
(filesystem_error::filesystem_error): Pass system_error::what() to
the _Impl constructor.
* testsuite/27_io/filesystem/filesystem_error/cons.cc: Ensure that
filesystem_error::what() contains system_error::what().
From-SVN: r272739
2019-06-27 Martin Liska <mliska@suse.cz>
PR tree-optimization/91014
* tree-ssa-dse.c (initialize_ao_ref_for_dse): Bail out
when LHS is NULL_TREE.
2019-06-27 Martin Liska <mliska@suse.cz>
PR tree-optimization/91014
* gcc.target/s390/pr91014.c: New test.
From-SVN: r272738
2019-06-27 Martin Liska <mliska@suse.cz>
* symbol-summary.h (traverse): Pass
argument a to the call of callback.
(gt_ggc_mx): Mark arguments as unused.
(gt_pch_nx): Likewise.
From-SVN: r272734
This type isn't used anywhere yet, but will be needed for the
floating-point overloads of to_chars and from_chars.
* include/std/charconv (chars_format): Define bitmask type.
* testsuite/20_util/to_chars/chars_format.cc: New test.
From-SVN: r272718
PR tree-optimization/90883
* tree-ssa-alias.c (stmt_kills_ref_p): Handle BUILT_IN_CALLOC.
* tree-ssa-dse.c: Update various comments to distinguish between
dead and redundant stores.
(initialize_ao_ref_for_dse): Handle BUILT_IN_CALLOC.
(dse_optimize_redundant_stores): New function.
(delete_dead_or_redundant_call): Renamed from delete_dead_call.
Distinguish between dead and redundant calls in dump output. All
callers updated.
(delete_dead_or_redundant_assignment): Similarly for assignments.
(dse_optimize_stmt): Handle _CHK variants. For statements which
store 0 into multiple memory locations, try to prove a subsequent
store is redundant.
PR tree-optimization/90883
* g++.dg/tree-ssa/pr90883.C: New test.
* gcc.dg/tree-ssa/ssa-dse-36.c: New test.
From-SVN: r272717
To fix this we need to make the branch islands (or code) visible between
both files. This keeps the generation side in rs6000.c and moves the
output routine to rs6000-logue.c, placing a reference to the islands
vector in rs6000-internal.h.
2019-06-26 Iain Sandoe <iain@sandoe.co.uk>
* config/rs6000/rs6000-internal.h (branch_island): New typedef.
(branch_islands): New extern.
* config/rs6000/rs6000-logue.c (macho_branch_islands): Moved from
* config/rs6000/rs6000.c: .. here.
From-SVN: r272710
The new gt-rs6000-logue.h is common to all sub-targets in the port, so
it needs to be added for them.
It seems better to place the common target_gtfiles in the powerpc*-*-*
section, rather than duplicating them in sub-targets. This would make it
less likely that a sub-target would be overlooked in any future file
introductions.
2019-06-26 Iain Sandoe <iain@sandoe.co.uk>
* config.gcc (powerpc*-*-linux*): Move target_gtfiles from here..
(powerpc*-*-*) ... to here.
From-SVN: r272708
Reuse the __is_one_of alias in additional places, and define traits to
check for signed/unsigned integer types so we don't have to duplicate
those checks elsewhere.
The additional overloads for std::byte in <bit> were reviewed by LEWG
and considered undesirable, so this patch removes them.
* include/bits/fs_path.h (path::__is_encoded_char): Use __is_one_of.
* include/std/bit (_If_is_unsigned_integer_type): Remove.
(_If_is_unsigned_integer): Use __is_unsigned_integer.
(rotl(byte, unsigned), rotr(byte, unsigned), countl_zero(byte))
(countl_one(byte), countr_zero(byte), countr_one(byte))
(popcount(byte), ispow2(byte), ceil2(byte), floor2(byte))
(log2p1(byte)): Remove.
* include/std/charconv (__detail::__is_one_of): Move to <type_traits>.
(__detail::__is_int_to_chars_type): Remove.
(__detail::__integer_to_chars_result_type): Use __is_signed_integer
and __is_unsigned_integer.
* include/std/type_traits (__is_one_of): Move here from <charconv>.
(__is_signed_integer, __is_unsigned_integer): New helpers.
* testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Remove test for
std::byte overload.
* testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
* testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
* testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
* testsuite/26_numerics/bit/bitops.count/countl_one.cc: Likewise.
* testsuite/26_numerics/bit/bitops.count/countl_zero.cc: Likewise.
* testsuite/26_numerics/bit/bitops.count/countr_one.cc: Likewise.
* testsuite/26_numerics/bit/bitops.count/countr_zero.cc: Likewise.
* testsuite/26_numerics/bit/bitops.count/popcount.cc: Likewise.
* testsuite/26_numerics/bit/bitops.rot/rotl.cc: Likewise.
* testsuite/26_numerics/bit/bitops.rot/rotr.cc: Likewise.
From-SVN: r272695
A large portion of the code moved from rs6000.c (to rs6000-logue.c)
was accidentally retained. This fixes it.
* rs6000.c: Fix previous commit, it missed some changes.
From-SVN: r272690
PR target/90991
* config/i386/sse.md
(*<extract_type>_vinsert<shuffletype><extract_suf>_0): Use vmovupd,
vmovups, vmovdqu, vmovdqu32 or vmovdqu64 instead of the aligned
insns if operands[2] is misaligned_operand.
* gcc.target/i386/avx512dq-pr90991-1.c: New test.
From-SVN: r272674
From PowerPC ISA3.0, the description of `maddld RT, RA.RB, RC` is as follows:
64-bit RA and RB are multiplied and then the RC is signed extend to 128 bits,
and add them together.
We only apply it to 64-bit mode (DI) when implementing maddld. However, if we
can guarantee that the result of the maddld operation will be limited to 32-bit
mode (SI), we can still apply it to 32-bit mode (SI).
gcc/ChangeLog
2019-06-26 Li Jia He <helijia@linux.ibm.com>
* config/rs6000/rs6000.h (TARGET_MADDLD): Remove the restriction of
TARGET_POWERPC64.
* config/rs6000/rs6000.md (maddld): Change maddld match_operand from DI
to GPR.
gcc/testsuite/ChangeLog
2019-06-26 Li Jia He <helijia@linux.ibm.com>
* gcc.target/powerpc/maddld-1.c: New testcase.
From-SVN: r272673
2019-06-26 Martin Liska <mliska@suse.cz>
PR tree-optimization/90973
* tree-vect-loop.c (vect_get_known_peeling_cost): Use
epilogue_cost_vec instead of prologue_cost_vec for
a epilogue cost.
From-SVN: r272671
2019-06-26 Martin Liska <mliska@suse.cz>
* bb-reorder.c (connect_better_edge_p): Add missing else
statement in the middle of if-else statements.
/home/marxin/Programming/gcc/gcc/bb-reorder.c:1031:2: warning: Value stored to 'is_better_edge' is never read
is_better_edge = true;
^ ~~~~
/home/marxin/Programming/gcc/gcc/bb-reorder.c:1034:2: warning: Value stored to 'is_better_edge' is never read
is_better_edge = false;
^ ~~~~~
From-SVN: r272670