It's tiresome to have to look in insn-emit.c to see where some split
came from, so let's print that info to the dump file as well. But
don't print the full path, just the basename, for greater readability.
* genemit.c (gen_split): Print the filename and line number where the
splitter (or peephole2) was defined, to the dump file.
From-SVN: r275497
PR tree-optimization/91665
* tree-vect-loop.c (vectorizable_reduction): Punt if base has type
incompatible with the type of PHI result.
* gcc.dg/vect/pr91665.c: New test.
From-SVN: r275486
This re-enables -msave-restore for shared libraries, and uses the
t-slibgcc-libgcc file to get the save-restore routines included directly
in shared libraries so that we don't need to indirect through the PLT
to reach them, which doesn't work.
gcc/
* config/riscv/riscv.c (riscv_option_override): Revert 2019-08-30
change.
libgcc/
* config.host (riscv*-*-linux*): Add t-slibgcc-libgcc to tmake_file.
(riscv*-*-freebsd*): Likewise.
From-SVN: r275478
This isn't used since 2012. (It's a remnant of RIOS support).
* config/rs6000/rs6000.c (rs6000_rtx_costs) <case UNSPEC>: Delete.
* config/rs6000/rs6000.md (unspec): Delete UNSPEC_FRSP.
From-SVN: r275476
PR target/91654
* config/i386/x86-tune-costs.h (skylake_cost): Raise the
cost of SSE->integer and integer->SSE moves from 2 to 6.
(core_cost): Ditto.
From-SVN: r275475
2019-09-05 Caroline Tice <cmtice@google.com>
PR testsuite/91670
* g++.dg/ubsan/pr59415.C: Disable LTO, since test uses
-fvtable-verify, and the two options are no longer allowed
together.
From-SVN: r275460
The cmp_and and cmp_ior patterns were missing a couple of short-it
variants for thumb2, where the comparisons are all using registers
some of which were HI_REGS.
* config/arm/arm.md (cmp_and): Add short-it variant for thumb2 with
high regs.
(cmp_ior): Likewise.
From-SVN: r275453
Shifting by more than the size of a SUBREG_REG doesn't work, so we either
need to disable splits if an input is paradoxical, or else we need to
generate a clean temporary for intermediate results.
Jakub wrote the first version of this patch, so gets primary credit for it.
gcc/
PR target/91635
* config/riscv/riscv.md (zero_extendsidi2, zero_extendhi<GPR:mode>2,
extend<SHORT:mode><SUPERQI:mode>2): Don't split if
paradoxical_subreg_p (operands[0]).
(*lshrsi3_zero_extend_3+1, *lshrsi3_zero_extend_3+2): Add clobber and
use as intermediate value.
gcc/testsuite/
PR target/91635
* gcc.c-torture/execute/pr91635.c: New test.
* gcc.target/riscv/shift-shift-4.c: New test.
* gcc.target/riscv/shift-shift-5.c: New test.
Co-Authored-By: Jim Wilson <jimw@sifive.com>
From-SVN: r275444
* decl.c (start_decl): Call retrofit_lang_decl for constinit variables.
* pt.c (tsubst_expr): Pass LOOKUP_CONSTINIT down to cp_finish_decl for
constinit variables.
* g++.dg/cpp2a/constinit13.C: New test.
From-SVN: r275421
PR middle-end/91001
PR middle-end/91105
PR middle-end/91106
* calls.c (load_register_parameters): For TYPE_TRANSPARENT_AGGR
types, use type of their first field instead of type of
args[i].tree_value.
* gcc.c-torture/compile/pr91001.c: New test.
From-SVN: r275408
2019-09-05 Richard Biener <rguenther@suse.de>
PR middle-end/90501
* tree-inline.c (declare_return_variable): Mark the return
slot as addressable after building an address of it.
From-SVN: r275401
This patch uses the workaround Richi suggested in the PR: make
discover_nonconstant_array_refs mark the source of an IFN_LOAD_LANES
call and the destination of an IFN_STORE_LANES call as addressable,
so that they don't end up being REG rtxes during expansion.
I had to move the discover_nonconstant_array_refs call outside the
currently_expanding_to_rtl block since otherwise mark_addressable
just queues the decision for later.
2019-09-05 Richard Sandiford <richard.sandiford@arm.com>
gcc/
PR middle-end/91577
* cfgexpand.c (discover_nonconstant_array_refs): Force the source
of an IFN_LOAD_LANES call and the destination of an IFN_STORE_LANES
call to be in memory.
(pass_expand::execute): Call discover_nonconstant_array_refs before
setting currently_expanding_to_rtl.
gcc/testsuite/
PR middle-end/91577
* gfortran.dg/pr91577.f90: New test, taken from temporary_1.f90.
From-SVN: r275399
The URL for the "What Are Allocators Good For?" article has been a
recurring source of problems. It moved from the C/C++ Users Journal
website to the Dr Dobbs site after CUJ shut down, and the original
domain changed hands, leaving old links pointing to nefarious sites.
Now the URL to the copy on drdobbs.com no longer works either and I
can't find a (legal) copy of the article online. The simplest solution
is to remove the URL.
* doc/xml/manual/allocator.xml: Remove URL for bibliography entry.
* doc/html/*: Regenerate.
From-SVN: r275398
Currently, when a new thread needs to use the RANDOM_NUMBER intrinsic,
the per-thread PRNG state is initialized by copying the master state
and then jumping forwards N*2**128 entries in the stream so that the
PRNG streams for different threads don't alias each other, where N is
the number of threads that have so far initialized the PRNG.
With this patch the master state itself is jumped forwards once each
time a new thread initializes the PRNG, thus obviating the need to
jump through all the N-1 previous streams. Effectively turning an O(N)
algorithm into an O(1) one.
Regtested on x86_64-pc-linux-gnu.
libgfortran/ChangeLog:
2019-09-05 Janne Blomqvist <jb@gcc.gnu.org>
* intrinsics/random.c (master_init): Replace with
master_state.init.
(njumps): Remove variable.
(master_state): Make instance of struct prng_state.
(init_rand_state): When jumping, update the master_state once
instead of keeping track of how many jumps need to be done.
(SZU64): Modify to handle new master_state.
(SZ): Likewise.
(random_seed_i4): Likewise.
(random_seed_i8): Likewise.
From-SVN: r275397
2019-09-04 Steven G. Kargl <kargl@gcvc.gnu.org>
PR fortran/91650
* io.c (match_io_element): An output IO list item cannot be a BOZ.
2019-09-04 Steven G. Kargl <kargl@gcvc.gnu.org>
PR fortran/91650
* gfortran.dg/pr91650_1.f90: New test.
* gfortran.dg/pr91650_2.f90: Ditto.
From-SVN: r275391
The pthread_cond_clockwait function is available in glibc since the 2.30
release. If this function is available in the C library it can be used
to fix PR libstdc++/41861 by supporting std::chrono::steady_clock
properly with std::condition_variable.
This means that code using std::condition_variable::wait_for or
std::condition_variable::wait_until with std::chrono::steady_clock is no
longer subject to timing out early or potentially waiting for much
longer if the system clock is warped at an inopportune moment.
If pthread_cond_clockwait is available then std::chrono::steady_clock is
deemed to be the "best" clock available which means that it is used for
the relative wait_for calls and absolute wait_until calls using
user-defined clocks. Calls explicitly using std::chrono::system_clock
continue to use CLOCK_REALTIME via __gthread_cond_timedwait.
If pthread_cond_clockwait is not available then
std::chrono::system_clock is deemed to be the "best" clock available
which means that the previous suboptimal behaviour remains.
2019-09-04 Mike Crowe <mac@mcrowe.com>
PR libstdc++/41861
* acinclude.m4 (GLIBCXX_CHECK_PTHREAD_COND_CLOCKWAIT): Check for new
pthread_cond_clockwait function.
* configure.ac: Use GLIBCXX_CHECK_PTHREAD_COND_CLOCKWAIT.
* configure: Regenerate.
* config.h.in: Regenerate.
* include/std/condition_variable: (condition_variable): Rename
__steady_clock_t typedef and add system_clock. Change __clock_t to be
a typedef for the preferred clock to convert arbitrary other clocks to.
[_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT] (wait_until): Add a steady_clock
overload.
(wait_until): Change __clock_t overload to use system_clock.
[_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT] (__wait_until_impl): Add
steady_clock overload that calls pthread_cond_clockwait.
(__wait_until_impl): Change __clock_t overload to use system_clock.
(condition_variable_any) [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT]: Use
steady_clock for __clock_t if pthread_cond_clockwait is available.
From-SVN: r275390
2019-09-04 Mike Crowe <mac@mcrowe.com>
* testsuite/30_threads/condition_variable/members/2.cc (test01):
Parameterise so that test can be run against an arbitrary clock.
(main): Test using std::chrono::steady_clock and a user-defined
clock in addition to the previous std::chrono::system_clock.
* testsuite/30_threads/condition_variable_any/members/2.cc: Likewise.
From-SVN: r275389