- 17 Oct, 2019 1 commit
-
-
From-SVN: r277088
GCC Administrator committed
-
- 16 Oct, 2019 22 commits
-
-
* decl.c (cxx_maybe_build_cleanup): When clearing location of cleanup, if cleanup is a nop, clear location of its operand too. From-SVN: r277084
Jakub Jelinek committed -
* tree-ssa-strlen.c (maybe_invalidate): Use HOST_WIDE_INT_PRINT_UNSIGNED instead of "%zu". From-SVN: r277083
Jakub Jelinek committed -
This finishes the part 1 of 2 patch submitted by Andrew Burgess on Aug 19. This adds the argument registers but not t0 (aka x5) to SIBCALL_REGS. It also adds the missing riscv_regno_to_class change. Tested with cross riscv32-elf and riscv64-linux toolchain build and check. There were no regressions. I see about a 0.01% code size reduction for the C and libstdc++ libraries. gcc/ * config/riscv/riscv.h (REG_CLASS_CONTENTS): Add argument passing regs to SIBCALL_REGS. * config/riscv/riscv.c (riscv_regno_to_class): Change argument passing regs to SIBCALL_REGS. Co-Authored-By: Jim Wilson <jimw@sifive.com> From-SVN: r277082
Andrew Burgess committed -
gcc/ChangeLog: PR tree-optimization/83821 * tree-ssa-strlen.c (maybe_invalidate): Add argument. Consider the length of a string when available. (handle_builtin_memset) Add argument. (handle_store, strlen_check_and_optimize_call): Same. (check_and_optimize_stmt): Same. Pass it to callees. gcc/testsuite/ChangeLog: PR tree-optimization/83821 * c-c++-common/Warray-bounds-4.c: Remove XFAIL. * gcc.dg/strlenopt-82.c: New test. * gcc.dg/strlenopt-83.c: Same. * gcc.dg/strlenopt-84.c: Same. * gcc.dg/strlenopt-85.c: Same. * gcc.dg/strlenopt-86.c: Same. * gcc.dg/tree-ssa/calloc-4.c: Same. * gcc.dg/tree-ssa/calloc-5.c: Same. From-SVN: r277080
Martin Sebor committed -
gcc/testsuite/ChangeLog: PR tree-optimization/91996 * gcc.dg/strlenopt-80.c: New test. * gcc.dg/strlenopt-81.c: New test. gcc/ChangeLog: PR tree-optimization/91996 * tree-ssa-strlen.c (maybe_warn_pointless_strcmp): Improve location information. (compare_nonzero_chars): Add an overload. (count_nonzero_bytes): Add an argument. Call overload above. Handle non-constant lengths in some range. (handle_store): Add an argument. (check_and_optimize_stmt): Pass an argument to handle_store. From-SVN: r277076
Martin Sebor committed -
The Arm port is failing bootstrap because GCC is now warning about an unitialized array. The code is complex enough that I certainly can't be sure the compiler is wrong, so perhaps the best fix here is just to memset the entire array before use. * config/arm/arm.c (neon_valid_immediate): Clear bytes before use. From-SVN: r277073
Richard Earnshaw committed -
mips.c (mips_expand_builtin_insn): Force the operands which correspond to the same input-output register to have... * config/mips/mips.c (mips_expand_builtin_insn): Force the operands which correspond to the same input-output register to have the same pseudo assigned to them. * gcc.target/mips/msa-dpadd-dpsub.c: New test. From-SVN: r277071
Mihailo Stojanovic committed -
gcc/ChangeLog: 2019-10-16 Ilya Leoshkevich <iii@linux.ibm.com> * cfgrtl.c (find_partition_fixes): Remove bbs_in_cold_partition. From-SVN: r277070
Ilya Leoshkevich committed -
In aarch64_classify_symbol symbols are allowed large offsets on relocations. This means the offset can use all of the +/-4GB offset, leaving no offset available for the symbol itself. This results in relocation overflow and link-time errors for simple expressions like &global_array + 0xffffff00. To avoid this, unless the offset_within_block_p is true, limit the offset to +/-1MB so that the symbol needs to be within a 3.9GB offset from its references. For the tiny code model use a 64KB offset, allowing most of the 1MB range for code/data between the symbol and its references. gcc/ * config/aarch64/aarch64.c (aarch64_classify_symbol): Apply reasonable limit to symbol offsets. testsuite/ * gcc.target/aarch64/symbol-range.c: Improve testcase. * gcc.target/aarch64/symbol-range-tiny.c: Likewise. From-SVN: r277068
Wilco Dijkstra committed -
2019-10-16 Richard Biener <rguenther@suse.de> * tree-vect-loop.c (vect_valid_reduction_input_p): Remove. (vect_is_simple_reduction): Delay checking to vectorizable_reduction and relax the checking. (vectorizable_reduction): Check we have a simple use. Check for bogus condition reductions. * tree-vect-stmts.c (vect_transform_stmt): Make sure we are looking at the last stmt in a pattern sequence when filling in backedge PHI values. * gcc.dg/vect/vect-cond-reduc-3.c: New testcase. * gcc.dg/vect/vect-cond-reduc-4.c: Likewise. From-SVN: r277067
Richard Biener committed -
In PR70010, a function is marked with target(no-vsx) to disable VSX code generation. To avoid VSX code generation, this function should not be inlined into VSX function. To fix the bug, in the current logic when checking whether the caller's ISA flags supports the callee's ISA flags, we just need to add a test that enforces that the caller's ISA flags match exactly the callee's flags, for those flags that were explicitly set in the callee. If caller without target attribute then using options from command line. gcc/ 2019-10-16 Peter Bergner <bergner@linux.ibm.com> Jiufu Guo <guojiufu@linux.ibm.com> PR target/70010 * config/rs6000/rs6000.c (rs6000_can_inline_p): Prohibit inlining if the callee explicitly disables some isa_flags the caller is using. gcc.testsuite/ 2019-10-16 Peter Bergner <bergner@linux.ibm.com> Jiufu Guo <guojiufu@linux.ibm.com> PR target/70010 * gcc.target/powerpc/pr70010.c: New test. * gcc.target/powerpc/pr70010-1.c: New test. * gcc.target/powerpc/pr70010-2.c: New test. * gcc.target/powerpc/pr70010-3.c: New test. * gcc.target/powerpc/pr70010-4.c: New test. Co-Authored-By: Jiufu Guo <guojiufu@linux.ibm.com> From-SVN: r277065
Peter Bergner committed -
2019-10-16 Richard Sandiford <richard.sandiford@arm.com> gcc/ * function-abi.cc (expr_callee_abi): Assert for POINTER_TYPE_P. From-SVN: r277063
Richard Sandiford committed -
This patch adds extra vector modes that represent a half, quarter or eighth of what an SVE vector can hold. This is useful for describing the memory vector involved in an extending load or truncating store. It might also be useful in future for representing "unpacked" SVE registers, i.e. registers that contain values in the low bits of a wider containing element. The new modes could have the same width as an Advanced SIMD mode for certain -msve-vector-bits=N options, so we need to ensure that they come later in the mode list and that Advanced SIMD modes always "win". 2019-10-16 Richard Sandiford <richard.sandiford@arm.com> gcc/ * genmodes.c (mode_data::order): New field. (blank_mode): Update accordingly. (VECTOR_MODES_WITH_PREFIX): Add an order parameter. (make_vector_modes): Likewise. (VECTOR_MODES): Update use accordingly. (cmp_modes): Sort by the new order field ahead of sorting by size. * config/aarch64/aarch64-modes.def (VNx2QI, VN2xHI, VNx2SI) (VNx4QI, VNx4HI, VNx8QI): New partial vector modes. * config/aarch64/aarch64.c (VEC_PARTIAL): New flag value. (aarch64_classify_vector_mode): Handle the new partial modes. (aarch64_vl_bytes): New function. (aarch64_hard_regno_nregs): Use it instead of BYTES_PER_SVE_VECTOR when counting the number of registers in an SVE mode. (aarch64_class_max_nregs): Likewise. (aarch64_hard_regno_mode_ok): Don't allow partial vectors in registers yet. (aarch64_classify_address): Treat partial vectors analogously to full vectors. (aarch64_print_address_internal): Consolidate the printing of MUL VL addresses, using aarch64_vl_bytes as the number of bytes represented by "VL". (aarch64_vector_mode_supported_p): Reject partial vector modes. From-SVN: r277062
Richard Sandiford committed -
I'd used known_lt when converting these conditions to poly_int, but on reflection that was a bad choice. The code isn't just doing a range check; it specifically needs constants that will fit in a certain encoding. 2019-10-16 Richard Sandiford <richard.sandiford@arm.com> gcc/ * config/aarch64/aarch64.c (aarch64_layout_frame): Use is_constant rather than known_lt when choosing frame layouts. From-SVN: r277061
Richard Sandiford committed -
This patch adds an assert that all the individual *_adjust allocations add up to the full frame size. With that safety net, it seemed slightly clearer to use crtl->outgoing_args_size as the final adjustment where appropriate, to match what's used in the comments. This is a bit overkill on its own, but I need to add more cases for SVE. 2019-10-16 Richard Sandiford <richard.sandiford@arm.com> gcc/ * config/aarch64/aarch64.c (aarch64_layout_frame): Assert that all the adjustments add up to the full frame size. Use crtl->outgoing_args_size directly as the final adjustment where appropriate. From-SVN: r277060
Richard Sandiford committed -
Using the full path "cfun->machine->frame" in aarch64_layout_frame led to awkward formatting in some follow-on patches, so it seemed worth using a local reference instead. 2019-10-16 Richard Sandiford <richard.sandiford@arm.com> gcc/ * config/aarch64/aarch64.c (aarch64_layout_frame): Use a local "frame" reference instead of always referring directly to "cfun->machine->frame". From-SVN: r277059
Richard Sandiford committed -
Clang doesn't support __is_same_as but provides __is_same instead. Restore the original implementation (pre r276891) when neither of those built-ins is available. * include/bits/c++config (_GLIBCXX_BUILTIN_IS_SAME_AS): Define to one of __is_same_as or __is_same when available. * include/std/concepts (__detail::__same_as): Use std::is_same_v. * include/std/type_traits (is_same) [_GLIBCXX_BUILTIN_IS_SAME_AS]: Use new macro instead of __is_same_as. (is_same) [!_GLIBCXX_BUILTIN_IS_SAME_AS]: Restore partial specialization. (is_same_v) [_GLIBCXX_BUILTIN_IS_SAME_AS]: Use new macro. (is_same_v) [!_GLIBCXX_BUILTIN_IS_SAME_AS]: Use std::is_same. From-SVN: r277058
Jonathan Wakely committed -
re PR tree-optimization/92119 (ICE: SIGSEGV in contains_struct_check (tree.h:3380) with -Os -fno-tree-dce -fno-tree-dse -ftree-slp-vectorize) 2019-10-16 Richard Biener <rguenther@suse.de> PR tree-optimization/92119 * tree-vect-patterns.c (vect_recog_rotate_pattern): Guard against missing bswap lhs. From-SVN: r277057
Richard Biener committed -
This patch makes value_range_base::set convert POLY_INT_CST bounds into the worst-case INTEGER_CST bounds. The main case in which this gives useful ranges is a lower bound of A + B * X becoming A when B >= 0. E.g.: [32 + 16X, 100] -> [32, 100] [32 + 16X, 32 + 16X] -> [32, MAX] But the same thing can be useful for the upper bound with negative X coefficients. 2019-10-16 Richard Sandiford <richard.sandiford@arm.com> gcc/ PR middle-end/92033 * poly-int.h (constant_lower_bound_with_limit): New function. (constant_upper_bound_with_limit): Likewise. * doc/poly-int.texi: Document them. * tree-vrp.c (value_range_base::set): Convert POLY_INT_CST bounds into the worst-case INTEGER_CST bounds. From-SVN: r277056
Richard Sandiford committed -
2019-10-16 Feng Xue <fxue@os.amperecomputing.com> PR ipa/91088 * doc/invoke.texi (ipa-max-param-expr-ops): Document new option. * params.def (PARAM_IPA_MAX_PARAM_EXPR_OPS): New. * ipa-predicat.h (struct expr_eval_op): New struct. (expr_eval_ops): New typedef. (struct condition): Add type and param_ops fields, remove size field. (add_condition): Replace size parameter with type parameter, add param_ops parameter. * ipa-predicat.c (expr_eval_ops_equal_p): New function. (predicate::add_clause): Add comparisons on type and param_ops. (dump_condition): Add debug dump for param_ops. (remap_after_inlining): Adjust call arguments to add_condition. (add_condition): Replace size parameter with type parameter, add param_ops parameter. Unshare constant value used in conditions. * ipa-fnsummary.c (evaluate_conditions_for_known_args): Fold parameter expressions using param_ops. (decompose_param_expr): New function. (set_cond_stmt_execution_predicate): Use call to decompose_param_expr to replace call to unmodified_parm_or_parm_agg_item. (set_switch_stmt_execution_predicate): Likewise. (will_be_nonconstant_expr_predicate): Likewise. Replace usage of size with type. (inline_read_section): Read param_ops from summary stream. (ipa_fn_summary_write): Write param_ops to summary stream. 2019-10-16 Feng Xue <fxue@os.amperecomputing.com> PR ipa/91088 * gcc.dg/ipa/pr91088.c: New test. * gcc.dg/ipa/pr91089.c: Add sub-test for range analysis. * g++.dg/tree-ssa/ivopts-3.C: Force a function to be noinline. From-SVN: r277054
Feng Xue committed -
* src/c++11/debug.cc (print_field): Replace constness_names <unknown> entry with <unknown constness>. Replace state_names <unknown> entry with <unknown state>. From-SVN: r277049
François Dumont committed -
From-SVN: r277033
GCC Administrator committed
-
- 15 Oct, 2019 17 commits
-
-
As PR92107 shows, genattrtab doesn't parenthesize expressions correctly (or at all, even). This fixes it. PR rtl-optimization/92107 * genattrtab.c (write_attr_value) <do_operator>: Parenthesize the expression written. From-SVN: r277023
Segher Boessenkool committed -
* config/pa/fptr.c (_dl_read_access_allowed): Change argument to unsigned int. Adjust callers. (__canonicalize_funcptr_for_compare): Change plabel type to volatile unsigned int *. Load relocation offset before function pointer. Add barrier to ensure ordering. From-SVN: r277015
John David Anglin committed -
2019-10-15 Andrew Pinski <apinski@marvell.com> * gcc.c-torture/compile/20191015-1.c: New test. * gcc.c-torture/compile/20191015-2.c: New test. From-SVN: r277011
Andrew Pinski committed -
This updates the description of the support for fix and continue debugging. gcc/ChangeLog: 2019-10-15 Iain Sandoe <iain@sandoe.co.uk> * config/darwin.c: Update description of fix and continue. From-SVN: r277010
Iain Sandoe committed -
The use of default_binds_local_p had got out of sync with the varasm changes, this restores the call to be direct. In practice, we add some further tests to determine local binding - but this callback is used for the initial assessments made by default_encode_section_info(). gcc/ChangeLog: 2019-10-15 Iain Sandoe <iain@sandoe.co.uk> * config/darwin.c (darwin_binds_local_p): Update to call default_binds_local_p_3 () directly. amend comments. From-SVN: r277009
Iain Sandoe committed -
gcc/testsuite/ChangeLog: * gcc.dg/Wstringop-overflow-17.c: Expect an additional warning. From-SVN: r277008
Martin Sebor committed -
2019-10-15 Richard Biener <rguenther@suse.de> * lto-streamer-out.c (lto_variably_modified_type_p): New. (tree_is_indexable): Use it. * tree-streamer-out.c (pack_ts_type_common_value_fields): Stream variably_modified_type_p as TYPE_LANG_FLAG_0. * tree-streamer-in.c (unpack_ts_type_common_value_fields): Likewise. From-SVN: r277005
Richard Biener committed -
gcc/fortran PR fortran/65438 * openmp.c (check_array_not_assumed): Remove pointer check. Co-Authored-By: Tobias Burnus <tobias@codesourcery.com> From-SVN: r277000
James Norris committed -
2019-10-15 Bill Schmidt <wschmidt@linux.ibm.com> PR target/92093 * gcc.target/powerpc/pr91275.c: Fix type and endian issues. From-SVN: r276999
Bill Schmidt committed -
https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01083.html This patch, from the modules branch, breaks out function cloning from the method vector updating. We have a new function, build_clones, which does the building, returning a count of the number of clones (2 or 3). clone_function_decl separately adds them to the method vector, if they should be added. I suppose this could have used FOR_EVERY_CLONE, but I went with the counting scheme. * class.c (build_clones): Break out of clone_function_decl. Just build the clones. (clone_function_decl): Call build_clones, then maybe add them to the method vector. From-SVN: r276998
Nathan Sidwell committed -
2019-10-15 Jozef Lawrynowicz <jozef.l@mittosystems.com> * config/msp430/msp430.md (zero_extendqipsi2): New. (zero_extendqisi2): Optimize case where src register and base dst register are the same. (zero_extendhipsi2): Don't use 430X insn for rYs->r case. (zero_extendpsisi2): Optimize r->m case. Add unnamed insn patterns to catch insns combine searches for when optimizing pointer manipulation. From-SVN: r276997
Jozef Lawrynowicz committed -
2019-10-15 Jozef Lawrynowicz <jozef.l@mittosystems.com> * config/msp430/msp430.md: Group zero_extend* insns together. From-SVN: r276996
Jozef Lawrynowicz committed -
2019-10-15 Jozef Lawrynowicz <jozef.l@mittosystems.com> * config/msp430/constraints.md: Allow post_inc operand for "Ya" constraint. * config/msp430/msp430.c (msp430_legitimate_address_p): Handle POST_INC. (msp430_subreg): Likewise. (msp430_split_addsi): Likewise. (msp430_print_operand_addr): Likewise. * config/msp430/msp430.h (HAVE_POST_INCREMENT): Define. (USE_STORE_POST_INCREMENT): Define. * config/msp430/msp430.md: Use the msp430_general_dst_operand or msp430_general_dst_nonv_operand predicates for the lvalues of insns. * config/msp430/predicates.md (msp430_nonpostinc_operand): New. (msp430_general_dst_operand): New. (msp430_general_dst_nonv_operand): New. (msp430_nonsubreg_operand): Remove. (msp430_nonsubreg_dst_operand): New. (msp430_nonsubreg_or_imm_operand): Allow reg or mem operands in place of defunct msp430_nonsubreg_operand. (msp430_nonsubregnonpostinc_or_imm_operand): New. From-SVN: r276995
Jozef Lawrynowicz committed -
https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01080.html looking up a line map takes a non-constant line_maps object, which is confusing. This makes the caching fields mutable, so permits a constant object, as one might expect for a lookup. * include/line-map.h (struct maps_info_ordinary): Make cache mutable. (struct maps_info_macro): Likewise. (LINEMAPS_CACHE): Remove non-ref accessor. Constify ref accessor. (LINEMAPS_ORDINARY_CACHE, LINEMAPS_MACRO_CACHE): Likewise. (LINEMAPS_ORDINARY_MAP_AT, LINEMAPS_MACRO_MAP_AT): Use LINEMAPS_USED and LINEMAPS_MAP_AT. (linemap_lookup): Constify line_map arg. linemap.c (linemap_ordinary_map_lookup, linemap_macro_map_lookup): Constify line_map arg. From-SVN: r276994
Nathan Sidwell committed -
2019-10-15 Richard Biener <rguenther@suse.de> PR tree-optimization/91929 * tree-ssa-pre.c (pre_expr_d::loc): New member. (get_or_alloc_expr_for_name): Initialize it. (get_or_alloc_expr_for_constant): Likewise. (phi_translate_1): Copy it. (create_expression_by_pieces): Use the original location of the expression for the inserted stmt. (compute_avail): Record the location of the stmt for the expressions created. From-SVN: r276993
Richard Biener committed -
https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01069.html build_clone is recursive when applied to a template, but I found the control flow confusing. this makes it clearer and moves some decls to their initializers. * class.c (build_clone): Refactor to clarify recursiveness. From-SVN: r276992
Nathan Sidwell committed -
2019-10-15 Richard Biener <rguenther@suse.de> PR testsuite/92048 * gcc.dg/vect/fast-math-vect-pr29925.c: Avoid unrolling of inner loop. From-SVN: r276991
Richard Biener committed
-