- 29 Nov, 2019 22 commits
-
-
This patch makes vect_get_mask_type_for_stmt and get_mask_type_for_scalar_type take a group size instead of the SLP node, so that later patches can call it before an SLP node has been built. 2019-11-29 Richard Sandiford <richard.sandiford@arm.com> gcc/ * tree-vectorizer.h (get_mask_type_for_scalar_type): Replace the slp_tree parameter with a group size parameter. (vect_get_mask_type_for_stmt): Likewise. * tree-vect-stmts.c (get_mask_type_for_scalar_type): Likewise. (vect_get_mask_type_for_stmt): Likewise. * tree-vect-slp.c (vect_slp_analyze_node_operations_1): Update call accordingly. From-SVN: r278849
Richard Sandiford committed -
vectorizable_operation returned false for codes that are handled by vectorizable_shift, but only after it had already done a lot of work. Checking earlier should be more efficient and avoid polluting the logs with duplicate info. Also, there was no such early-out for comparisons or COND_EXPRs. Fixing that avoids a false scan-tree-dump hit with a later patch. 2019-11-29 Richard Sandiford <richard.sandiford@arm.com> gcc/ * tree-vect-stmts.c (vectorizable_operation): Punt early on codes that are handled elsewhere. From-SVN: r278848
Richard Sandiford committed -
vect_recog_bool_pattern assumed that a comparison between two booleans should always become a comparison of vector mask types (implemented as an XOR_EXPR). But if the booleans in question are generated as data values (e.g. because they're loaded directly from memory), we should treat them like ordinary integers instead, just as we do for boolean logic ops whose operands are loaded from memory. vect_get_mask_type_for_stmt already handled this case: /* We may compare boolean value loaded as vector of integers. Fix mask_type in such case. */ if (mask_type && !VECTOR_BOOLEAN_TYPE_P (mask_type) && gimple_code (stmt) == GIMPLE_ASSIGN && TREE_CODE_CLASS (gimple_assign_rhs_code (stmt)) == tcc_comparison) mask_type = truth_type_for (mask_type); and not handling it here complicated later patches. The initial list of targets for vect_bool_cmp is deliberately conservative. 2019-11-29 Richard Sandiford <richard.sandiford@arm.com> gcc/ * doc/sourcebuild.texi (vect_bool_cmp): Document. * tree-vect-patterns.c (search_type_for_mask_1): If neither operand to a boolean comparison is a natural vector mask, handle both operands like normal integers instead. gcc/testsuite/ * gcc.dg/vect/vect-bool-cmp-2.c: New test. * lib/target-supports.exp (check_effective_target_vect_bool_cmp): New effective target procedure. From-SVN: r278847
Richard Sandiford committed -
This fixes two related problems. The iterators for node-based containers use nested typedefs such as std::list<T>::iterator::_Node to denote their node types. As reported in https://bugzilla.redhat.com/show_bug.cgi?id=1053438 those typedefs are not always present in the debug info. That means the pretty printers cannot find them using gdb.lookup_type (via the find_type helper). Instead of looking up the nested typedefs this patch makes the printers look up the actual class templates directly. A related problem (and the original topic of PR 91997) is that GDB fails to find types via gdb.lookup_type when printing a backtrace from a non-C++ functiion: https://sourceware.org/bugzilla/show_bug.cgi?id=25234 That is also solved by not looking up the nested typedef. PR libstdc++/91997 * python/libstdcxx/v6/printers.py (find_type): Fail more gracefully if we run out of base classes to look at. (llokup_templ_spec, lookup_node_type): New utilities to find node types for node-based containers. (StdListPrinter.children, NodeIteratorPrinter.__init__) (NodeIteratorPrinter.to_string, StdSlistPrinter.children) (StdSlistIteratorPrinter.to_string, StdRbtreeIteratorPrinter.__init__) (StdMapPrinter.children, StdSetPrinter.children) (StdForwardListPrinter.children): Use lookup_node_type instead of find_type. (StdListIteratorPrinter.__init__, StdFwdListIteratorPrinter.__init__): Pass name of node type to NodeIteratorPrinter constructor. (Tr1HashtableIterator.__init__): Rename argument. (StdHashtableIterator.__init__): Likewise. Use lookup_templ_spec instead of find_type. * testsuite/libstdc++-prettyprinters/59161.cc: Remove workaround for _Node typedef not being present in debuginfo. * testsuite/libstdc++-prettyprinters/91997.cc: New test. From-SVN: r278846
Jonathan Wakely committed -
* testsuite/libgomp.oacc-fortran/declare-5.f90: Extend by adding a common-block test case. From-SVN: r278845
Tobias Burnus committed -
2019-11-29 Richard Biener <rguenther@suse.de> * tree-ssa-sccvn.c (vn_walk_cb_data::push_partial_def): Bail out early for too large objects. From-SVN: r278844
Richard Biener committed -
* fortran.dg/goacc/common-block-3.f90: Check that unused common-block variables do not get mapped. Reviewed-by: Thomas Schwinge <thomas@codesourcery.com> From-SVN: r278843
Tobias Burnus committed -
2019-11-29 Martin Jambor <mjambor@suse.cz> PR ipa/92476 * g++.dg/lto/pr92476_[01].C: New test. From-SVN: r278842
Martin Jambor committed -
2019-11-29 Martin Jambor <mjambor@suse.cz> PR ipa/92476 * ipa-cp.c (set_single_call_flag): Set node_calling_single_call in the summary only if the summary exists. (find_more_scalar_values_for_callers_subset): Check node_dead in the summary only if the summary exists. (ipcp_store_bits_results): Ignore nodes without lattices. (ipcp_store_vr_results): Likewise. * cgraphclones.c: Include ipa-fnsummary.h and ipa-prop.h and the header files required by them. (cgraph_node::expand_all_artificial_thunks): Analyze expanded thunks. From-SVN: r278841
Martin Jambor committed -
In this PR we assigned a vector mask type to the result of a comparison and then tried to pass that mask type to a simd clone, which expected a normal (non-mask) type instead. This patch simply punts on call arguments that have a mask type. A better fix would be to pattern-match the comparison to a COND_EXPR, like we would if the comparison was stored to memory, but doing that isn't gcc 9 or 10 material. Note that this doesn't affect x86_64-linux-gnu because the ABI promotes bool arguments to ints. 2019-11-29 Richard Sandiford <richard.sandiford@arm.com> gcc/ PR tree-optimization/92710 * tree-vect-stmts.c (vectorizable_simd_clone_call): Reject vector mask arguments. gcc/testsuite/ PR tree-optimization/92710 * gcc.dg/vect/pr92710.c: New test. From-SVN: r278839
Richard Sandiford committed -
From-SVN: r278837
Tobias Burnus committed -
PR ipa/84963 * gfortran.dg/goacc/pr84963.f90: Use dg-additional-options not dg-options as otherwise -fopenacc is not used. From-SVN: r278836
Tobias Burnus committed -
* profile-count.c (profile_count::to_cgraph_frequency, profile_count::to_sreal_scale): Check for compaibility of counts. * profile-count.h (compatible_p): Make public; add checking for global0 versus global types. * cgraph.c (cgraph_node::verify_node): Verify count compatibility. From-SVN: r278835
Jan Hubicka committed -
Without epiloque no mask it would only try HI modes, but thanks to the epiloques nomask It tries QI mode as well which succeeds. The xfail then generates an xpass since the condition on it checks for HI to SI and not QI. So I disabled the epiloque mask since it seems to violate the conditions the test actually wanted to test for. gcc/testsuite/ChangeLog: * gcc.dg/vect/slp-reduc-3.c: Turn off epilogue-nomask. From-SVN: r278834
Tamar Christina committed -
re PR tree-optimization/92715 (error: position plus size exceeds size of referenced object in ‘bit_field_ref’) 2019-11-29 Richard Biener <rguenther@suse.de> PR tree-optimization/92715 * tree-ssa-forwprop.c (simplify_vector_constructor): Bail out for uniform vectors and source vectors with less elements than the destination. * gcc.dg/torture/pr92715.c: New testcase. From-SVN: r278833
Richard Biener committed -
PR c++/60228 * parser.c (cp_parser_omp_declare_reduction_exprs): If processing_template_decl, wrap the combiner or initializer into EXPR_STMT. * decl.c (start_preparsed_function): Don't start a lambda scope for DECL_OMP_DECLARE_REDUCTION_P functions. (finish_function): Don't finish a lambda scope for DECL_OMP_DECLARE_REDUCTION_P functions, nor cp_fold_function them nor cp_genericize them. * mangle.c (decl_mangling_context): Look through DECL_OMP_DECLARE_REDUCTION_P functions. * semantics.c (expand_or_defer_fn_1): For DECL_OMP_DECLARE_REDUCTION_P functions, use tentative linkage, don't keep their bodies with -fkeep-inline-functions and return false at the end. * g++.dg/gomp/openmp-simd-2.C: Don't expect bodies for DECL_OMP_DECLARE_REDUCTION_P functions. * testsuite/libgomp.c++/udr-20.C: New test. * testsuite/libgomp.c++/udr-21.C: New test. From-SVN: r278832
Jakub Jelinek committed -
PR c++/60228 * parser.c (cp_parser_omp_declare_reduction_exprs): If processing_template_decl, wrap the combiner or initializer into EXPR_STMT. * decl.c (start_preparsed_function): Don't start a lambda scope for DECL_OMP_DECLARE_REDUCTION_P functions. (finish_function): Don't finish a lambda scope for DECL_OMP_DECLARE_REDUCTION_P functions, nor cp_fold_function them nor cp_genericize them. * mangle.c (decl_mangling_context): Look through DECL_OMP_DECLARE_REDUCTION_P functions. * semantics.c (expand_or_defer_fn_1): For DECL_OMP_DECLARE_REDUCTION_P functions, use tentative linkage, don't keep their bodies with -fkeep-inline-functions and return false at the end. * g++.dg/gomp/openmp-simd-2.C: Don't expect bodies for DECL_OMP_DECLARE_REDUCTION_P functions. * testsuite/libgomp.c++/udr-20.C: New test. * testsuite/libgomp.c++/udr-21.C: New test. From-SVN: r278831
Jakub Jelinek committed -
2019-11-29 Martin Liska <mliska@suse.cz> PR lto/91574 * ipa-devirt.c (types_same_for_odr): Check for existence of TYPE_NAMEs first. 2019-11-29 Martin Liska <mliska@suse.cz> PR lto/91574 * g++.dg/lto/pr91574_0.C: New test. From-SVN: r278829
Martin Liska committed -
2019-11-29 Richard Biener <rguenther@suse.de> PR tree-optimization/92704 * tree-if-conv.c (combine_blocks): Deal with virtual PHIs in loops performing only loads. * gcc.dg/torture/pr92704.c: New testcase. From-SVN: r278828
Richard Biener committed -
When adding the initial support for C2x attributes, I deferred the unbounded lookahead support required to support such attributes in Objective-C (except for the changes to string literal handling, which were the riskier piece of preparation for such lookahead support). This patch adds that remaining ObjC support. For C, the parser continues to work exactly as it did before. For ObjC, however, when checking for whether '[[' starts attributes, it lexes however many tokens are needed to check for a matching ']]', but in a raw mode that omits all the context-sensitive processing that c_lex_with_flags normally does, so that that processing can be done later when the right context-sensitive flags are set. Those tokens are saved in a separate raw_tokens vector in the parser, and normal c_lex_one_token calls will get tokens from there and perform the remaining processing on them, if any tokens are found there, so all parsing not using the new interfaces gets the same tokens as it did before. (For C, this raw lexing never occurs and the vector of raw tokens is always NULL.) Bootstrapped with no regressions for x86_64-pc-linux-gnu. gcc/c: * c-parser.c (struct c_parser): Add members raw_tokens and raw_tokens_used. (c_lex_one_token): Add argument raw. Handle lexing raw tokens and using previously-lexed raw tokens. (c_parser_peek_nth_token_raw) (c_parser_check_balanced_raw_token_sequence): New functions. (c_parser_nth_token_starts_std_attributes): Use c_parser_check_balanced_raw_token_sequence for Objective-C. gcc/testsuite: * objc.dg/attributes/gnu2x-attr-syntax-1.m: New test. From-SVN: r278827
Joseph Myers committed -
gcc/ * builtin-types.def (BT_DFLOAT32_PTR, BT_DFLOAT64_PTR, BT_DFLOAT128_PTR) Remove. * tree-core.h (TI_DFLOAT32_PTR_TYPE, TI_DFLOAT64_PTR_TYPE, TI_DFLOAT128_PTR_TYPE): Remove. * tree.c (build_common_type_nodes): Remove dfloat32_ptr_type_node, dfloat64_ptr_type_node and dfloat128_ptr_type_node initialisation. * tree.h (dfloat32_ptr_type_node, dfloat64_ptr_type_node, dfloat128_ptr_type_node): Remove macros. gcc/jit/ * jit-builtins.c (BT_DFLOAT32_PTR, BT_DFLOAT64_PTR, BT_DFLOAT128_PTR): Remove commented-out cases. Reviewed-by: Joseph Myers <joseph@codesourcery.com> From-SVN: r278826
Julian Brown committed -
From-SVN: r278825
GCC Administrator committed
-
- 28 Nov, 2019 18 commits
-
-
* config/rs6000/rs6000.md (*movsi_internal1): Fix formatting. Improve formatting. (*movdi_internal64): Ditto. From-SVN: r278822
Segher Boessenkool committed -
We run fwprop before combine, very early even in the case of fwprop1; and fwprop1 will change memory addressing to what it considers cheaper. After the "common" change, it now changes the indexed store instruction in the testcase to be to a constant address. But that is not an improvement at all: the byte reverse instructions only exist in the indexed form, so they will not match anymore. This patch changes the patterns for the byte reverse instructions to allow plain memory_operand, letting reload fix this up. PR target/92602 * config/rs6000/rs6000.md (bswap<mode>2_load for HSI): Change the indexed_or_indirect_operand to be memory_operand. (bswap<mode>2_store for HSI): Ditto. (bswapdi2_load): Ditto. (bswapdi2_store): Ditto. From-SVN: r278821
Segher Boessenkool committed -
2019-11-28 Martin Liska <mliska@suse.cz> PR debug/46558 * dbgcnt.c (dbg_cnt_list_all_counters): Mark table headers for translation. From-SVN: r278820
Martin Liska committed -
2019-11-28 Martin Liska <mliska@suse.cz> PR lto/92609 * ipa-devirt.c (warn_types_mismatch): Use TYPE_MAIN_VARIANT consistently. 2019-11-28 Martin Liska <mliska@suse.cz> PR lto/92609 * g++.dg/lto/pr92609_0.C: New test. * g++.dg/lto/pr92609_1.C: New test. From-SVN: r278819
Martin Liska committed -
The switch to default of no-common means that we no longer indirect the accesses to 'xxx' in this test. Adjust the scan- assembler tests to reflect this. gcc/testsuite/ChangeLog: 2019-11-28 Iain Sandoe <iain@sandoe.co.uk> * gcc.target/i386/pr32219-2.c: Adjust scan-assembler entries for revised common default. From-SVN: r278818
Iain Sandoe committed -
re PR libfortran/90374 (Fortran 2018: Support d0.d, e0.d, es0.d, en0.d, g0.d and ew.d e0 edit descriptors for output) PR fortran/90374 * io.c (check_format): Allow zero width expoenent with e0. * io/format.c (parse_format_list): Relax format checking to allow e0 exponent specifier. * gfortran.dg/fmt_zero_width.f90: Update test. From-SVN: r278817
Jerry DeLisle committed -
* ipa-inline.c (want_early_inline_function_p): Remove leftover optimize checks. From-SVN: r278816
Jan Hubicka committed -
profile-count.c (profile_count::combine_with_ipa_count): Return uninitialized count if called on ininitialized count. * profile-count.c (profile_count::combine_with_ipa_count): Return uninitialized count if called on ininitialized count. From-SVN: r278815
Jan Hubicka committed -
* ipa-inline-transform.c (inline_transform): Scale profile before redirecting. From-SVN: r278814
Jan Hubicka committed -
* profile-count.h (profile_count::max): Work on profiles of different type. (profile_count::apply_scale): Be sure that ret is not local or global0 type if num is global. From-SVN: r278813
Jan Hubicka committed -
2019-11-28 Martin Jambor <mjambor@suse.cz> PR ipa/92697 * cgraph.c (cgraph_node_cannot_be_local_p_1): Return true for ifunc_resolvers. * symtab.c (symtab_node::dump_base): Dump ifunc_resolver flag. Removed trailig whitespace. testsuite/ * g++.dg/ipa/pr92697.C: New. From-SVN: r278812
Martin Jambor committed -
This patch fixes profile updates while cloning. When new clone is produced its global profile is subtracted from the original function. If the original function profile drops to 0 we want to switch from global profiles to global0 profiles which is implemented by combine_with_ipa_count_within. However this is done on all edges independnetly and it may happen that we end up combining global and globa0 profiles in one functions which is not a good idea. This implements profile_count::combine_with_ipa_count_within which is able to take into account that the counter is inside function with a given count. * profile-count.h (profile_count::combine_with_ipa_count_within): Declare. * profile-count.c (profile_count::combine_with_ipa_count_within): New. * cgraphclones.c (cgraph_edge::clone, cgraph_node::create_clone): Use it. From-SVN: r278811
Jan Hubicka committed -
This patch fixes profile updates while cloning. When new clone is produced its global profile is subtracted from the original function. If the original function profile drops to 0 we want to switch from global profiles to global0 profiles which is implemented by combine_with_ipa_count_within. However this is done on all edges independnetly and it may happen that we end up combining global and globa0 profiles in one functions which is not a good idea. This implements profile_count::combine_with_ipa_count_within which is able to take into account that the counter is inside function with a given count. * profile-count.h (profile_count::combine_with_ipa_count_within): Declare. * profile-count.c (profile_count::combine_with_ipa_count_within): New. * cgraphclones.c (cgraph_edge::clone, cgraph_node::create_clone): Use it. From-SVN: r278810
Jan Hubicka committed -
* ipa-utils.c (ipa_merge_profiles): Be sure that all type transtions of counters are done same way. From-SVN: r278809
Jan Hubicka committed -
From-SVN: r278808
Jan Hubicka committed -
re PR tree-optimization/92645 (Hand written vector code is 450 times slower when compiled with GCC compared to Clang) 2019-11-28 Richard Biener <rguenther@suse.de> PR tree-optimization/92645 * tree-inline.c (remap_gimple_stmt): When the return value is not wanted, elide GIMPLE_RETURN. * gcc.dg/tree-ssa/inline-12.c: New testcase. From-SVN: r278807
Richard Biener committed -
re PR tree-optimization/92645 (Hand written vector code is 450 times slower when compiled with GCC compared to Clang) 2019-11-28 Richard Biener <rguenther@suse.de> PR tree-optimization/92645 * tree-ssa-forwprop.c (get_bit_field_ref_def): Also handle conversions inside a mode class. Remove restriction on preserving the element size. (simplify_vector_constructor): Deal with the above and for identity permutes also try using VEC_UNPACK_[FLOAT_]LO_EXPR and VEC_PACK_TRUNC_EXPR. * gcc.target/i386/pr92645-4.c: New testcase. From-SVN: r278806
Richard Biener committed -
Must use push insn to pass varargs arguments of DFmode because otherwise the middle-end generates wrong code. Must use push insn to pass varargs arguments of DFmode because otherwise the middle-end generates wrong code. PR target/92055 * config/avr/avr.md (MPUSH) [DF, DC]: Add modes to mode iterator. From-SVN: r278805
Georg-Johann Lay committed
-