1. 12 Nov, 2019 4 commits
    • [RS6000] PC-relative TLS support · 2965eaa8
      Supporting TLS for -mpcrel turns out to be relatively simple.  The
      existing TLSGD and TLSLD unspecs happily can have their GOT pointer
      reg element replaced with zero, refelecting the fact that optimisation
      of calls to __tls_get_addr when pc-rel won't use the GOT pointer.
      Some other insns also can be reused, and just a few added.
      
      	* config/rs6000/predicates.md (unspec_tls): Allow const0_rtx for got
      	element of unspec vec.
      	* config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Support
      	PC-relative TLS.
      	* config/rs6000/rs6000.md (UNSPEC_TLSTLS_PCREL): New unspec.
      	(tls_gd_pcrel, tls_ld_pcrel): New insns.
      	(tls_dtprel, tls_tprel): Set attr prefixed when tls_size is not 16.
      	(tls_got_tprel_pcrel, tls_tls_pcrel): New insns.
      
      From-SVN: r278076
      Alan Modra committed
    • [RS6000] Remove TARGET_TLS_MARKERS and require binutils 2.20 · ed2181fc
      This patch removes !TARGET_TLS_MARKERS support.  -mtls-markers (and
      -mno-tls-markers) disappear as valid options too, because I figure
      they haven't been used too much except by people testing the
      compiler.
      
      	* config/rs6000/rs6000.opt (mtls-markers): Delete.
      	* config/rs6000/rs6000.h (TARGET_TLS_MARKERS): Don't define.
      	(IS_NOMARK_TLSGETADDR): Likewise.
      	* config/rs6000/rs6000-protos.h (rs6000_output_tlsargs): Delete.
      	* config/rs6000/rs6000.c (rs6000_output_tlsargs): Delete.
      	(rs6000_legitimize_tls_address): Remove !TARGET_TLS_MARKERS code.
      	(rs6000_call_template_1): Delete TARGET_TLS_MARKERS test and
      	allow other UNSPECs besides UNSPEC_TLSGD and UNSPEC_TLSLD.
      	(rs6000_indirect_call_template_1): Likewise.
      	(rs6000_pltseq_template): Likewise.
      	(rs6000_opt_vars): Remove "tls-markers" entry.
      	* config/rs6000/rs6000.md (tls_gd<bits>): Replace TARGET_TLS_MARKERS
      	with TARGET_ELF.
      	(tls_gd_high<bits>, tls_gd_low<bits>): Likewise.
      	(tls_ld<bits>, tls_ld_high<bits>, tls_ld_low<bits>): Likewise.
      	(pltseq_plt_pcrel<mode>): Likewise.
      	(call_value_local32): Remove IS_NOMARK_TLSGETADDR predicate test.
      	(call_value_local64): Likewise.
      	(call_value_indirect_nonlocal_sysv<mode>): Remove IS_NOMARK_TLSGETADDR
      	output and length attribute sub-expression.
      	(call_value_nonlocal_sysv<mode>),
      	(call_value_nonlocal_sysv_secure<mode>),
      	(call_value_local_aix<mode>, call_value_nonlocal_aix<mode>),
      	(call_value_indirect_aix<mode>, call_value_indirect_elfv2<mode>),
      	(call_value_indirect_pcrel<mode>): Likewise.
      	* doc/install.texi (powerpc-*-*): Require binutils-2.20.
      	* configure.ac (HAVE_AS_TLS_MARKERS): Delete test.
      	* configure: Regenerate.
      	* config.in: Regenerate.
      
      From-SVN: r278075
      Alan Modra committed
    • Daily bump. · a2615b06
      From-SVN: r278074
      GCC Administrator committed
  2. 11 Nov, 2019 26 commits
    • libgo: fix DejaGNU testsuite compiler when using build sysroot · b72813a6
          
          Patch by Maciej W. Rozycki.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/206577
      
      From-SVN: r278070
      Ian Lance Taylor committed
    • Add prefixed insn support for stack_protect_setdi & stack_protect_testdi · ce6a6c00
      2019-11-11  Michael Meissner  <meissner@linux.ibm.com>
      
      	* config/rs6000/predicates.md (prefixed_memory): New predicate.
      	* config/rs6000/rs6000.md (stack_protect_setdi): Deal with either
      	address being a prefixed load/store.
      	(stack_protect_testdi): Deal with either address being a prefixed
      	load.
      
      From-SVN: r278069
      Michael Meissner committed
    • re PR c++/92447 (ICE in poplevel, at cp/decl.c:585) · 48042bd4
      	PR c++/92447
      	* decl.c (finish_function): Move ctype initialization before
      	DECL_DELETED_FN handling.
      
      	* g++.dg/cpp0x/pr92447.C: New test.
      
      From-SVN: r278068
      Jakub Jelinek committed
    • re PR bootstrap/92433 (r276645 breaks bootstrap on powerpc) · 4f67832e
      	PR bootstrap/92433
      	* config/rs6000/rs6000-c.c (altivec_build_resolved_builtin): Guard
      	ALTIVEC_BUILTIN_VEC_VCMPGE_P argument swapping with n == 3 check.  Use
      	std::swap.
      
      From-SVN: r278066
      Jakub Jelinek committed
    • c-parser.c (c_parser_translation_unit): Diagnose declare target without… · 7cec9588
      c-parser.c (c_parser_translation_unit): Diagnose declare target without corresponding end declare target.
      
      	* c-parser.c (c_parser_translation_unit): Diagnose declare target
      	without corresponding end declare target.
      
      	* semantics.c (finish_translation_unit): Diagnose declare target
      	without corresponding end declare target.
      
      	* c-c++-common/gomp/declare-target-5.c: New test.
      
      From-SVN: r278065
      Jakub Jelinek committed
    • Fix SLP downward group access classification (PR92420) · 599bd990
      This PR was caused by the SLP handling in get_group_load_store_type
      returning VMAT_CONTIGUOUS rather than VMAT_CONTIGUOUS_REVERSE for
      downward groups.
      
      A more elaborate fix would be to try to combine the reverse permutation
      into SLP_TREE_LOAD_PERMUTATION for loads, but that's really a follow-on
      optimisation and not backport material.  It might also not necessarily
      be a win, if the target supports (say) reversing and odd/even swaps
      as independent permutes but doesn't recognise the combined form.
      
      2019-11-11  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	PR tree-optimization/92420
      	* tree-vect-stmts.c (get_negative_load_store_type): Move further
      	up file.
      	(get_group_load_store_type): Use it for reversed SLP accesses.
      
      gcc/testsuite/
      	* gcc.dg/vect/pr92420.c: New test.
      
      From-SVN: r278064
      Richard Sandiford committed
    • ipa-prop.c (ipa_propagate_indirect_call_infos): Remove ipcp summary. · 98aad294
      	* ipa-prop.c (ipa_propagate_indirect_call_infos): Remove ipcp
      	summary.
      	(ipcp_transformation_t::duplicate): Break out from ...
      	(ipa_node_params_t::duplicate): ... here; add copying of agg
      	replacements.
      	* ipa-prop.h (ipcp_transformation): Add constructor and destructor.
      	(ipcp_transformation_t): Add duplicate.
      
      From-SVN: r278062
      Jan Hubicka committed
    • Bump minimum MPFR version to 3.1.0 · 8be34204
      Bump the minimum MPFR version to 3.1.0, released 2011-10-03. With this
      requirement one can still build GCC with the operating system provided
      MPFR on old but still supported operating systems like SLES 12 (MPFR
      3.1.2) or RHEL/CentOS 7.x (MPFR 3.1.1).
      
      This allows removing some code in the Fortran frontend, as well as
      fixing PR 91828.
      
      ChangeLog:
      
      2019-11-11  Janne Blomqvist  <jb@gcc.gnu.org>
      
      	PR fortran/91828
      	* configure.ac: Bump minimum MPFR to 3.1.0, recommended to 3.1.6+.
      	* configure: Regenerated.
      
      gcc/ChangeLog:
      
      2019-11-11  Janne Blomqvist  <jb@gcc.gnu.org>
      
      	PR fortran/91828
      	* doc/install.texi: Document that the minimum MPFR version is
      	3.1.0.
      
      gcc/fortran/ChangeLog:
      
      2019-11-11  Janne Blomqvist  <jb@gcc.gnu.org>
      
      	PR fortran/91828
      	* simplify.c (gfc_simplify_fraction): Remove fallback path for
      	MPFR < 3.1.0.
      
      From-SVN: r278058
      Janne Blomqvist committed
    • [ARC] Fix movsi_ne pattern. · 5fcb3f62
      The movsi_ne variants are in a wrong order, leading to wrong
      computation of the internal attribute "cond". Hence, to errors when
      outputting annul-true or annul-false instructions.
      
      gcc/
      xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>
      	    Shahab Vahedi  <shahab@synopsys.com>
      
      	* config/arc/arc.md (movsi_ne): Reorder instruction variants.
      
      testsuite/
      xxxx-xx-xx  Shahab Vahedi  <shahab@synopsys.com>
      
      	* gcc.target/arc/delay-slot-limm.c: New test.
      
      From-SVN: r278057
      Claudiu Zissulescu committed
    • [ARC] Fix legitimize pic address. · 3a6dd06b
      There are cases when an pic address gets complicated, and it needs to
      be resolved via force_reg function found in
      prepare_move_operands. When this happens, we need to disambiguate the
      pic address and re-legitimize it.
      
      gcc/
      xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>
      
      	* config/arc/arc.c (arc_legitimize_pic_address): Consider UNSPECs
      	as well, if interesting recover the symbol and re-legitimize the
      	pic address.
      
      gcc/testsuite/
      xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>
      
      	* gcc.target/arc/pic-2.c: New file.
      
      From-SVN: r278056
      Claudiu Zissulescu committed
    • Fix commit for PR fortran/92142 - CFI_setpointer corrupts descriptor · e22c2220
      2019-11-11  Tobias Burnus  <tobias@codesourcery.com>
                  Mark Eggleston  <mark.eggleston@codethink.com>
      
              PR fortran/92142
              * gcc/testsuite/gfortran.dg/ISO_Fortran_binding_16.f90:
              Correct dg-additional-sources.
      
      
      Co-Authored-By: Mark Eggleston <mark.eggleston@codethink.com>
      
      From-SVN: r278055
      Tobias Burnus committed
    • Relax lto-dump.o dependency. · fe1d1a8b
      2019-11-11  Martin Liska  <mliska@suse.cz>
      
      	* Make-lang.in: Relax dependency of lto-dump.o to
      	LTO_OBJS which will allow faster linking (mainly with LTO).
      
      From-SVN: r278054
      Martin Liska committed
    • Sort debug counter names. · cf18754d
      2019-11-11  Martin Liska  <mliska@suse.cz>
      
      	* dbgcnt.def (DEBUG_COUNTER): Sort counters
      	alphabetically.
      
      From-SVN: r278053
      Martin Liska committed
    • Update link to "Why not LGPL". · cb6b5afe
      	* doc/xml/gnu/gpl-3.0.xml: Adjust link to "Why not LGPL".
      
      From-SVN: r278051
      Gerald Pfeifer committed
    • [vect]Account for epilogue's peeling for gaps when checking if we have enough · 87b47251
      niters for epilogue
      
      gcc/ChangeLog:
      2019-11-11  Andre Vieira  <andre.simoesdiasvieira@arm.com>
      
      	* tree-vect-loop-manip.c (vect_do_peeling): Take epilogue gaps into
      	account when checking if there are enough iterations to vectorize
      	epilogue.
      
      gcc/testsuite/ChangeLog:
      2019-11-11  Andre Vieira  <andre.simoesdiasvieira@arm.com>
      
      	* gcc.dg/vect/vect-reduc-epilogue-gaps.c: New test.
      
      From-SVN: r278049
      Andre Vieira committed
    • PR fortran/92142 - CFI_setpointer corrupts descriptor · 3f246567
      2019-11-11  José Rui Faustino de Sousa  <jrfsousa@gmail.com>
      
              libgfortran/
              PR fortran/92142
              * runtime/ISO_Fortran_binding.c (CFI_setpointer): Don't
              override descriptor attribute; with -fcheck, check that
              it is a pointer.
      
              gcc/testsuite/
              PR fortran/92142
              * gcc/testsuite/gfortran.dg/ISO_Fortran_binding_16.c: New.
              * gcc/testsuite/gfortran.dg/ISO_Fortran_binding_16.f90: New.
              * gcc/testsuite/gfortran.dg/ISO_Fortran_binding_10.c: Correct
              upper bounds for case 0.
      
      From-SVN: r278048
      José Rui Faustino de Sousa committed
    • Fix OpenACC directives nesting in 'gfortran.dg/goacc/common-block-1.f90',… · a5aeee56
      Fix OpenACC directives nesting in 'gfortran.dg/goacc/common-block-1.f90', 'gfortran.dg/goacc/common-block-2.f90'
      
      	gcc/testsuite/
      	* gfortran.dg/goacc/common-block-1.f90: Fix OpenACC directives
      	nesting.
      	* gfortran.dg/goacc/common-block-2.f90: Likewise.
      
      From-SVN: r278047
      Thomas Schwinge committed
    • Fortran] Support absent optional args with use_device_{ptr,addr} · a2c26c50
      2019-11-11  Tobias Burnus  <tobias@codesourcery.com>
                  Kwok Cheung Yeung  <kcy@codesourcery.com>
      
              gcc/
              * langhooks-def.h (LANG_HOOKS_OMP_CHECK_OPTIONAL_ARGUMENT):
              Renamed from LANG_HOOKS_OMP_IS_OPTIONAL_ARGUMENT; update define.
              (LANG_HOOKS_DECLS): Rename also here.
              * langhooks.h (lang_hooks_for_decls): Rename
              omp_is_optional_argument to omp_check_optional_argument; take
              additional bool argument.
              * omp-general.h (omp_check_optional_argument): Likewise.
              * omp-general.h (omp_check_optional_argument): Likewise.
              * omp-low.c (lower_omp_target): Update calls; handle absent
              Fortran optional arguments with USE_DEVICE_ADDR/USE_DEVICE_PTR.
      
              gcc/fortran/
              * trans-expr.c (gfc_conv_expr_present): Check for DECL_ARTIFICIAL
              for the VALUE hidden argument avoiding -fallow-underscore issues.
              * trans-decl.c (create_function_arglist): Also set
              GFC_DECL_OPTIONAL_ARGUMENT for per-value arguments.
              * f95-lang.c (LANG_HOOKS_OMP_CHECK_OPTIONAL_ARGUMENT):
              Renamed from LANG_HOOKS_OMP_IS_OPTIONAL_ARGUMENT; point
              to gfc_omp_check_optional_argument.
              * trans.h (gfc_omp_check_optional_argument): Subsitutes
              gfc_omp_is_optional_argument declaration.
              * trans-openmp.c (gfc_omp_is_optional_argument): Make static.
              (gfc_omp_check_optional_argument): New function.
      
              libgomp/
              * testsuite/libgomp.fortran/use_device_ptr-optional-1.f90: Extend.
              * testsuite/libgomp.fortran/use_device_ptr-optional-2.f90: New.
      
      
      Co-Authored-By: Kwok Cheung Yeung <kcy@codesourcery.com>
      
      From-SVN: r278046
      Tobias Burnus committed
    • Torture testing: 'libgomp.fortran/target9.f90' · bfa1837b
      	libgomp/
      	* testsuite/libgomp.fortran/target9.f90: Specify 'dg-do run'.
      
      From-SVN: r278045
      Thomas Schwinge committed
    • Torture testing: 'libgomp.fortran/use_device_addr-3.f90',… · 6d4868f3
      Torture testing: 'libgomp.fortran/use_device_addr-3.f90', 'libgomp.fortran/use_device_addr-4.f90', 'libgomp.fortran/use_device_ptr-1.f90'
      
      	libgomp/
      	* testsuite/libgomp.fortran/use_device_addr-3.f90: Specify 'dg-do
      	run'.
      	* testsuite/libgomp.fortran/use_device_addr-4.f90: Likewise.
      	* testsuite/libgomp.fortran/use_device_ptr-1.f90: Likewise.
      
      From-SVN: r278044
      Thomas Schwinge committed
    • [PR87833] x86: Put -fPIC and -shared the last to create offload image · ad65b427
      On x86, since -fPIC and -shared should be used to create offload image,
      we put them the last to properly create offload image.
      
      2019-11-11  H.J. Lu  <hjl.tools@gmail.com>
      
      	PR target/87833
      	* config/i386/intelmic-mkoffload.c (prepare_target_image): Put
      	-fPIC and -shared the last to create offload image.
      
      From-SVN: r278041
      H.J. Lu committed
    • Assert 'offset2' instead of 'offset' in 'gcc/gimplify.c:gimplify_scan_omp_clauses' · d9945c88
      ... to fix a long-time typo/copy'n'past-o.
      
      	gcc/
      	* gimplify.c (gimplify_scan_omp_clauses): Assert 'offset2' instead
      	of 'offset'.
      
      From-SVN: r278038
      Thomas Schwinge committed
    • [build] Properly track GCC language configure fragments · 223bf296
      The 'gcc/configure' script sources all 'gcc/*/config-lang.in' files, but fails
      to emit such dependency information into the build machinery.  That means,
      currently, when something gets changed in a 'gcc/*/config-lang.in' file, this
      is not noticed, and doesn't propagate through the build machinery.
      
      Handling of configure fragments is modelled in the same way as it already
      exists for Makefile fragments.
      
      	gcc/
      	* Makefile.in (LANG_CONFIGUREFRAGS): Define.
      	(config.status): Use/depend on it.
      	* configure.ac (all_lang_configurefrags): Track, 'AC_SUBST'.
      	* configure: Regenerate.
      
      From-SVN: r278035
      Thomas Schwinge committed
    • 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
  3. 10 Nov, 2019 10 commits