- 25 Jul, 2018 15 commits
-
-
gcc/po: * gcc.pot: Regenerate. libcpp/po: * cpplib.pot: Regenerate. From-SVN: r262972
Joseph Myers committed -
Improve selection of short instruction for fp-moves. gcc/ 2018-05-17 Claudiu Zissulescu <claziss@synopsys.com> * config/arc/arc.md (movsf_insn): Add short instruction selection. * config/arc/constraints.md (CfZ): New constraint. * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint. (subsf3_fpu): Likewise. (cmpsf_fpu): Likewise. (cmpsf_fpu_uneq): Likewise. From-SVN: r262971
Claudiu Zissulescu committed -
gcc/ 2018-05-09 Claudiu Zissulescu <claziss@synopsys.com> * config/arc/arc.c (compact_memory_operand_p): Check for uncached accesses as well. (arc_is_uncached_mem_p): uncached applies to both the variable and the pointer. testsuite/ 2018-05-09 Claudiu Zissulescu <claziss@synopsys.com> * gcc.target/arc/uncached-1.c: New test. * gcc.target/arc/uncached-2.c: Likewise. From-SVN: r262970
Claudiu Zissulescu committed -
gcc/ Claudiu Zissulescu <claziss@synopsys.com> * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional register names. From-SVN: r262969
Claudiu Zissulescu committed -
gcc/ChangeLog: * optinfo-emit-json.cc (class optrecord_json_writer): Convert field "m_scopes" from vec to auto_vec. From-SVN: r262967
David Malcolm committed -
2018-07-25 Martin Liska <mliska@suse.cz> * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix return type. From-SVN: r262966
Martin Liska committed -
2018-07-25 Richard Biener <rguenther@suse.de> PR debug/86654 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions special wrt context_die late. (gen_subprogram_die): Re-use DIEs in local scope. From-SVN: r262965
Richard Biener committed -
* acinclude.m4 (glibcxx_SUBDIRS): Add src/c++17. * src/Makefile.am: Add comment. * src/c++17/Makefile.in: Regenerate. From-SVN: r262964
Jonathan Wakely committed -
This will allow std::mutex and std::lock_guard to be used elsewhere in the library without pulling in the whole of <chrono>. Previously the whole of <bits/std_mutex.h> was conditional on the _GLIBCXX_USE_C99_STDINT_TR1 macro, but only the std::unique_lock members that use <chrono> facilities should depend on that. std::mutex only needs to depend on _GLIBCXX_HAS_GTHREADS and std::lock_guard can be defined unconditionally. Some parts of <bits/std_mutex.h> and <mutex> are based on code in <ext/concurrence.h> which dates from 2003. However, the std::unique_lock implementation was added in 2008 by r135007, without using any earlier code. Therefore the new header file has copyright years 2008-2018. * include/Makefile.am: Add new <bits/unique_lock.h> header. * include/Makefile.in: Regenerate. * include/bits/std_mutex.h [!_GLIBCXX_USE_C99_STDINT_TR1] (mutex) (lock_guard): Define independent of _GLIBCXX_USE_C99_STDINT_TR1. (unique_lock): Move definition to ... * include/bits/unique_lock.h: New header. [!_GLIBCXX_USE_C99_STDINT_TR1] (unique_lock): Define unconditionally. [_GLIBCXX_USE_C99_STDINT_TR1] (unique_lock(mutex_type&, time_point)) (unique_lock(mutex_type&, duration), unique_lock::try_lock_until) (unique_lock::try_lock_for): Define only when <chrono> is usable. * include/std/condition_variable: Include <bits/unique_lock.h>. * include/std/mutex: Likewise. From-SVN: r262963
Jonathan Wakely committed -
From-SVN: r262962
Richard Sandiford committed -
This PR shows a pathological case in which we try SLP vectorisation on dead code. We record that 0 bits of the result are enough to satisfy all users (which is true), and that led to precision being 0 in: static unsigned int vect_element_precision (unsigned int precision) { precision = 1 << ceil_log2 (precision); return MAX (precision, BITS_PER_UNIT); } ceil_log2 (0) returned 64 rather than 0, leading to 1 << 64, which is UB. 2018-07-25 Richard Sandiford <richard.sandiford@arm.com> gcc/ * hwint.c (ceil_log2): Fix comment. Return 0 for 0. From-SVN: r262961
Richard Sandiford committed -
2018-07-25 Martin Liska <mliska@suse.cz> PR middle-end/86645 * dumpfile.c: And excluded values with TDF_ALL_VALUES. * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES. From-SVN: r262960
Martin Liska committed -
2018-07-25 Martin Liska <mliska@suse.cz> PR sanitizer/79635 * params.def: Explain ASan abbreviation and provide a documentation link. From-SVN: r262959
Martin Liska committed -
PR tree-optimization/86622 - incorrect strlen of array of array plus variable offset PR tree-optimization/86532 - Wrong code due to a wrong strlen folding starting with r262522 gcc/ChangeLog: PR tree-optimization/86622 PR tree-optimization/86532 * builtins.h (string_length): Declare. * builtins.c (c_strlen): Correct handling of non-constant offsets. (check_access): Be prepared for non-constant length ranges. (string_length): Make extern. * expr.c (string_constant): Only handle the minor non-constant array index. Use string_constant to compute the length of a generic string constant. gcc/testsuite/ChangeLog: PR tree-optimization/86622 PR tree-optimization/86532 * gcc.c-torture/execute/strlen-2.c: New test. * gcc.c-torture/execute/strlen-3.c: New test. * gcc.c-torture/execute/strlen-4.c: New test. From-SVN: r262958
Martin Sebor committed -
From-SVN: r262957
GCC Administrator committed
-
- 24 Jul, 2018 13 commits
-
-
This is missing the synchronized_pool_resource and unsynchronized_pool_resource classes but is otherwise complete. This is a new implementation, not based on the existing code in <experimental/memory_resource>, but memory_resource and polymorphic_allocator ended up looking almost the same anyway. The constant_init kluge in src/c++17/memory_resource.cc is apparently due to Richard Smith and ensures that the objects are constructed during constant initialiation phase and not destroyed (because the constant_init destructor doesn't destroy the union member and the storage is not reused). * config/abi/pre/gnu.ver: Export new symbols. * configure: Regenerate. * include/Makefile.am: Add new <memory_resource> header. * include/Makefile.in: Regenerate. * include/precompiled/stdc++.h: Include <memory_resource> for C++17. * include/std/memory_resource: New header. (memory_resource, polymorphic_allocator, new_delete_resource) (null_memory_resource, set_default_resource, get_default_resource) (pool_options, monotonic_buffer_resource): Define. * src/Makefile.am: Add c++17 directory. * src/Makefile.in: Regenerate. * src/c++11/Makefile.am: Fix comment. * src/c++17/Makefile.am: Add makefile for new sub-directory. * src/c++17/Makefile.in: Generate. * src/c++17/memory_resource.cc: New. (newdel_res_t, null_res_t, constant_init, newdel_res, null_res) (default_res, new_delete_resource, null_memory_resource) (set_default_resource, get_default_resource): Define. * testsuite/20_util/memory_resource/1.cc: New test. * testsuite/20_util/memory_resource/2.cc: New test. * testsuite/20_util/monotonic_buffer_resource/1.cc: New test. * testsuite/20_util/monotonic_buffer_resource/allocate.cc: New test. * testsuite/20_util/monotonic_buffer_resource/deallocate.cc: New test. * testsuite/20_util/monotonic_buffer_resource/release.cc: New test. * testsuite/20_util/monotonic_buffer_resource/upstream_resource.cc: New test. * testsuite/20_util/polymorphic_allocator/1.cc: New test. * testsuite/20_util/polymorphic_allocator/resource.cc: New test. * testsuite/20_util/polymorphic_allocator/select.cc: New test. * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource): Define concrete memory resource for testing. (__gnu_test::default_resource_mgr): Define RAII helper for changing default resource. From-SVN: r262953
Jonathan Wakely committed -
An output iterator passed as the unused first argument to __niter_wrap might have already been invalidated, so don't copy it. PR libstdc++/86658 * include/bits/stl_algobase.h (__niter_wrap<_Iterator>): Pass unused parameter by reference, to avoid copying invalid iterators. * testsuite/25_algorithms/copy/86658.cc: New test. From-SVN: r262952
Jonathan Wakely committed -
r262589 introduced another instance of the bug fixed in r258131. 2018-07-23 Richard Sandiford <richard.sandiford@arm.com> gcc/ PR tree-optimization/86618 * tree-vect-stmts.c (vectorizable_call): Don't take the address of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null. From-SVN: r262951
Richard Sandiford committed -
There are various ways that it's possible for a gimple statement to have an UNKNOWN_LOCATION, and for that UNKNOWN_LOCATION to be wrapped in an ad-hoc location to capture inlining information. For such a location, LOCATION_FILE (loc) is NULL. Various places in -fsave-optimization-record were checking for loc != UNKNOWN_LOCATION and were passing LOCATION_FILE (loc) to code that assumed a non-NULL filename, thus leading to segfaults for the above cases. This patch updates the tests to use LOCATION_LOCUS (loc) != UNKNOWN_LOCATION instead, to look through ad-hoc location wrappers, fixing the segfaults. It also adds various assertions to the affected code. gcc/ChangeLog: PR tree-optimization/86636 * json.cc (json::object::set): Fix comment. Add assertions. (json::array::append): Move here from json.h. Add comment and an assertion. (json::string::string): Likewise. * json.h (json::array::append): Move to json.cc. (json::string::string): Likewise. * optinfo-emit-json.cc (optrecord_json_writer::impl_location_to_json): Assert that we aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc wrapper around it. Expand the location once, rather than three times. (optrecord_json_writer::inlining_chain_to_json): Fix the check for UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc wrappers. (optrecord_json_writer::optinfo_to_json): Likewise, in four places. Fix some overlong lines. gcc/testsuite/ChangeLog: PR tree-optimization/86636 * gcc.c-torture/compile/pr86636.c: New test. From-SVN: r262950
David Malcolm committed -
Committed on behalf of matthew.malcomson@arm.com 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com> * config/aarch64/aarch64-simd.md (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into... (aarch64_<ANY_EXTEND:su>subw<mode>): ... This... (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this. (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into... (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This... (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this. (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into... (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This... (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this. * gcc.target/aarch64/vect-su-add-sub.c: New. From-SVN: r262949
Matthew Malcomson committed -
PR middle-end/86627 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT and abs_d == d, do the power of two handling if profitable. * gcc.target/i386/pr86627.c: New test. From-SVN: r262948
Jakub Jelinek committed -
* include/std/bit (__countl_zero, __countr_zero, __popcount): Use local variables for number of digits instead of type aliases. (__log2p1): Remove redundant branch also checked in __countl_zero. From-SVN: r262947
Jonathan Wakely committed -
2018-07-24 Richard Biener <rguenther@suse.de> * match.pd: Add BIT_FIELD_REF canonicalizations. From-SVN: r262946
Richard Biener committed -
The erased_type condition is only true for code using the Library Fundamentals TS, so assume it's less common and only check it after checking for convertibility. This does mean for types using erased_type the more expensive convertibility check is done first, but such types are rare. * include/bits/uses_allocator.h (__is_erased_or_convertible): Reorder conditions. Add comments. * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error line. * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise. * testsuite/20_util/scoped_allocator/69293_neg.cc: Likewise. From-SVN: r262945
Jonathan Wakely committed -
By making the memory_resource base class a template parameter the __resource_adaptor_imp can be used to adapt an allocator into a std::pmr::memory_resource instead of experimental::pmr::memory_resource. * include/experimental/memory_resource: Adjust comments and whitespace. (__resource_adaptor_imp): Add second template parameter for type of memory resource base class. (memory_resource): Define default constructor, destructor, copy constructor and copy assignment operator as defaulted. From-SVN: r262944
Jonathan Wakely committed -
PR libstdc++/70966 * include/experimental/memory_resource (__get_default_resource): Use placement new to create an object with dynamic storage duration. From-SVN: r262943
Jonathan Wakely committed -
PR testsuite/86649 * g++.dg/tree-ssa-/pr19476-1.C: Check dom2 dump instead of ccp1. * g++.dg/tree-ssa-/pr19476-5.C: Likewise. * g++.dg/tree-ssa-/pr19476-6.C: New test. * g++.dg/tree-ssa-/pr19476-7.C: New test. From-SVN: r262942
Jakub Jelinek committed -
From-SVN: r262940
GCC Administrator committed
-
- 23 Jul, 2018 10 commits
-
-
* inclhack.def (aix_unistd): New. * fixincl.x: Regenerate. * tests/base/unistd.h [AIX_UNISTD_CHECK]: New test. From-SVN: r262936
David Edelsohn committed -
pmr::resource_adaptor can avoid allocating an oversized buffer and doing manual alignment within that buffer when the wrapped allocator is known to always meet the requested alignment. Specifically, if the allocator is known to use malloc or new directly, then we can call the allocator directly for any fundamental alignment. PR libstdc++/70940 * include/experimental/memory_resource (__resource_adaptor_common::_AlignMgr::_M_unadjust): Add assertion. (__resource_adaptor_common::__guaranteed_alignment): New helper to give maximum alignment an allocator guarantees. Specialize for known allocators using new and malloc. (__resource_adaptor_imp::do_allocate): Use __guaranteed_alignment. (__resource_adaptor_imp::do_deallocate): Likewise. * testsuite/experimental/memory_resource/new_delete_resource.cc: Check that new and delete are called with expected sizes. From-SVN: r262935
Jonathan Wakely committed -
gcc/testsuite/ChangeLog: 2018-07-23 Carl Love <cel@us.ibm.com> PR 86591 * gcc.target/powerpc/altivec-1-runnable.c: Move vector double tests to file altivec-2-runnable.c. * gcc.target/powerpc/altivec-2-runnable.c: Add vector double tests. * gcc.target/powerpc/buitlins-1.c: Remove dg-final check for xxlor. Update dg-final test for __divdi3 and __udivdi3 instructions. Update comments for instruction generated by vec_mergeh, vec_perm, vec_round, vec_cts, vec_ctu, vec_cpsgn tests. From-SVN: r262934
Carl Love committed -
gcc: 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de> PR c/86617 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values. testsuite: 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de> PR c/86617 * gcc.dg/pr86617.c: New test. From-SVN: r262933
Bernd Edlinger committed -
2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de> * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL terminated STRING_CST object. From-SVN: r262932
Bernd Edlinger committed -
hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf. From-SVN: r262931
Bernd Edlinger committed -
This changes vsx_init_v4si to be an expander. That way, no special cases are needed anymore for special arguments: the normal RTL passes can deal with it. * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust. * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete. * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force the elements into a register. (rs6000_split_v4si_init_di_reg): Delete. (rs6000_split_v4si_init): Delete. * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT. (vsx_init_v4si): Rewrite as a define_expand. From-SVN: r262930
Segher Boessenkool committed -
An rl<wd>imi instruction is often written like "(a << 8) | (b & 255)". If "b" now is a byte in memory, combine will combine the load with the masking (with 255 in the example), since that is a single instruction; and then the rl*imi isn't combined from the remaining pieces. This patch adds a splitter to make combine handle this case. * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the zero_extend argument from memory): New. From-SVN: r262929
Segher Boessenkool committed -
PR c++/86569 * cp-gimplify.c (cp_fold): Don't fold comparisons into other kind of expressions other than INTEGER_CST regardless of TREE_NO_WARNING or warn_nonnull_compare. * g++.dg/warn/Wnonnull-compare-9.C: New test. From-SVN: r262928
Jakub Jelinek committed -
From-SVN: r262927
GCC Administrator committed
-
- 22 Jul, 2018 2 commits
-
-
gcc/ChangeLog: * gcc/gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid diagnosing calls with unknown arguments unless -Walloca-larger-than is restricted to less than PTRDIFF_MAX bytes. From-SVN: r262923
Martin Sebor committed -
From-SVN: r262922
Gerald Pfeifer committed
-