- 03 May, 2019 20 commits
-
-
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
Ian Lance Taylor committed -
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 committed -
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
Jonathan Wakely committed -
The corresponding Go Toolchain patch is CL 164039 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/175079 From-SVN: r270857
Ian Lance Taylor committed -
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
Richard Earnshaw committed -
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
Marc Glisse committed -
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
Martin Liska committed -
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 committed -
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 committed -
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 committed -
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 committed -
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
Richard Biener committed -
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
Dominique d'Humieres committed -
From-SVN: r270837
Jakub Jelinek committed -
* 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 committed -
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 committed -
* Makefile.am (finclude): Remove. * Makefile.in: Regenerated. From-SVN: r270834
Jakub Jelinek committed -
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 committed -
2019-05-03 Richard Biener <rguenther@suse.de> * passes.c (execute_function_todo): Remove dead code. From-SVN: r270832
Richard Biener committed -
From-SVN: r270831
GCC Administrator committed
-
- 02 May, 2019 20 commits
-
-
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 committed -
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 committed -
* 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
Jonathan Wakely committed -
From-SVN: r270822
Joseph Myers committed -
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 committed -
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
Segher Boessenkool committed -
From-SVN: r270817
Maciej W. Rozycki committed -
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
Maciej W. Rozycki committed -
* include/bits/basic_string.h: Fix iterator/index confusion in Doxygen comments. * include/bits/range_access.h: Fix Doxygen warnings. * include/bits/refwrap.h: Do not document implementation details. (ref, cref): Group docs with reference_wrapper. * include/std/fstream: Fix Doxygen markup. * libsupc++/initializer_list (begin, end): Group docs with initializer_list. From-SVN: r270814
Jonathan Wakely committed -
* doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES. From-SVN: r270813
Jonathan Wakely committed -
* include/bits/unique_lock.h: Fix/improve doxygen markup. * include/std/mutex: Likewise. * include/std/shared_mutex: Likewise. From-SVN: r270812
Jonathan Wakely committed -
* include/bits/fs_dir.h: Fix/improve doxygen markup. * include/bits/fs_fwd.h: Likewise. * include/bits/fs_ops.h: Likewise. * include/bits/fs_path.h: Likewise. * include/std/filesystem: Likewise. From-SVN: r270811
Jonathan Wakely committed -
* include/experimental/bits/net.h: Fix/improve doxygen markup. * include/experimental/buffer: Likewise. * include/experimental/executor: Likewise. * include/experimental/internet: Likewise. * include/experimental/io_context: Likewise. * include/experimental/net: Likewise. * include/experimental/netfwd: Likewise. * include/experimental/socket: Likewise. * include/experimental/timer: Likewise. From-SVN: r270810
Jonathan Wakely committed -
* doc/doxygen/doxygroups.cc: Move description of experimental group here. * include/experimental/algorithm: Add to libfund-ts doc group. * include/experimental/any: Likewise. Do not document implementation details. * include/experimental/array: Add to libfund-ts doc group. * include/experimental/bits/lfts_config.h: Define libfund-ts doc group for Library Fundamentals. * include/experimental/chrono: Add to libfund-ts doc group. * include/experimental/deque: Likewise. * include/experimental/forward_list: Likewise. * include/experimental/functional: Likewise. * include/experimental/iterator: Likewise. * include/experimental/list: Likewise. * include/experimental/map: Likewise. * include/experimental/memory: Likewise. * include/experimental/memory_resource: Likewise. Improve docs. details. * include/experimental/numeric: Add to libfund-ts doc group. * include/experimental/optional: Likewise. * include/experimental/propagate_const: Likewise. * include/experimental/random: Likewise. * include/experimental/ratio: Likewise. * include/experimental/regex: Likewise. * include/experimental/set: Likewise. * include/experimental/source_location: Likewise. * include/experimental/string: Likewise. * include/experimental/string_view: Likewise. * include/experimental/system_error: Likewise. * include/experimental/tuple: Likewise. * include/experimental/type_traits: Likewise. * include/experimental/unordered_map: Likewise. * include/experimental/unordered_set: Likewise. * include/experimental/utility: Likewise. * include/experimental/vector: Likewise. * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error. * testsuite/experimental/array/neg.cc: Adjust dg-error. * testsuite/experimental/propagate_const/assignment/move_neg.cc: Likewise. * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise. * testsuite/experimental/propagate_const/requirements2.cc: Likewise. * testsuite/experimental/propagate_const/requirements3.cc: Likewise. * testsuite/experimental/propagate_const/requirements4.cc: Likewise. * testsuite/experimental/propagate_const/requirements5.cc: Likewise. From-SVN: r270809
Jonathan Wakely committed -
* include/experimental/bits/fs_dir.h: Fix Doxygen markup. * include/experimental/bits/fs_fwd.h: Improve docs. * include/experimental/bits/fs_ops.h: fix Doxygen markup. * include/experimental/bits/fs_path.h: Likewise. (path, filesystem_error, u8path): Improve docs. * include/experimental/filesystem: Link to docs for TS. From-SVN: r270808
Jonathan Wakely committed -
* config/allocator/new_allocator_base.h (__allocator_base): Add workaround for Doxygen bug #6945. * include/std/memory: Improve docs. Define group for pointer safety. * include/std/scoped_allocator: Improve docs. Use "undocumented" conditional to suppress documentation for implementation details. From-SVN: r270807
Jonathan Wakely committed -
This prevents "Mathematical Special Functions" appearing in the top-level menu of the generated HTML docs, and adds "TR1" to the title for the TR1 docs, to avoid duplicate titles. * include/bits/specfun.h: Improve docs. * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions and namespaces. From-SVN: r270806
Jonathan Wakely committed -
* doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs. (std::experimental): Add docs. * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11 namespace to nothing when generating docs. * include/bits/regex_constants.h (std::regex_constants): Improve docs. * include/std/chrono (std::chrono): Likewise. * include/std/functional (std::placeholders): Likewise. * include/std/thread (std::this_thread): Likewise. From-SVN: r270805
Jonathan Wakely committed -
* include/parallel/settings.h: Fix Doxygen markup. From-SVN: r270804
Jonathan Wakely committed -
Several of the pb_ds headers are intended to be included multiple times, within the definition of various class templates. The including files define macros like PB_DS_CLASS_C_DEC and PB_DS_GEN_POS before including these headers. In some cases the types defined in the headers are actually nested types within other classes, and so should not have been documented as though they are declared in the global namespace, as in: https://gcc.gnu.org/onlinedocs/gcc-8.3.0/libstdc++/api/a12028.html In other cases the headers provide inline member function definitions, but when processed by Doxygen the class name "PB_DS_CLASS_C_DEC" is not recognised. This patch makes Doxygen ignore definitions that only make sense when included in the right context with the right macros defined. * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define anything unless PB_DS_CLASS_C_DEC is defined. * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise. * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise. * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise. * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise. * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise. * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise. * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp: Likewise. * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise. * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise. * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise. * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise. * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise. * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise. * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise. * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise. * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise. * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise. * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp: Likewise. * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise. * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp: Likewise. * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp: Likewise. From-SVN: r270803
Jonathan Wakely committed
-