1. 10 May, 2019 19 commits
  2. 09 May, 2019 15 commits
    • * de.po, fr.po: Update. · bd0ea08e
      From-SVN: r271045
      Joseph Myers committed
    • compiler: avoid copy for string([]byte) conversion used in map keys · 87436805
          
          If a string([]byte) conversion is used immediately as a key for a
          map read, we don't need to copy the backing store of the byte
          slice, as mapaccess does not keep a reference to it.
          
          The gc compiler does more than this: it also avoids the copy if
          the map key is a composite literal that contains the conversion
          as a field, like, T{ ... { ..., string(b), ... }, ... }. For now,
          we just optimize the simple case, which is probably most common.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/176197
      
      	* go.dg/mapstring.go: New test.
      
      From-SVN: r271044
      Cherry Zhang committed
    • loop.texi: Remove reference to FOR_EACH_LOOP_BREAK. · 08e113f4
      2019-05-09  Bill Schmidt  <wschmidt@linux.ibm.com>
      
      	* doc/loop.texi: Remove reference to FOR_EACH_LOOP_BREAK.
      
      From-SVN: r271042
      Bill Schmidt committed
    • sel-sched: allow negative insn priority (PR 88879) · 41a4d475
      	PR rtl-optimization/88879
      	* sel-sched.c (sel_target_adjust_priority): Remove assert.
      
      From-SVN: r271039
      Alexander Monakov committed
    • [arm] PR target/90405 New test. · bf822e19
      This time really add the test.
      
      gcc/testsuite:
              PR target/90405
              * gcc.target/arm/pr90405.c: New test.
      
      From-SVN: r271037
      Richard Earnshaw committed
    • [arm] PR target/90405 fix regression for thumb1 with -mtpcs-leaf-frame · 4456525c
      -mtpcs-leaf-frame causes an APCS-style backtrace frame to be created
      on the stack.  This should probably be deprecated, but it did reveal
      an issue with the patch I committed previously to improve the code
      generation when pushing high registers, in that
      thumb_find_work_register had a different idea as to which registers
      were available as scratch registers.
      
      The new code actually does a better job of finding a viable work
      register and doesn't rely so much on assumptions about the ABI, so it
      seems better to adapt thumb_find_work_register to the new approach.
      This way we can eliminate some rather crufty code.
      
      gcc:
      	PR target/90405
      	* config/arm/arm.c (callee_saved_reg_p): Move before
      	thumb_find_work_register.
      	(thumb1_prologue_unused_call_clobbered_lo_regs): Move before
      	thumb_find_work_register.  Only call df_get_live_out once.
      	(thumb1_epilogue_unused_call_clobbered_lo_regs): Likewise.
      	(thumb_find_work_register): Use
      	thumb1_prologue_unused_call_clobbered_lo_regs instead of ad hoc
      	algorithms to locate a spare call clobbered reg.
      
      gcc/testsuite:
      	PR target/90405
      	* gcc.target/arm/pr90405.c: New test.
      
      From-SVN: r271036
      Richard Earnshaw committed
    • Support {MIN,MAX}_EXPR in GIMPLE FE. · fd4485aa
      2019-05-09  Martin Liska  <mliska@suse.cz>
      
      	* gimple-pretty-print.c (dump_binary_rhs): Dump MIN_EXPR
      	and MAX_EXPR in GIMPLE FE format.
      2019-05-09  Martin Liska  <mliska@suse.cz>
      
      	* gimple-parser.c (c_parser_gimple_statement): Support __MIN and
      	__MAX.
      	(c_parser_gimple_unary_expression): Parse also binary expression
      	__MIN and __MAX.
      	(c_parser_gimple_parentized_binary_expression): New function.
      2019-05-09  Martin Liska  <mliska@suse.cz>
      
      	* gcc.dg/gimplefe-39.c: New test.
      
      From-SVN: r271035
      Martin Liska committed
    • Support profile (BB counts and edge probabilities) in GIMPLE FE. · d276406a
      2019-05-09  Martin Liska  <mliska@suse.cz>
      
      	* tree-cfg.c (dump_function_to_file): Dump entry BB count.
      	* gimple-pretty-print.c (dump_gimple_bb_header):
      	Dump BB count.
      	(pp_cfg_jump): Dump edge probability.
      	* profile-count.c (profile_quality_as_string): Simplify
      	with a static array.
      	(parse_profile_quality): New function.
      	(profile_count::dump): Simplify with a static array.
      	(profile_count::from_gcov_type): Add new argument.
      	* profile-count.h (parse_profile_quality): Likewise.
      	* predict.h (set_hot_bb_threshold): New.
      	* params.def (PARAM_GIMPLE_FE_COMPUTED_HOT_BB_THRESHOLD):
      	New param.
      	* predict.c (get_hot_bb_threshold): Set from the new param.
      	(set_hot_bb_threshold): New.
      2019-05-09  Martin Liska  <mliska@suse.cz>
      
      	* gimple-parser.c (struct gimple_parser): Add probability.
      	for gimple_parser_edge.
      	(gimple_parser::push_edge): Add new argument probability.
      	(c_parser_gimple_parse_bb_spec): Parse also probability
      	if present.
      	(c_parser_parse_gimple_body): Set edge probability.
      	(c_parser_gimple_compound_statement): Consume token
      	before calling c_parser_gimple_goto_stmt.
      	Parse BB counts.
      	(c_parser_gimple_statement): Pass new argument.
      	(c_parser_gimple_goto_stmt): Likewise.
      	(c_parser_gimple_if_stmt): Likewise.
      	(c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
      	* c-parser.c (c_parser_declaration_or_fndef): Pass
      	hot_bb_threshold argument.
      	* c-tree.h (struct c_declspecs): Add hot_bb_threshold
      	field.
      	(c_parser_gimple_parse_bb_spec_edge_probability): New.
      2019-05-09  Martin Liska  <mliska@suse.cz>
      
      	* gcc.dg/gimplefe-37.c: New test.
      	* gcc.dg/gimplefe-33.c: Likewise.
      
      From-SVN: r271034
      Martin Liska committed
    • 2019-05-09 Paolo Carlini <paolo.carlini@oracle.com> · 555dbc42
            * Fix last ChangeLog entry.
      
      From-SVN: r271033
      Paolo Carlini committed
    • re PR preprocessor/90382 (ICE in linemap_macro_map_loc_to_exp_point, at libcpp/line-map.c:1061) · 1ccebd3f
      /cp
      2019-05-09  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	PR c++/90382
      	Revert:
      	2018-04-26  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	* decl.c (grokdeclarator): Fix value assigned to typespec_loc, use
      	min_location.
      
      /testsuite
      2019-05-09  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	PR c++/90382
      	2018-04-26  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	* g++.dg/diagnostic/trailing1.C: New.
      
      From-SVN: r271032
      Paolo Carlini committed
    • re PR tree-optimization/90395 (ICE: verify_flow_info failed (error: BB 2 cannot… · 362e280d
      re PR tree-optimization/90395 (ICE: verify_flow_info failed (error: BB 2 cannot throw but has an EH edge))
      
      2019-05-09  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/90395
      	* tree-ssa-forwprop.c (pass_forwprop::execute): Do not
      	rewrite vector stores that throw internally.
      
      	* gcc.dg/torture/pr90395.c: New testcase.
      
      From-SVN: r271031
      Richard Biener committed
    • Clean up MPX-related stuff: CIF_CHKP · 8de916aa
      ..., which was forgotten in recent r268844.
      
      	gcc/
      	* cif-code.def (CHKP): Remove.
      
      From-SVN: r271029
      Thomas Schwinge committed
    • [PR89221] Continue to default to '--disable-frame-pointer' for x86 GNU systems · 7d48b7ad
      The recent trunk r270914 for PR89221 "--enable-frame-pointer does not work as
      intended" fixed a scripting defect in the x86 '--enable-frame-pointer'
      handling.
      
      This has the side effect that, for example, for '--target=i686-gnu' this is now
      enabled by default: 'USE_IX86_FRAME_POINTER=1' is added to 'tm_defines'.  Given
      that it's highly unlikely that anyone would now suddenly want
      '--enable-frame-pointer' as the default for any kind of GNU system, I'm
      changing the default back for GNU systems, to match that of a 'target_os' of
      'linux* | darwin[8912]*'.
      
      	gcc/
      	PR target/89221
      	* configure.ac (--enable-frame-pointer): Disable by default for
      	GNU systems.
      	* configure: Regenerate.
      
      From-SVN: r271028
      Thomas Schwinge committed
    • stl_deque.h (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)): Make hidden friend. · b2536b7c
      2019-05-09  François Dumont  <fdumont@gcc.gnu.org>
      
      	* include/bits/stl_deque.h
      	(operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
      	Make hidden friend.
      	(operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
      	Likewise.
      	(operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
      	Likewise.
      	(operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
      	Likewise.
      	(operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
      	Likewise.
      	(operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
      	Likewise.
      	(_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
      	copy elision.
      	(_Deque_iterator<>::operator-(difference_type)): Likewise.
      
      From-SVN: r271027
      François Dumont committed
    • Daily bump. · 20a7c51d
      From-SVN: r271026
      GCC Administrator committed
  3. 08 May, 2019 6 commits
    • [RS6000] PR89271, gcc.target/powerpc/vsx-simode2.c · 20d70cd2
      This patch makes a number of corrections to rs6000_register_move_cost,
      adds a new register union class, GEN_OR_VSX_REGS, and adjusts insn
      alternative costs to suit.
      
      The patch initially just corrected register move cost when direct
      moves are available, but that resulted in regressions.  Inspection of
      those regressions showed ALL_REGS being used as the register allocno
      class, which isn't ideal.  gcc/doc/tm.texi says: "You should define a
      class for the union of two classes whenever some instruction allows
      both classes".  Thus, define GEN_OR_VSX_REGS for the register
      allocator.  (IRA wants to use the union of two register classes when
      the costs of the classes are below memory cost, which happens more
      often with the low direct move cost.)
      
      As per https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89271#c11 we ought
      to be returning the minimal cost for union classes.  That can be done
      by rs6000_register_move_cost testing for vsx first, where the number
      of regs for a given mode might be smaller than the same mode in gprs,
      and changing the LINK_OR_CTR_REGS case to exclude SPEC_OR_GEN_REGS and
      NON_FLOAT_REGS.
      
      I removed the VECTOR_MEM_VSX_P test since that leads to silly results
      for scalar mode moves between altivec and float when TARGET_VSX.  eg.
      rs6000_register_move_cost:, ret=2, mode=DF, from=FLOAT_REGS, to=FLOAT_REGS
      rs6000_register_move_cost:, ret=16, mode=DF, from=FLOAT_REGS, to=ALTIVEC_REGS
      rs6000_register_move_cost:, ret=2, mode=DF, from=FLOAT_REGS, to=VSX_REGS
      
      The patch also fixes wrong results for moves within and between any of
      the non-gpr, non-vsx special reg classes.  The comment about "moving
      between two similar registers is just one instruction" is false.  We
      can't move lr to ctr directly, for example.  I believe the intent of
      the "reg_classes_intersect_p (to, from)" was to cover moves within
      float or altivec, so I moved that test inside the code handling vsx,
      and made sure the intersection wasn't anything besides vsx by masking
      off everything else.  Masking isn't strictly necessary at the moment,
      but would be if we create a GEN_OR_ALTIVEC_REGS class some time in the
      future.
      
      TARGET_IRA_CHANGE_PSEUDO_ALLOCNO_CLASS is needed for rs6000 in order
      to fix the 20% cactus_adm spec regression when using GEN_OR_VSX_REGS
      as an allocno class.  It is similar to the aarch64 version but without
      any selection by regno mode if the best class is a union class.
      
      	PR target/89271
      	* config/rs6000/rs6000.h (enum reg_class, REG_CLASS_NAMES),
      	(REG_CLASS_CONTENTS): Add GEN_OR_VSX_REGS class.
      	* config/rs6000/rs6000.c (rs6000_register_move_cost): Correct
      	cost for general <-> vsx when direct moves are available.
      	Cost union classes at minimal cost for any reg in the class.
      	Correct calculation for moves between vsx, float, and altivec.
      	Don't return a low cost for moves between special regs.  Don't
      	use hard coded register numbers.
      	(TARGET_IRA_CHANGE_PSEUDO_ALLOCNO_CLASS): Define.
      	(rs6000_ira_change_pseudo_allocno_class): New function.
      	* config/rs6000/rs6000.md (movsi_internal1, mov<mode>_internal),
      	(movdi_internal32, movdi_internal64): Remove '*' from vsx register
      	alternatives.
      	(movsi_internal1): Don't disparage vector alternatives.
      	(mov<mode>_internal): Likewise, excepting alternative that
      	will be split.
      	* config/rs6000/vsx.md (vsx_splat_<mode>_reg): Don't disparage
      	we <- b alternative.
      
      From-SVN: r271022
      Alan Modra committed
    • compiler: avoid copy for string([]byte) conversion used in string comparison · 3407d165
          
          If a string([]byte) conversion is used immediately in a string
          comparison, we don't need to copy the backing store of the byte
          slice, as the string comparison doesn't hold any reference to
          it. Instead, just create a string header from the byte slice and
          pass it for comparison.
          
          A new type of expression, String_value_expression, is introduced,
          for constructing string headers.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/170894
      
      	* go.dg/cmpstring.go: New test.
      
      From-SVN: r271021
      Cherry Zhang committed
    • re PR fortran/90351 (-fc-prototypes does not dump prototypes for external procedures) · 6328ce1f
      2019-05-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
      
          PR fortran/90351
          PR fortran/90329
          * gfortran.dg/dump-parse-tree.c: Include version.h.
          (gfc_dump_external_c_prototypes): New function.
          (get_c_type_name): Select "char" as a name for a simple char.
          Adjust to handling external functions. Also handle complex.
          (write_decl): Add argument bind_c. Adjust for dumping of external
          procedures.
          (write_proc): Likewise.
          (write_interop_decl): Add bind_c argument to call of write_proc.
          * gfortran.h: Add prototype for gfc_dump_external_c_prototypes.
          * lang.opt: Add -fc-prototypes-external flag.
          * parse.c (gfc_parse_file): Move dumping of BIND(C) prototypes.
          Call gfc_dump_external_c_prototypes if option is set.
          * invoke.texi: Document -fc-prototypes-external.
      
      From-SVN: r271018
      Thomas Koenig committed
    • compiler: generate memmove for non-pointer slice copy · 8ba2bda8
          
          The builtin copy function is lowered to runtime functions
          slicecopy, stringslicecopy, or typedslicecopy. The first two are
          basically thin wrappers of memmove. Instead of making a runtime
          call, we can just use __builtin_memmove. This gives the compiler
          backend opportunities for further optimizations.
          
          Move the lowering of builtin copy function to flatten phase for
          the ease of rewriting.
          
          Also do this optimization for the copy part of append(s1, s2...).
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/170005
      
      From-SVN: r271017
      Ian Lance Taylor committed
    • runtime: use builtin memmove directly · fbe4e644
          
          We can use the intrinsic memmove directly, without going through
          C.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/170004
      
      	* go-gcc.cc (Gcc_backend::Gcc_backend): Define memmove builtin.
      
      From-SVN: r271016
      Cherry Zhang committed