1. 11 Nov, 2019 3 commits
    • rs6000: Refine small loop unroll in loop_unroll_adjust hook · 48f65795
      In this patch, loop unroll adjust hook is introduced for powerpc.  We
      can do target related heuristic adjustment in this hook.  In this patch,
      -funroll-loops is enabled for small loops at O2 and above with an option
      -munroll-small-loops to guard the small loops unrolling, and it works
      fine with -flto.
      
      
      gcc/
      2019-11-11  Jiufu Guo  <guojiufu@linux.ibm.com>
      
      	PR tree-optimization/88760
      	* gcc/config/rs6000/rs6000.opt (-munroll-only-small-loops): New option.
      	* gcc/common/config/rs6000/rs6000-common.c
      	(rs6000_option_optimization_table) [OPT_LEVELS_2_PLUS_SPEED_ONLY]:
      	Turn on -funroll-loops and -munroll-only-small-loops.
      	[OPT_LEVELS_ALL]: Turn off -fweb and -frename-registers.
      	* config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
      	set of PARAM_MAX_UNROLL_TIMES and PARAM_MAX_UNROLLED_INSNS.
      	Turn off -munroll-only-small-loops for explicit -funroll-loops.
      	(TARGET_LOOP_UNROLL_ADJUST): Add loop unroll adjust hook.
      	(rs6000_loop_unroll_adjust): Define it.  Use -munroll-only-small-loops.
      
      gcc.testsuite/
      2019-11-11  Jiufu Guo  <guojiufu@linux.ibm.com>
      
      	PR tree-optimization/88760
      	* gcc.dg/pr59643.c: Update back to r277550.
      
      From-SVN: r278034
      Jiufu Guo committed
    • [rs6000] Make load cost a bit more in vectorization cost · 103cba80
      To align with rs6000_insn_cost costing more for load type insns,
      this patch is to make load insns cost more in vectorization cost
      function.  The latency of load insns is about twice that of
      "simple" instructions; 2 vs. 1 on older cores, and 4 (or so) vs.
      2 on newer cores.  Considering that the result of load usually
      is used somehow later (true-dep) but store won't, we keep the
      store as before.
      
      The SPEC2017 performance evaluation on Power8 shows 525.x264_r
      +9.56%, 511.povray_r +2.08%, 527.cam4_r 1.16% gains, no 
      significant degradation, SPECINT geomean +0.88%, SPECFP geomean
      +0.26%.
      
      The SPEC2017 performance evaluation on Power9 shows no significant
      improvement or degradation, SPECINT geomean +0.04%, SPECFP geomean
      +0.04%.
      
      The SPEC2006 performance evaluation on Power8 shows 454.calculix
      +4.41% gain but 416.gamess -1.19% and 453.povray -3.83% degradation.
      I looked into the two degradation bmks, the degradation were NOT
      due to hotspot changes by vectorization, were all side effects.
      SPECINT geomean +0.10%, SPECFP geomean no changed considering
      the degradation.
      
      gcc/ChangeLog
      
      2019-11-11  Kewen Lin  <linkw@gcc.gnu.org>
      
          * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Make
          scalar_load, vector_load, unaligned_load and vector_gather_load cost
          more to conform hardware latency and insn cost settings.
      
      From-SVN: r278033
      Kewen Lin committed
    • Daily bump. · 4b41bff2
      From-SVN: r278032
      GCC Administrator committed
  2. 10 Nov, 2019 13 commits
    • [Darwin, machopic 11/n] A flag to indicate synbols should be linker-visible. · 34548764
      Some of the solution to PR71767 is incomplete, and we need finer-grained
      control over whether symbols need to be made linker-visible.  This is a
      preparation patch, providing the flag.
      
      gcc/ChangeLog:
      
      2019-11-10  Iain Sandoe  <iain@sandoe.co.uk>
      
      	* config/darwin.h (MACHO_SYMBOL_FLAG_LINKER_VIS): New.
      	(MACHO_SYMBOL_LINKER_VIS_P): New.
      
      From-SVN: r278028
      Iain Sandoe committed
    • Don't print warning when moving to static with -fno-automatic · 15471d58
      As part of PR 91413, GFortran now prints a warning when a variable is
      moved from the stack to static storage. However, when the user
      explicitly specifies that all local variables should be put in static
      storage with the -fno-automatic option, don't print this warning.
      
      Regtested on x86_64-pc-linux-gnu, committed as obvious.
      
      gcc/fortran/ChangeLog:
      
      2019-11-10  Janne Blomqvist  <jb@gcc.gnu.org>
      
      	PR fortran/91413
      	* trans-decl.c (gfc_finish_var_decl): Don't print warning when
      	-fno-automatic is enabled.
      
      From-SVN: r278027
      Janne Blomqvist committed
    • Implement D1957R0, T* to bool should be considered narrowing. · 2806ecbd
      This paper was delayed until the February meeting in Prague so that we could
      get a better idea of what the impact on existing code would actually be.  To
      that end, I'm implementing it now.
      
      	* typeck2.c (check_narrowing): Treat pointer->bool as a narrowing
      	conversion with -std=c++2a.
      
      From-SVN: r278026
      Jason Merrill committed
    • re PR fortran/92123 ([F2018/array-descriptor] Scalar allocatable/pointer with… · 0313a84a
      re PR fortran/92123 ([F2018/array-descriptor]  Scalar allocatable/pointer with array descriptor (via bind(C)): ICE with select rank or error scalar variable with POINTER or ALLOCATABLE in procedure with BIND(C) is not yet supported)
      
      2019-11-10  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/92123
      	*decl.c (gfc_verify_c_interop_param): Remove error asserting
      	that pointer or allocatable variables in a bind C procedure are
      	not supported. Delete some trailing spaces.
      	* trans-stmt.c (trans_associate_var): Correct the attempt to
      	treat scalar pointer or allocatable temporaries as if they are
      	array descriptors.
      
      2019-11-10  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/92123
      	* gfortran.dg/bind_c_procs_3.f90 : New test.
      	* gfortran.dg/ISO_Fortran_binding_15.c : New test.
      	* gfortran.dg/ISO_Fortran_binding_15.f90 : Additional source.
      
      From-SVN: r278025
      Paul Thomas committed
    • [LRA] Do not use eliminable registers for spilling · 4b77a380
      The liveness of eliminable hard registers is not tracked by LRA between
      basic blocks, so they should not be used as spill registers as LRA may
      decide to allocate them to pseudos while the spilled value is still live.
      
      2019-11-10  Kwok Cheung Yeung  <kcy@codesourcery.com>
      
      	gcc/
      	* lra-spills.c (assign_spill_hard_regs): Do not spill into
      	registers in eliminable_regset.
      
      From-SVN: r278024
      Kwok Cheung Yeung committed
    • Manually CSE sreal frequency calculations · b5351388
      	* ipa-inline.c (compute_uninlined_call_time,
      	compute_inlined_call_time): Take edge frequency as
      	parameter rather than computing it by itself.
      	(big_speedup_p, edge_badness): Manually CSE sreal
      	frequency calculations.
      
      From-SVN: r278023
      Jan Hubicka committed
    • Short circuit case where profiles are same. · 65eaab18
              * profile-count.c (profile_count::to_sreal_scale): Short circuit
      	case where profiles are same.
      
      From-SVN: r278022
      Jan Hubicka committed
    • ipa-prop.c (ipa_propagate_indirect_call_infos): Remove ipa edge args summaries… · d40e2362
      ipa-prop.c (ipa_propagate_indirect_call_infos): Remove ipa edge args summaries of inlined edge unless...
      
      	* ipa-prop.c (ipa_propagate_indirect_call_infos): Remove ipa edge
      	args summaries of inlined edge unless it holds info about
      	described reference.
      
      From-SVN: r278020
      Jan Hubicka committed
    • Switch www.hboehm.info to https · 7901a85f
      	* doc/xml/manual/using.xml: Switch www.hboehm.info to https.
      
      From-SVN: r278019
      Gerald Pfeifer committed
    • rs6000: Allow any CC mode in movcc · 7964e40d
      Sometimes combine wants to do a move in CCFPmode, but we don't currently
      handle moves in any CC mode other than CCmode.  Fix that oversight.
      
      
      	* config/rs6000/rs6000.md (CC_any): New mode iterator.
      	(*movcc_internal1): Rename to...
      	(*movcc_<mode> for CC_any): ... this.  Support moves of all CC modes.
      
      From-SVN: r278017
      Segher Boessenkool committed
    • cgraph.h (struct cgraph_node): Add ipcp_clone flag. · 6cf67b62
      
      	* cgraph.h (struct cgraph_node): Add ipcp_clone flag.
      	(cgraph_node::create_virtual_clone): Copy it.
      	* ipa-cp.c (ipcp_versionable_function_p): Watch for missing
      	summaries.
      	(ignore_edge_p): If caller has ipa-cp disabled, skip the edge, too.
      	(ipcp_verify_propagated_values): Do not verify nodes where ipcp
      	is disabled.
      	(propagate_constants_across_call): If callee is not analyzed, give up.
      	(propagate_constants_topo): Lower to bottom latties of all callees of
      	functions with ipa-cp disabled.
      	(ipcp_propagate_stage): Skip functions with ipa-cp disabled.
      	(cgraph_edge_brings_value_p): Check for availability first.
      	(create_specialized_node): Set ipcp_clone.
      	(ipcp_store_bits_results): Check that info is present.
      	* ipa-fnsummary.c (evaluate_properties_for_edge): Do not analyze
      	thunks.
      	(ipa_call_context::duplicate_from, ipa_call_context::equal_to): Be
      	conservative when callee summary is missing.
      	(remap_edge_summaries): Lookup call summary only when needed.
      	* ipa-icf.c (sem_function::param_used_p): Be ready for missing summary.
      	* ipa-prpo.c (ipa_alloc_node_params, ipa_initialize_node_params):
      	Use get_create.
      	(ipa_analyze_node): Use get_create.
      	(propagate_controlled_uses): Do not propagate when function is not
      	analyzed.
      	(ipa_propagate_indirect_call_infos): Remove summary of inline clone.
      	(ipa_read_node_info): Use get_create.
      	* ipa-prop.h (IPA_NODE_REF): Use get.
      	(IPA_NODE_REF_GET_CREATE): New.
      
      From-SVN: r278016
      Jan Hubicka committed
    • Daily bump. · 64166bf0
      From-SVN: r278013
      GCC Administrator committed
  3. 09 Nov, 2019 9 commits
  4. 08 Nov, 2019 15 commits
    • symtab.c: Fix comment typos. · dfea3d6f
      	* symtab.c: Fix comment typos.
      	* cgraphunit.c: Likewise.
      	* cgraph.h: Likewise.
      	* cgraphclones.c: Likewise.
      	* cgraph.c: Likewise.
      	* varpool.c: Likewise.
      	* tree-ssa-strlen.c: Likewise.
      	* ipa-sra.c: Likewise.
      	(scan_expr_access, check_all_callers_for_issues): Fix typo
      	in a dump message.
      
      From-SVN: r277995
      Jakub Jelinek committed
    • dec_char_conversion_in_assignment_4.f90: Use dg-do compile instead of dg-do run. · a63d6356
      	* gfortran.dg/dec_char_conversion_in_assignment_4.f90: Use
      	dg-do compile instead of dg-do run.
      	* gfortran.dg/dec_char_conversion_in_data_3.f90: Likewise.
      
      From-SVN: r277994
      Jakub Jelinek committed
    • [Darwin] Add include guard to darwin-protos.h · 9342ec4d
      The Darwin protos header is missing an include guard, this adds one.
      
      gcc/ChangeLog:
      
      2019-11-08  Iain Sandoe  <iain@sandoe.co.uk>
      
      	* config/darwin-protos.h: Add include quard.
      
      From-SVN: r277993
      Iain Sandoe committed
    • PR c++/92215 - flawed diagnostic for bit-field with non-integral type. · 65471f09
      I noticed that for code like
      
        struct S {
          int *foo : 3;
        };
      
      we generate nonsensical
      
        r.C:2:8: error: function definition does not declare parameters
            2 |   int *foo : 3;
      
      It talks about a function because after parsing the declspecs of 'foo' we don't
      see either ':' or "name :", so we think it's not a bit-field decl.  So we parse
      the declarator and since a ctor-initializer begins with a ':', we try to parse
      it as a function body, generating the awful diagnostic.  With this patch, we
      issue:
      
        r.C:2:8: error: bit-field ‘foo’ has non-integral type ‘int*’
            2 |   int *foo : 3;
      
      	* parser.c (cp_parser_member_declaration): Add a diagnostic for
      	bit-fields with non-integral types.
      
      	* g++.dg/diagnostic/bitfld4.C: New test.
      
      From-SVN: r277991
      Marek Polacek committed
    • PR c++/92058 - constinit malfunction in static data member. · a2dbbda8
      	* g++.dg/cpp2a/constinit15.C: New test.
      
      From-SVN: r277990
      Marek Polacek committed
    • Modify range_operator::fold_range() and wi_fold () to return via reference. · bb74ef9e
      2019-11-08  Andrew MacLeod <amacleod@redhat.com>
      
      	* range-op.h (range_operator::fold_range): Return result in a
      	reference parameter instead of by value.
      	(range_operator::wi_fold): Same.
      	* range-op.cc (range_operator::wi_fold): Return result in a reference
      	parameter instead of by value.
      	(range_operator::fold_range): Same.
      	(value_range_from_overflowed_bounds): Same.
      	(value_range_with_overflow): Same
      	(create_possibly_reversed_range): Same.
      	(operator_equal::fold_range): Same.
      	(operator_not_equal::fold_range): Same.
      	(operator_lt::fold_range): Same.
      	(operator_le::fold_range): Same.
      	(operator_gt::fold_range): Same.
      	(operator_ge::fold_range): Same.
      	(operator_plus::wi_fold): Same.
      	(operator_plus::op1_range): Change call to fold_range.
      	(operator_plus::op2_range): Change call to fold_range.
      	(operator_minus::wi_fold): Return result via reference parameter.
      	(operator_minus::op1_range): Change call to fold_range.
      	(operator_minus::op2_range): Change call to fold_range.
      	(operator_min::wi_fold): Return result via reference parameter.
      	(operator_max::wi_fold): Same.
      	(cross_product_operator::wi_cross_product): Same.
      	(operator_mult::wi_fold): Same.
      	(operator_div::wi_fold): Same.
      	(operator_div op_floor_div): Fix whitespace.
      	(operator_exact_divide::op1_range): Change call to fold_range.
      	(operator_lshift::fold_range): Return result via reference parameter.
      	(operator_lshift::wi_fold): Same.
      	(operator_rshift::fold_range): Same.
      	(operator_rshift::wi_fold): Same.
      	(operator_cast::fold_range): Same.
      	(operator_cast::op1_range): Change calls to fold_range.
      	(operator_logical_and::fold_range): Return result via reference.
      	(wi_optimize_and_or): Adjust call to value_range_with_overflow.
      	(operator_bitwise_and::wi_fold): Return result via reference.
      	(operator_logical_or::fold_range): Same.
      	(operator_bitwise_or::wi_fold): Same.
      	(operator_bitwise_xor::wi_fold): Same.
      	(operator_trunc_mod::wi_fold): Same.
      	(operator_logical_not::fold_range): Same.
      	(operator_bitwise_not::fold_range): Same.
      	(operator_bitwise_not::op1_range): Change call to fold_range.
      	(operator_cst::fold_range): Return result via reference.
      	(operator_identity::fold_range): Same.
      	(operator_abs::wi_fold): Same.
      	(operator_absu::wi_fold): Same.
      	(operator_negate::fold_range): Same.
      	(operator_negate::op1_range): Change call to fold_range.
      	(operator_addr_expr::fold_range): Return result via reference.
      	(operator_addr_expr::op1_range): Change call to fold_range.
      	(operator_pointer_plus::wi_fold): Return result via reference.
      	(operator_pointer_min_max::wi_fold): Same.
      	(operator_pointer_and::wi_fold): Same.
      	(operator_pointer_or::wi_fold): Same.
      	(range_op_handler): Change call to fold_range.
      	(range_cast): Same.
      	* tree-vrp.c (range_fold_binary_symbolics_p): Change call to
      	fold_range.
      	(range_fold_unary_symbolics_p): Same.
      	(range_fold_binary_expr): Same.
      	(range_fold_unary_expr): Same.
      
      From-SVN: r277979
      Andrew MacLeod committed
    • Use correct vector type in neutral_op_for_slp_reduction · d308ca27
      With the new reduction vectype handling, neutral_op_for_slp_reduction
      needs to know whether the caller is using STMT_VINFO_REDUC_VECTYPE
      (for an epilogue value) or STMT_VINFO_VECTYPE (for a PHI argument).
      
      This fixes various gcc.target/aarch64/sve/slp_* tests.
      
      2019-11-08  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* tree-vect-loop.c (neutral_op_for_slp_reduction): Take the
      	vector type as an argument rather than reading it from the
      	stmt_vec_info.
      	(vect_create_epilog_for_reduction): Update accordingly.
      	(vectorizable_reduction): Likewise.
      	(vect_transform_cycle_phi): Likewise.
      
      From-SVN: r277977
      Richard Sandiford committed
    • rs6000: Fix branch_comparison_operator · fd14d6cb
      
      	* config/rs6000/predicates.md (branch_comparison_operator): Allow only
      	the comparison codes that make sense for the mode used, and only the
      	codes that can be done with a single branch instruction.
      
      From-SVN: r277976
      Segher Boessenkool committed
    • Allow CHARACTER literals in assignments and data statements. · 2afeb1ca
      Allows character literals to used to assign values to non-character variables
      in the same way that Hollerith constants are used. In addition character
      literals can be used in data statements just like Hollerith constants.
      
      Warnings of such use are output to discourage this usage as it is a non-standard
      legacy feature and must be explicitly enabled.
       
      Enabled by -fdec and -fdec-char-conversions.
      
      
      Co-Authored-By: Jim MacArthur <jim.macarthur@codethink.co.uk>
      
      From-SVN: r277975
      Mark Eggleston committed
    • [vect] PR 92351: When peeling for alignment make alignment of epilogues unknown · 4e9d58d1
      gcc/ChangeLog:
      2019-11-08  Andre Vieira  <andre.simoesdiasvieira@arm.com>
      
      	PR tree-optimization/92351
      	* tree-vect-data-refs.c (vect_compute_data_ref_alignment): When we are
      	peeling the main loop for alignment, make sure to set the misalignment
      	of the epilogue's data references to DR_MISALIGNMENT_UNKNOWN.
      
      gcc/testsuite/ChangeLog:
      2019-11-08  Andre Vieira  <andre.simoesdiasvieira@arm.com>
      
      	PR tree-optimization/92351
      	* gcc.dg/vect/vect-peel-2.c: Disable epilogue vectorization and
      	split the source of this test to...
      	* gcc.dg/vect/vect-peel-2-src.c: ... This.
      	* gcc.dg/vect/vect-peel-2-epilogues.c: New test.
      
      From-SVN: r277974
      Andre Vieira committed
    • dbgcnt.def (ivopts_loop): Add. · 14df3a17
      2019-11-08  Richard Biener  <rguenther@suse.de>
      
      	* dbgcnt.def (ivopts_loop): Add.
      	* tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize): Check
      	ivopts_loop before optimizing a loop.
      
      From-SVN: r277973
      Richard Biener committed
    • re PR ipa/92409 (r277920 causes ICE in gcc.dg/cast-function-1.c) · e7399b54
      2019-11-08  Richard Biener  <rguenther@suse.de>
      
      	PR ipa/92409
      	* tree-inline.c (declare_return_variable): Properly handle
      	type mismatches for the return slot.
      
      From-SVN: r277972
      Richard Biener committed
    • overflow-1.c: Add -fno-pie to the options. · 03a05fd3
      	* gcc.target/sparc/overflow-1.c: Add -fno-pie to the options.
      	* gcc.target/sparc/overflow-2.c: Likewise.
      
      From-SVN: r277969
      Eric Botcazou committed
    • re PR target/92095 (internal error with -O1 -mcpu=niagara2 -fPIE) · 0a83f1a4
      	PR target/92095
      	* config/sparc/sparc-protos.h (output_load_pcrel_sym): Declare.
      	* config/sparc/sparc.c (sparc_cannot_force_const_mem): Revert latest
       	change.
      	(got_helper_needed): New static variable.
      	(output_load_pcrel_sym): New function.
      	(get_pc_thunk_name): Remove after inlining...
      	(load_got_register): ...here.  Rework the initialization of the GOT
      	register and of the GOT helper.
      	(save_local_or_in_reg_p): Test the REGNO of the GOT register.
      	(sparc_file_end): Test got_helper_needed to decide whether the GOT
      	helper must be emitted.  Use output_asm_insn instead of fprintf.
      	(sparc_init_pic_reg): In PIC mode, always initialize the PIC register
      	if optimization is enabled.
      	* config/sparc/sparc.md (load_pcrel_sym<P:mode>): Emit the assembly
      	by calling output_load_pcrel_sym.
      
      From-SVN: r277966
      Eric Botcazou committed