- 07 Oct, 2019 9 commits
-
-
From-SVN: r276655
Aldy Hernandez committed -
From-SVN: r276654
Aldy Hernandez committed -
has one sub-range. From-SVN: r276653
Aldy Hernandez committed -
From-SVN: r276651
Mark Eggleston committed -
IRA's make_early_clobber_and_input_conflicts checks for cases in which an output operand is likely to be an earlyclobber and an input operand is unlikely to be tieable with it. If so, the allocno for the output conflicts with the allocno for the input. This seems to work well. However, a similar situation arises if an output operand is likely to be tied to one of a set of input operands X and if another input operand has a different value from all of the operands in X. E.g. if we have: 0: "=r, r" 1: "0, r" 2: "r, 0" 3: "r, r" operand 0 will always be tied to operand 1 or operand 2, so if operand 3 is different from them both, operand 0 acts like an earlyclobber as far as operand 3 (only) is concerned. The same is true for operand 2 in: 0: "=r" 1: "0" 2: "r" In the second example, we'd normally have a copy between operand 1 and operand 0 if operand 1 dies in the instruction, and so there's rarely a problem. But if operand 1 doesn't die in the instruction, operand 0 still acts as an earlyclobber for operand 2 (if different from operand 1), since in that case LRA must copy operand 1 to operand 0 before the instruction. As the existing comment says: Avoid introducing unnecessary conflicts by checking classes of the constraints and pseudos because otherwise significant code degradation is possible for some targets. I think that's doubly true here. E.g. it's perfectly reasonable to have constraints like: 0: "=r, r" 1: "0, r" 2: "r, r" on targets like s390 that have shorter instructions for tied operands, but that don't want the size difference to influence RA too much. We shouldn't treat operand 0 as earlyclobber wrt operand 2 in that case. This patch therefore treats a normal tied non-earlyclobber output as being effectively earlyclobber wrt to an input if it is so for *all* preferred alternatives. 2019-10-07 Richard Sandiford <richard.sandiford@arm.com> gcc/ * ira-lives.c (check_and_make_def_conflict): Handle cases in which DEF is not a true earlyclobber but is tied to a specific input operand, and so is effectively earlyclobber wrt inputs that have different values. (make_early_clobber_and_input_conflicts): Pass this case to the above. From-SVN: r276650
Richard Sandiford committed -
This patch adds CONSTEXPR to constructors and operators in machmode.h, excluding the controversial constexpr-resistant "() {}" constructors, which would become "= default" if we required C++11. Some of the other routines could potentially be constexpr too, but that can be done on an as-needed basis. 2019-10-07 Richard Sandiford <richard.sandiford@arm.com> gcc/ * machmode.h (opt_mode): Mark constructors with CONSTEXPR. (pod_mode): Mark operators likewise. (scalar_int_mode): Mark non-default constructors and operators with CONSTEXPR. (scalar_float_mode, scalar_mode, complex_mode): Likewise. (fixed_size_mode): Likewise. From-SVN: r276649
Richard Sandiford committed -
The problem in this PR was that vzeroupper has an effect on register contents, but those effects weren't modelled in the rtl pattern, which was just an unspec_volatile. This patch fixes that by running a subpass after vzeroupper insertion to add SETs and CLOBBERs as appropriate. See the comments in the patch for more details. 2019-10-07 Richard Sandiford <richard.sandiford@arm.com> gcc/ PR target/91994 * config/i386/sse.md (avx_vzeroupper): Turn into a define_expand and wrap the unspec_volatile in a parallel. (*avx_vzeroupper): New define_insn. Use a match_parallel around the unspec_volatile. * config/i386/predicates.md (vzeroupper_pattern): Expect the unspec_volatile to be wrapped in a parallel. * config/i386/i386-features.c (ix86_add_reg_usage_to_vzeroupper) (ix86_add_reg_usage_to_vzerouppers): New functions. (rest_of_handle_insert_vzeroupper): Use them to add register usage information to the vzeroupper instructions. gcc/testsuite/ PR target/91994 * gcc.target/i386/pr91994.c: New test. From-SVN: r276648
Richard Sandiford committed -
re PR tree-optimization/91975 (worse code for small array copy using pointer arithmetic than array indexing) 2019-10-07 Richard Biener <rguenther@suse.de> PR tree-optimization/91975 * tree-ssa-loop-ivcanon.c (constant_after_peeling): Consistently handle invariants. * g++.dg/tree-ssa/ivopts-3.C: Adjust. * gcc.dg/vect/vect-profile-1.c: Disable cunrolli. * gcc.dg/vect/vect-double-reduc-6.c: Disable unrolling of the innermost loop. * gcc.dg/vect/vect-93.c: Likewise. * gcc.dg/vect/vect-105.c: Likewise. * gcc.dg/vect/pr79920.c: Likewise. * gcc.dg/vect/no-vfa-vect-102.c: Likewise. * gcc.dg/vect/no-vfa-vect-101.c: Likewise. * gcc.dg/vect/pr83202-1.c: Operate on a larger array. * gfortran.dg/vect/vect-8.f90: Likewise. * gcc.dg/tree-ssa/cunroll-2.c: Scan early unrolling dump instead of late one. From-SVN: r276645
Richard Biener committed -
From-SVN: r276644
GCC Administrator committed
-
- 06 Oct, 2019 7 commits
-
-
Commit this missing part which had been rejected. From-SVN: r276640
François Dumont committed -
As Maxim pointed out, r276309 broke -O3 bootstrap for aarch64-linux-gnu. It turns out that EXECUTE_IF_SET_IN_HARD_REG_SET isn't safe to use for temporary objects because their lifetimes don't extend to the end of the loop. This patch therefore uses an explicit temporary instead. Other patches in the series already used this style (but for full_reg_and_partial_clobbers rather than full_reg_clobbers), so AFAICT this is the only place that needs fixing. 2019-10-06 Richard Sandiford <richard.sandiford@arm.com> gcc/ * var-tracking.c (dataflow_set_clear_at_call): Hoist temporary function result outside of EXECUTE_IF_SET_IN_HARD_REG_SET. From-SVN: r276639
Richard Sandiford committed -
* include/bits/stl_algo.h (__copy_n_a(_IIte, _Size, _OIte)): New. (__copy_n_a(istreambuf_iterator<>, _Size, _CharT*)): New declaration. (__copy_n(_IIte, _Size, _OIte, input_iterator_tag)): Adapt to use latter. * include/bits/streambuf_iterator.h (istreambuf_iterator<>): Declare std::__copy_n_a friend. (__copy_n_a(istreambuf_iterator<>, _Size, _CharT*)): New. * testsuite/25_algorithms/copy_n/istreambuf_iterator/1.cc: New. * testsuite/25_algorithms/copy_n/istreambuf_iterator/1_neg.cc: New. * testsuite/25_algorithms/copy_n/istreambuf_iterator/2_neg.cc: New. From-SVN: r276638
François Dumont committed -
* include/bits/stl_iterator_base_types.h (__iterator_category_t): Define for C++11. (_RequireInputIte): Likewise and use __enable_if_t. * include/std/numeric (__is_random_access_iter): Use __iterator_category_t. From-SVN: r276637
François Dumont committed -
* include/bits/stl_algo.h (copy_n): Add __glibcxx_requires_can_increment debug checks. * testsuite/25_algorithms/copy_n/debug/1_neg.cc: New. * testsuite/25_algorithms/copy_n/debug/2_neg.cc: New. From-SVN: r276636
François Dumont committed -
This fixes two error messages to avoid punctuation and contracted negations. gcc/ChangeLog: 2019-10-06 Iain Sandoe <iain@sandoe.co.uk> * config/darwin.c (darwin_override_options): Adjust objective-c ABI version error messages to avoid punctuation and contracted negations. From-SVN: r276635
Iain Sandoe committed -
From-SVN: r276634
GCC Administrator committed
-
- 05 Oct, 2019 9 commits
-
-
In my previous commit, I managed to include a duplicate copy of the ChangeLog file. This commit removes the duplicate portion. From-SVN: r276630
Steven G. Kargl committed -
* ipa-inline.c: Fix type; compute size rather than self_size for size of caller function. From-SVN: r276629
Jan Hubicka committed -
re PR fortran/47054 (Compilation error when cray pointers are declared in both host and internal subroutines) 2019-10-05 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/47045 * decl.c (variable_decl): Do not search parent namespace for symbol. 2019-10-05 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/47045 * gfortran.dg/pr47054_1.f90: New test * gfortran.dg/pr47054_2.f90: Ditto. From-SVN: r276627
Steven G. Kargl committed -
2019-10-05 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/91497 * gfortran.dg/pr91497.f90: Run on i?86-*-* and x86_64-*-* only. From-SVN: r276626
Steven G. Kargl committed -
2019-10-05 Paul Thomas <pault@gcc.gnu.org> PR fortran/91926 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Correct the assignment of the attribute field to account correctly for an assumed shape dummy. Assign separately to the gfc and cfi descriptors since the atribute can be different. Add btanch to correctly handle missing optional dummies. 2019-10-05 Paul Thomas <pault@gcc.gnu.org> PR fortran/91926 * gfortran.dg/ISO_Fortran_binding_13.f90 : New test. * gfortran.dg/ISO_Fortran_binding_13.c : Additional source. * gfortran.dg/ISO_Fortran_binding_14.f90 : New test. 2019-10-05 Paul Thomas <pault@gcc.gnu.org> PR fortran/91926 * runtime/ISO_Fortran_binding.c (cfi_desc_to_gfc_desc): Do not modify the bounds and offset for CFI_other. From-SVN: r276624
Paul Thomas committed -
Darwin's linker doesn't like text section relocations (they require special enabling). At least, the Fortran FE seems to generate cases where the initialiser for a pointer constant can need a relocation. We can handle this by special-casing SECCAT_RODATA when the relocation is present by placing the constant in the .const_data section. gcc/ChangeLog: 2019-10-05 Iain Sandoe <iain@sandoe.co.uk> PR target/59888 * config/darwin.c (darwin_rodata_section): Add relocation flag, choose const_data section for constants with relocations. (machopic_select_section): Pass relocation flag to darwin_rodata_section (). From-SVN: r276623
Iain Sandoe committed -
PR c++/91369 - Implement P0784R7: constexpr new c-family/ * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a. cp/ * cp-tree.h (enum cp_tree_index): Add CPTI_HEAP_UNINIT_IDENTIFIER, CPTI_HEAP_IDENTIFIER and CPTI_HEAP_DELETED_IDENTIFIER. (heap_uninit_identifier, heap_identifier, heap_deleted_identifier): Define. (type_has_constexpr_destructor, build_new_constexpr_heap_type, cxx_constant_dtor): Declare. * class.c (type_maybe_constexpr_default_constructor): Make static. (type_maybe_constexpr_destructor, type_has_constexpr_destructor): New functions. (finalize_literal_type_property): For c++2a, don't clear CLASSTYPE_LITERAL_P for types without trivial destructors unless they have non-constexpr destructors. (explain_non_literal_class): For c++2a, complain about non-constexpr destructors rather than about non-trivial destructors. * constexpr.c: Include stor-layout.h. (struct constexpr_global_ctx): New type. (struct constexpr_ctx): Add global field, remove values and constexpr_ops_count. (cxx_replaceable_global_alloc_fn): New inline function. (cxx_eval_call_expression): For c++2a allow calls to replaceable global allocation functions, for new return address of a heap uninit var, for delete record its deletion. Change ctx->values->{get,put} to ctx->global->values.{get,put}. (non_const_var_error): Add auto_diagnostic_group sentinel. Emit special diagnostics for heap variables. (cxx_eval_store_expression): Change ctx->values->{get,put} to ctx->global->values.{get,put}. (cxx_eval_loop_expr): Initialize jump_target if NULL. Change new_ctx.values->remove to ctx->global->values.remove. (cxx_eval_constant_expression): Change *ctx->constexpr_ops_count to ctx->global->constexpr_ops_count. Change ctx->values->{get,put} to ctx->global->values.{get,put}. <case NOP_EXPR>: Formatting fix. On cast of replaceable global allocation function to some pointer type, adjust the type of the heap variable and change name from heap_uninit_identifier to heap_identifier. (find_heap_var_refs): New function. (cxx_eval_outermost_constant_expr): Add constexpr_dtor argument, handle evaluation of constexpr dtors and add tracking of heap variables. Use tf_no_cleanup for get_target_expr_with_sfinae. (cxx_constant_value): Adjust cxx_eval_outermost_constant_expr caller. (cxx_constant_dtor): New function. (maybe_constant_value, fold_non_dependent_expr_template, maybe_constant_init_1): Adjust cxx_eval_outermost_constant_expr callers. (potential_constant_expression_1): Ignore clobbers. Allow COND_EXPR_IS_VEC_DELETE for c++2a. * decl.c (initialize_predefined_identifiers): Add heap identifiers. (decl_maybe_constant_destruction): New function. (cp_finish_decl): Don't clear TREE_READONLY for constexpr variables with non-trivial, but constexpr destructors. (register_dtor_fn): For constexpr variables with constexpr non-trivial destructors call cxx_maybe_build_cleanup instead of adding destructor calls at runtime. (expand_static_init): For constexpr variables with constexpr non-trivial destructors call cxx_maybe_build_cleanup. (grokdeclarator): Allow constexpr destructors for c++2a. Formatting fix. (cxx_maybe_build_cleanup): For constexpr variables with constexpr non-trivial destructors call cxx_constant_dtor instead of adding destructor calls at runtime. * init.c: Include stor-layout.h. (build_new_constexpr_heap_type, maybe_wrap_new_for_constexpr): New functions. (build_new_1): For c++2a and new[], add cast around the alloc call to help constexpr evaluation figure out the type of the heap storage. (build_vec_delete_1): Set DECL_INITIAL of tbase and emit a DECL_EXPR for it instead of initializing an uninitialized variable. * method.c: Include intl.h. (SFK_CTOR_P, SFK_DTOR_P, SFK_ASSIGN_P, SFK_COPY_P, SFK_MOVE_P): Move definitions earlier. (process_subob_fn): Add sfk argument, adjust non-constexpr call diagnostics based on it. (walk_field_subobs): Formatting fixes. Adjust process_subob_fn caller. (synthesized_method_base_walk): Likewise. (synthesized_method_walk): Set *constexpr_p to true for dtors in c++2a. Fix up DR number in comment. (implicitly_declare_fn): Formatting fix. * typeck2.c (store_init_value): Don't call cp_fully_fold_init on initializers of automatic non-constexpr variables in constexpr functions. testsuite/ * g++.dg/cpp0x/constexpr-delete2.C: Adjust expected diagnostics for c++2a. * g++.dg/cpp0x/locations1.C: Only expect constexpr ~S() diagnostics in c++17_down, adjust expected wording. * g++.dg/cpp1y/constexpr-new.C: Only expect diagnostics in c++17_down. * g++.dg/cpp2a/constexpr-dtor1.C: New test. * g++.dg/cpp2a/constexpr-dtor2.C: New test. * g++.dg/cpp2a/constexpr-dtor3.C: New test. * g++.dg/cpp2a/constexpr-new1.C: New test. * g++.dg/cpp2a/constexpr-new2.C: New test. * g++.dg/cpp2a/constexpr-new3.C: New test. * g++.dg/cpp2a/constexpr-new4.C: New test. * g++.dg/cpp2a/feat-cxx2a.C: Add __cpp_constinit and __cpp_constexpr_dynamic_alloc tests. Tweak __cpp_* tests for c++2a features to use style like older features, including #ifdef test. * g++.dg/ext/is_literal_type3.C: New test. From-SVN: r276622
Jakub Jelinek committed -
PR tree-optimization/91734 * generic-match-head.c: Include fold-const-call.h. * match.pd (sqrt(x) cmp c): Check the boundary value and in case inexact computation of c*c affects comparison of the boundary, turn LT_EXPR into LE_EXPR, GE_EXPR into GT_EXPR, LE_EXPR into LT_EXPR or GT_EXPR into GE_EXPR. Punt for sqrt comparisons against NaN and for -frounding-math. For c2, try the next smaller or larger floating point constant depending on comparison code and if it has the same sqrt as c2, use it instead of c2. * gcc.dg/pr91734.c: New test. From-SVN: r276621
Jakub Jelinek committed -
From-SVN: r276618
GCC Administrator committed
-
- 04 Oct, 2019 15 commits
-
-
C2x adds strftime %OB and %Ob formats, for alternative forms of month names (for mainly Slavic languages where a month name on its own is declined differently from a month name together with a date within that month). This patch adds corresponding format checking support. (glibc support for these formats was added in glibc 2.27.) Bootstrapped with no regressions on x86_64-pc-linux-gnu. PR c/82752 gcc/c-family: * c-format.c (C_STD_VER): Handle C2x. (C_STD_NAME): Likewise. (strftime_flag_specs): Add 'O' modifier with 'p' flag. (time_char_table): Use separate entry for 'B' and 'b', with 'O' modifier allowed and 'p' flag. * c-format.h (enum format_std_version): Add STD_C2X. (struct format_char_info): Mention 'p' in comment on flags2. gcc/testsuite: * gcc.dg/format/c2x-strftime-1.c: New test. From-SVN: r276605
Joseph Myers committed -
gcc/ChangeLog: PR middle-end/91977 * tree-ssa-strlen.c (count_nonzero_bytes): Handle assignments with MEM_REF right operand. Avoid failing for MEM_REF assignments from uninitialized objects. gcc/testsuite/ChangeLog: PR middle-end/91977 * gcc.dg/Wstringop-overflow-18.c: New test. From-SVN: r276603
Martin Sebor committed -
gcc/ChangeLog: * builtins.c (compute_objsize): Add an argument. * tree-object-size.c (addr_object_size): Same. (compute_builtin_object_size): Same. * tree-object-size.h (compute_builtin_object): Same. gcc/testsuite/ChangeLog: * gcc.dg/Wstringop-overflow-17.c: New test. From-SVN: r276602
Martin Sebor committed -
2019-10-04 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran.91959 * fortran/decl.c (variable_decl): Re-arrange code for matching %FILL. 2019-10-04 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran.91959 * gfortran.dg/pr91959.f90: New test. From-SVN: r276601
Steven G. Kargl committed -
* include/debug/forward_list (_Sequence_traits<__debug::forward_list<>>::_S_size): Returns __dp_sign distance when not empty. * include/debug/list (_Sequence_traits<__debug::list<>>::_S_size): Likewise. * include/debug/helper_functions.h (__dp_sign_max_size): New _Distance_precision enum entry. (__valid_range_aux(_IIte, _IIte, _Distance_traits<>::__type, __false_type)): Adapt. * include/debug/safe_iterator.tcc (_Safe_iterator<>::_M_get_distance_to(const _Safe_iterator&)): Review distance computation. From-SVN: r276600
François Dumont committed -
From-SVN: r276597
Jan Hubicka committed -
https://gcc.gnu.org/ml/gcc-patches/2019-10/msg00371.html PR preprocessor/91991 * line-map.c (linemap_line_start): Clear max_column_hint if we run out of locations. From-SVN: r276596
Nathan Sidwell committed -
* match.pd (sinh (x) / cosh (x)): New simplification rule. * gcc.dg/sinhovercosh-1.c: New test. From-SVN: r276595
Rafael Tsuha committed -
The machinery that collects types referenced by expressions that are part of inlinable function bodies was missing the types of local named constants in certain cases. This patch updates the Collect_export_references::expression() hook to look for references to local named constants and include their types in the exported set. Fixes golang/go#34577. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/198017 From-SVN: r276594
Ian Lance Taylor committed -
2019-10-04 Martin Jambor <mjambor@suse.cz> * tree-ssa-forwprop.c (simplify_builtin_call): Set gimple call fntype when switching to calling memcpy instead of memset. From-SVN: r276593
Martin Jambor committed -
2019-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de> * hash-table.h (hash_table::empty_slow): Don't assign size_t values to int variables. From-SVN: r276592
Bernd Edlinger committed -
2019-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de> * expr.c (convert_mode_scalar): Remove shadowing local var. (emit_block_move): Rename local vars. (block_move_libcall_safe_for_call_parm): Remove shadowing local var. (emit_push_insn): Rename local vars. (expand_assignment): Fix wrong mode in assign_stack_temp. Remove shadowing local vars. (store_constructor): Remove shadowing local vars. Rename local var. (store_field, expand_cond_expr_using_cmove, expand_expr_real_2): Remove shadowing local vars. (expand_expr_real_1, do_store_flag): Remove shadowing local vars. Rename local vars. From-SVN: r276591
Bernd Edlinger committed -
2019-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de> * cgraph.h (FOR_EACH_ALIAS): Avoid shadowing the loop variable. From-SVN: r276590
Bernd Edlinger committed -
2019-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de> * genmatch.c (commutate): Rename local var. (lower_cond): Reuse local var. (dt_node::gen, dt_node::gen_kids, dt_node::gen_kids_1, dt_operand::gen, dt_operand::gen_gimple_expr, dt_simplify::gen): Add a param. Rename generated vars. (decision_tree::insert_operand, (capture_info::walk_match, capture_info::walk_result, capture_info::walk_c_expr): Rename local vars. (expr::gen_transform): Rename generated vars. Use snprintf. Rename local vars. (capture::gen_transform, dt_operand::get_name, dt_operand::gen_opname): Rename generated vars. (write_predicate): Adjust call to gen_kids. (parser::get_internal_capture_id): Rename generated vars. (parser::parse_expr): Rename local vars. (parser::parse_if): Remove local var. (parser::parse_pattern, add_operator): Rename local vars. From-SVN: r276589
Bernd Edlinger committed -
Various built-in functions that GCC has as extensions are now standard functions in C2x. This patch adds DEF_C2X_BUILTIN and uses it to mark them as such. Some of the so-marked functions were previously DEF_EXT_LIB_BUILTIN, while some DFP ones were DEF_GCC_BUILTIN (i.e. __builtin_* only); both sets become DEF_C2X_BUILTIN. This in turn requires flag_isoc2x to be defined in various front ends using builtins.def. As the semantics of the built-in functions should already be tested, the tests added only verify that they are declared in C2x mode but not in C11 mode. The test of DFP built-in functions being declared for C2x goes in gcc.dg/dfp/, as while such built-in functions currently don't depend on whether DFP is supported, that looks like a bug to me (see bug 91985), so it seems best for the tests not to depend on exactly how that bug might be fixed. Bootstrapped with no regressions on x86_64-pc-linux-gnu. gcc: * builtins.def (DEF_C2X_BUILTIN): New macro. (exp10, exp10f, exp10l, fabsd32, fabsd64, fabsd128, nand32) (nand64, nand128, roundeven, roundevenf, roundevenl, strdup) (strndup): Use DEF_C2X_BUILTIN. * coretypes.h (enum function_class): Add function_c2x_misc. gcc/ada: * gcc-interface/utils.c (flag_isoc2x): New variable. gcc/brig: * brig-lang.c (flag_isoc2x): New variable. gcc/lto: * lto-lang.c (flag_isoc2x): New variable. gcc/testsuite: * gcc.dg/c11-builtins-1.c, gcc.dg/c2x-builtins-1.c, gcc.dg/dfp/c2x-builtins-dfp-1.c: New tests. From-SVN: r276588
Joseph Myers committed
-