1. 08 Nov, 2018 16 commits
    • ipa-inline.c/tree-inline.c: port from fprintf to dump API (PR ipa/86395) · 4174a33a
      This patch ports various fprintf calls in the inlining code to using
      the dump API, using the %C format code for printing cgraph_node *.
      I focussed on the dump messages that seemed most significant to
      end-users; I didn't port all of the calls.
      
      Doing so makes this information appear in -fopt-info and in
      optimization records, rather than just in the dump_file.
      
      It also changes the affected dumpfile-dumps from being unconditional
      (assuming the dump_file is enabled) to being guarded by the MSG_*
      status.  Hence various tests with dg-final scan-*-dump directives
      need to gain "-all" or "-optimized" suffixes to -fdump-ipa-inline.
      
      The use of %C throughout also slightly changes the dump format for
      several messages, e.g. changing:
      
       Inlining void inline_me(char*) into int main(int, char**).
      
      to:
      
      ../../src/gcc/testsuite/g++.dg/tree-ssa/inline-1.C:13:8: optimized:  Inlining void inline_me(char*)/0 into int main(int, char**)/2.
      
      amongst other things adding "/order" suffixes to the cgraph node
      names.
      
      gcc/ChangeLog:
      	PR ipa/86395
      	* doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
      	"-missed", "-note", and "-all" sub-options.
      	* ipa-inline.c (caller_growth_limits): Port from fprintf to dump
      	API.
      	(can_early_inline_edge_p): Likewise.
      	(want_early_inline_function_p): Likewise.
      	(want_inline_self_recursive_call_p): Likewise.
      	(recursive_inlining): Likewise.
      	(inline_small_functions): Likewise.
      	(flatten_function): Likewise.
      	(ipa_inline): Likewise.
      	(inline_always_inline_functions): Likewise.
      	(early_inline_small_functions): Likewise.
      	(early_inliner): Likewise.
      	* tree-inline.c (expand_call_inline): Likewise.
      
      gcc/testsuite/ChangeLog:
      	PR ipa/86395
      	* g++.dg/ipa/devirt-12.C: Add "-all" suffix to
      	"-fdump-ipa-inline".
      	* g++.dg/ipa/imm-devirt-1.C: Add "-optimized" suffix to
      	"-fdump-tree-einline".
      	* g++.dg/tree-prof/inline_mismatch_args.C: Add "-all" suffix to
      	"-fdump-tree-einline".
      	* g++.dg/tree-ssa/inline-1.C: Add "-optimized" suffix to
      	"-fdump-tree-einline".
      	* g++.dg/tree-ssa/inline-2.C: Likewise.
      	* g++.dg/tree-ssa/inline-3.C: Likewise.
      	* g++.dg/tree-ssa/inline-4.C: New test, based on inline-1.C, but
      	using "-fopt-info-inline".
      	* gcc.dg/ipa/fopt-info-inline-1.c: New test.
      	* gcc.dg/ipa/inline-4.c:  Add "-all" suffix to
      	"-fdump-ipa-inline".  Add "-fopt-info-inline" and dg-optimized
      	directive.
      	* gcc.dg/ipa/inline-7.c: Add "-optimized" suffix to
      	"-fdump-tree-einline".  Add "-fopt-info-inline" and dg-optimized
      	directive.  Update scan-tree-dump-times to reflect /order
      	suffixes.
      	* gcc.dg/ipa/inlinehint-4.c: Update scan-tree-dump-times to
      	reflect /order suffixes.
      	* gcc.dg/plugin/dump-1.c: Add "-loop" to "-fopt-info-note" to
      	avoid getting extra messages from inliner.
      	* gcc.dg/plugin/dump-2.c: Likewise.
      	* gcc.dg/pr26570.c: Add dg-prune-output to ignore new
      	"function body not available" missed optimization messages.
      	* gcc.dg/pr71969-2.c: Update scan-tree-dump-times to reflect
      	/order suffixes.
      	* gcc.dg/pr71969-3.c: Likewise.
      	* gcc.dg/tree-ssa/inline-11.c: Add "-all" suffix to
      	"-fdump-tree-einline".
      	* gcc.dg/tree-ssa/inline-3.c: Add "-optimized" suffix to
      	"-fdump-tree-einline".  Update scan-tree-dump-times to reflect
      	/order suffixes.
      	* gcc.dg/tree-ssa/inline-4.c: Add "-optimized" suffix to
      	"-fdump-tree-einline".  Add "-fopt-info-inline" and dg-optimized
      	directive.
      	* gcc.dg/tree-ssa/inline-8.c: Add "-optimized" suffix to
      	"-fdump-tree-einline".
      	* gfortran.dg/pr79966.f90: Update scan-ipa-dump to reflect /order
      	suffixes.
      
      From-SVN: r265920
      David Malcolm committed
    • Support %f in pp_format · 204839e7
      Numerous formatted messages from the inliner use %f, mostly as %f, but
      occasionally with length modifiers.
      
      This patch implements the simplest case of "%f" for pp_format (with no
      modifier support) to make it easier to port these messages from fprintf
      to dump_printf_loc.
      
      The selftest has an assertion that %f on 1.0 is printed as "1.000000".
      This comes from the host's sprintf, and I believe this is guaranteed by
      POSIX: "If the precision is missing, it shall be taken as 6".  If this is
      an issue I can drop the selftest.
      
      gcc/c-family/ChangeLog:
      	* c-format.c (gcc_dump_printf_char_table): Add entry for %f.
      
      gcc/ChangeLog:
      	* pretty-print.c (pp_format): Handle %f.
      	(selftest::test_pp_format): Add test of %f.
      	* pretty-print.h (pp_double): New macro.
      
      gcc/testsuite/ChangeLog:
      	* gcc.dg/format/gcc_diag-10.c: Add coverage for %f.
      
      From-SVN: r265919
      David Malcolm committed
    • dump_printf: add "%C" for dumping cgraph_node * · d8010ee4
      This patch implements support for %C in dump_printf for dumping
      cgraph_node *.
      (I would have preferred to have a code for printing symtab_node *
      and both subclasses, but there doesn't seem to be a good way for
      -Wformat to handle inheritance, so, failing that, I went with
      this approach).
      
      gcc/c-family/ChangeLog:
      	* c-format.c (local_cgraph_node_ptr_node): New variable.
      	(gcc_dump_printf_char_table): Add entry for %C.
      	(get_pointer_to_named_type): New function, taken from the handling
      	code for "gimple *" from...
      	(init_dynamic_diag_info): ...here.  Add handling for
      	"cgraph_node *".
      	* c-format.h (T_CGRAPH_NODE): New.
      
      gcc/ChangeLog:
      	* dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
      	* dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
      	(dump_pretty_printer::decode_format): Implement "%C" for
      	cgraph_node *.
      	(selftest::test_capture_of_dump_calls): Rename "where" to
      	"stmt_loc".  Convert test_decl to a function decl and set its
      	location.  Add a symbol_table_test RAII instance and a
      	cgraph_node, using it to test "%C" and dump_symtab_node.
      
      gcc/testsuite/ChangeLog:
      	* gcc.dg/format/gcc_diag-10.c (cgraph_node): New typedef.
      	(test_dump): Add testing of %C.
      
      From-SVN: r265918
      David Malcolm committed
    • decl.c (components_to_record): Remove obsolete kludge. · 0d8f74b4
      	* gcc-interface/decl.c (components_to_record): Remove obsolete kludge.
      	* gcc-interface/utils.c (make_packable_type): Set TYPE_PACKED on the
      	new type but do not take into account the setting on the old type for
      	the new fields.  Rename a local variable.
      	(finish_record_type): Clear DECL_BIT_FIELD_TYPE on a variant part at
      	offset 0, if any.
      	(create_field_decl): Tweak comment.
      
      From-SVN: r265917
      Eric Botcazou committed
    • re PR middle-end/87916 (ICE in dwarf2out_abstract_function, at dwarf2out.c:22479 since r264943) · 67124cb6
      	PR middle-end/87916
      	* cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
      
      From-SVN: r265916
      Eric Botcazou committed
    • cgraph: add selftest::symbol_table_test · 212755ff
      This patch adds a selftest fixture for overriding the "symtab" global,
      so that selftests involving symtab nodes can be isolated from each
      other: each selftest can have its own symbol_table instance.
      
      In particular, this ensures that nodes can have a predictable "order"
      and thus predictable dump names within selftests.
      
      gcc/ChangeLog:
      	* cgraph.c: Include "selftest.h".
      	(saved_symtab): New variable.
      	(selftest::symbol_table_test::symbol_table_test): New ctor.
      	(selftest::symbol_table_test::~symbol_table_test): New dtor.
      	(selftest::test_symbol_table_test): New test.
      	(selftest::cgraph_c_tests): New.
      	* cgraph.h (saved_symtab): New decl.
      	(selftest::symbol_table_test): New class.
      	* selftest-run-tests.c (selftest::run_tests): Call
      	selftest::cgraph_c_tests.
      	* selftest.h (selftest::cgraph_c_tests): New decl.
      
      From-SVN: r265915
      David Malcolm committed
    • tree-data-ref.h (lambda_int): New typedef. · 1c8badf6
      2018-11-08  Richard Biener  <rguenther@suse.de>
      
      	* tree-data-ref.h (lambda_int): New typedef.
      	(lambda_vector_gcd): Adjust.
      	(lambda_vector_new): Likewise.
      	(lambda_matrix_new): Likewise.
      	* tree-data-ref.c  (print_lambda_vector): Adjust.
      
      From-SVN: r265914
      Richard Biener committed
    • re PR tree-optimization/87929 (ICE in verify_gimple failed) · fd5c4c4c
      2018-11-08  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/87929
      	* tree-complex.c (expand_complex_comparison): Clean EH.
      
      	* gcc.dg/pr87929.c: New testcase.
      
      From-SVN: r265912
      Richard Biener committed
    • Change wording of __builtin_expect_with_probability errors. · c4e7e1b9
      2018-11-08  Martin Liska  <mliska@suse.cz>
      
      	* doc/extend.texi: Reword.
      	* predict.c (expr_expected_value_1): Likewise.
      2018-11-08  Martin Liska  <mliska@suse.cz>
      
      	* gcc.dg/pr87811.c: Update scanned pattern.
      	* gcc.dg/pr87811-2.c: Likewise.
      
      From-SVN: r265911
      Martin Liska committed
    • Don't use predefined sun in g++.dg/lto/pr87906 · f1f5b884
      	* g++.dg/lto/pr87906_0.C: Use moon instead of possibly predefined
      	sun.
      	* g++.dg/lto/pr87906_1.C: Likewise.
      
      From-SVN: r265910
      Rainer Orth committed
    • re PR target/87913 (max(n, 1) code generation) · 85eaf6c6
      2018-11-08  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/87913
      	* tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
      	of extreme values to ordered comparisons.
      
      	* gcc.dg/tree-ssa/phi-opt-20.c: New testcase.
      
      From-SVN: r265909
      Richard Biener committed
    • Add mips option dependency only config with loongson target. · ab681385
      gcc/testsuite/
      	* gcc.target/mips/mips.exp (mips-dg-options):
      	Add mips_option_dependency msoft-float vs no-mmi and
      	mips16/micromips vs no-mmi/ext/ext2 only gcc
      	config with Loongson target.
      
      From-SVN: r265908
      Chenghua Xu committed
    • re PR middle-end/42726 (-fno-common documentation inaccuracy) · bd21ffae
      2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
      
      	PR middle-end/42726
      
      	gcc/
      	* doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
      
      From-SVN: r265906
      Sandra Loosemore committed
    • invoke.texi: Remove leading dash from @opindex entries throughout the file. · a28102f8
      2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
      
      	gcc/
      	* doc/invoke.texi: Remove leading dash from @opindex entries
      	throughout the file.
      
      From-SVN: r265904
      Sandra Loosemore committed
    • re PR driver/80828 (Command line option -e not documented) · 24d9c62f
      2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
      
      	PR driver/80828
      
      	gcc/
      	* doc/invoke.texi (Option Summary): Add -e and --entry.
      	(Link Options): Likewise.
      
      From-SVN: r265903
      Sandra Loosemore committed
    • Daily bump. · 354b4b6a
      From-SVN: r265902
      GCC Administrator committed
  2. 07 Nov, 2018 24 commits
    • [PR/87936] --disable-checking bootstrap break · 05da2a5c
      https://gcc.gnu.org/ml/gcc-patches/2018-11/msg00502.html
      	PR 87926
      	* Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
      	--disable-checking bootstrap.
      
      From-SVN: r265899
      Nathan Sidwell committed
    • iconv.m4 (AM_ICONV_LINK): Don't overwrite CPPFLAGS. · e9f3803d
      2018-11-06  Hafiz Abid Qadeer  <abidh@codesourcery.com>
      
      	* config/iconv.m4 (AM_ICONV_LINK): Don't overwrite CPPFLAGS.
      	Append $INCICONV to it.
      
      gcc/
      	* configure: Regenerated.
      
      libcpp/
      	* configure: Likewise.
      
      libstdc++-v3/
      	* configure: Likewise.
      
      intl/
      	* configure: Likewise.
      
      From-SVN: r265896
      Hafiz Abid Qadeer committed
    • pr65595.c: Change type of "num" argument to memcpy from "unsigned long" to __SIZE_TYPE__. · 48b2caf0
      2018-11-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
      
      	* gcc.c-torture/compile/pr65595.c: Change type of "num" argument to
      	memcpy from "unsigned long" to __SIZE_TYPE__.
      
      From-SVN: r265895
      Jozef Lawrynowicz committed
    • re PR c/87691 (transparent_union attribute does not work with MODE_PARTIAL_INT) · c2ca29d5
      2018-11-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
      
      	PR c/87691
      	
      	gcc/ChangeLog:
      	* stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
      	to the mode of the widest field iff the widest field has mode class
      	MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
      	reference.
      
      	gcc/testsuite/ChangeLog:
      	* gcc.target/msp430/pr87691.c: New test.
      
      From-SVN: r265894
      Jozef Lawrynowicz committed
    • common.opt: Add -Wattribute-warning. · e217792b
               * common.opt: Add -Wattribute-warning.
               * doc/invoke.texi: Add documentation for -Wno-attribute-warning.
               * expr.c (expand_expr_real_1): Add new attribute to warning_at
               call to allow user configure behavior of "warning" attribute.
      
               * gcc.dg/Wno-attribute-warning.c: New test.
      
      From-SVN: r265891
      Nikolai Merinov committed
    • Fix linker script to use [jmy] to match size_t parameters · 285556b5
      	* config/abi/pre/gnu.ver: Fix patterns for size_t parameters.
      
      From-SVN: r265884
      Jonathan Wakely committed
    • doc: Use @: where needed · 630ba2fd
      When an abbreviation ends with a dot followed by whitespace, Texinfo
      thinks the dot ends a sentence, and applies spacing rules etc. based
      on that.  To prevent this, there is the @: macro.
      
      This patch puts @: after every vs., e.g., and i.e. where it is needed.
      In a few cases there was "@ " already, or "@\n", but @: is slightly
      better, and more consistent.
      
      
      	* target.def: Put @: after every vs., e.g., and i.e. where it is
      	followed by whitespace.
      	* doc/extend.texi: Ditto.
      	* doc/fragments.texi: Ditto.
      	* doc/gimple.texi: Ditto.
      	* doc/implement-c.texi: Ditto.
      	* doc/install.texi: Ditto.
      	* doc/invoke.texi: Ditto.
      	* doc/md.texi: Ditto.
      	* doc/plugins.texi: Ditto.
      	* doc/rtl.texi: Ditto.
      	* doc/sourcebuild.texi: Ditto.
      	* doc/tm.texi.in: Ditto.
      	* doc/ux.texi: Ditto.
      	* doc/tm.texi: Regenerate.
      
      From-SVN: r265882
      Segher Boessenkool committed
    • [arm] Add support for Arm Ares · 6279fcd6
      This adds support for the Arm Ares CPU for in the arm port.
      It implements the Armv8.2-A architecture with the optional features
      of statistical profiling, dot product and FP16 on by default.
      
      Note: Ares is a codename to enable early adopters and in time
      we will add the final product name once it's announced. 
      
      	* config/arm/arm-cpus.in (ares): New entry.
      	* config/arm/arm-tables.opt: Regenerate.
      	* config/arm/arm-tune.md: Likewise.
      	* doc/invoke.texi (ARM Options): Document ares.
      
      From-SVN: r265881
      Kyrylo Tkachov committed
    • [AArch64] Add -mcpu/-mtune support for Arm Ares · ce1485c1
      This adds support for the Arm Ares CPU for AArch64.
      It implements the Armv8.2-A architecture with the optional features
      of statistical profiling, dot product and FP16 on by default.
      
      Note: Ares is a codename to enable early adopters and in time
      we will add the final product name once it's announced. 
      
      	* config/aarch64/aarch64-cores.def (ares): Define.
      	* config/aarch64/aarch64-tune.md: Regenerate.
      	* doc/invoke.texi (AArch64 Options): Document ares value for mtune.
      
      From-SVN: r265880
      Kyrylo Tkachov committed
    • [PR C++/87904] lookup ICE · 72a7649a
      https://gcc.gnu.org/ml/gcc-patches/2018-11/msg00468.html
      	PR c++/87904
      	* cp-tree.h (struct tree_overload): Fix comment.
      	* tree.c (ovl_iterator::reveal_node): Propagate OVL_DEDUP_P.
      
      	PR c++/87904
      	* g++.dg/lookup/pr87904.C: New.
      
      From-SVN: r265879
      Nathan Sidwell committed
    • pr87874.c: Compile only for int128 effective target. · 38f54eec
      	* gcc.dg/pr87874.c: Compile only for int128 effective target.
      
      From-SVN: r265878
      Uros Bizjak committed
    • tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE. · f01a40db
      
      	* tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
      	(free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
      	functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
      	TYPE_DECL.
      
      From-SVN: r265877
      Jan Hubicka committed
    • re PR tree-optimization/87914 (gcc fails to vectorize bitreverse code) · 5a951baa
      2018-11-07  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/87914
      	* tree-vect-loop.c (vect_is_simple_reduction): Improve detection
      	of nested cycles.
      	(vectorizable_reduction): Handle shifts and rotates by dispatching
      	to vectorizable_shift.
      	* tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
      	in-loop uses of vect_nested_cycle defs.  Merge cycle and internal
      	def cases.
      	(vectorizable_shift): Export and handle being called as
      	vect_nested_cycle.
      	(vect_analyze_stmt): Call vectorizable_shift after
      	vectorizable_reduction.
      	* tree-vectorizer.h (vectorizable_shift): Declare.
      
      	* lib/target-supports.exp (check_effective_target_vect_var_shift): New.
      	(check_avx2_available): Likewise.
      	* g++.dg/vect/pr87914.cc: New testcase.
      
      From-SVN: r265876
      Richard Biener committed
    • ipa-devirt.c (odr_types_equivalent_p): Expect constants than const decls in TREE_VALUE of enum. · 7d3a67d7
      
      	* ipa-devirt.c (odr_types_equivalent_p): Expect constants
      	than const decls in TREE_VALUE of enum.
      	(dump_type_inheritance_graph): Improve duplicate dumping.
      	(free_enum_values): New.
      	(build_type_inheritance_graph): Use it.
      	* tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
      	which are not main variants or not ODR types.
      	(verify_type_variant): Expect variants to have no TYPE_VALUES.
      
      From-SVN: r265875
      Jan Hubicka committed
    • Update libquadmath fmaq from glibc, fix nanq issues. · 667b3ec1
      This patch extends update-quadmath.py to update fmaq from glibc.
      
      The issue in that function was that quadmath-imp.h had a struct in a
      union with mant_high and mant_low fields (up to 64-bit) whereas glibc
      has mantissa0, mantissa1, mantissa2 and mantissa3 (up to 32-bit).  The
      patch changes those fields to be the same as in glibc, moving printf /
      strtod code that also uses those fields back to closer to the glibc
      form.  This allows fmaq to be updated automatically from glibc (which
      brings in at least one bug fix from glibc from 2015).
      
      nanq was also using the mant_high field name, and had other issues: it
      only partly initialized the union from which a value was returned, and
      setting mant_high to 1 meant a signaling NaN would be returned rather
      than a quiet NaN.  This patch fixes those issues as part of updating
      it to use the changed interfaces (but does not fix the issue of not
      using the argument).
      
      Bootstrapped with no regressions on x86_64-pc-linux-gnu.
      
      	* quadmath-imp.h (ieee854_float128): Use mantissa0, mantissa1,
      	mantissa2 and mantissa3 fields instead of mant_high and mant_low.
      	Change nan field to ieee_nan.
      	* update-quadmath.py (update_sources): Also update fmaq.c.
      	* math/nanq.c (nanq): Use ieee_nan field of union.
      	Zero-initialize f.  Set quiet_nan field.
      	* printf/flt1282mpn.c, printf/printf_fphex.c, strtod/mpn2flt128.c,
      	strtod/strtoflt128.c: Use mantissa0, mantissa1, mantissa2 and
      	mantissa3 fields.  Use ieee_nan and quiet_nan field.
      	* math/fmaq.c: Regenerate from glibc sources with
      	update-quadmath.py.
      
      From-SVN: r265874
      Joseph Myers committed
    • ipa-inline.c (want_inline_small_function_p): Compute big_speedup_p lazily and last. · 296b0b04
      2018-11-07  Richard Biener  <rguenther@suse.de>
      
      	* ipa-inline.c (want_inline_small_function_p): Compute
      	big_speedup_p lazily and last.
      
      From-SVN: r265873
      Richard Biener committed
    • tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when building… · 6fe2da9f
      tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when building incomplete variant of complete type.
      
      
      	* tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
      	building incomplete variant of complete type.
      	(fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
      	variant of complete type.
      
      From-SVN: r265872
      Jan Hubicka committed
    • Fix some typo and brain twister logical. · f70b5dbf
      gcc/
      	* config/mips/mips.c: Fix typo in documentation of
      	mips_loongson_ext2_prefetch_cookie.
      	(mips_option_override): fix brain twister logical.
      	* config/mips/mips.h: Fix typo in documentation of
      	ISA_HAS_CTZ_CTO and define pattern.
      	* config/mips/mips.md (prefetch): Hoist EXT2 above
      	the 2EF/EXT block.
      	(prefetch_indexed): Hoist EXT2 above the EXT block.
      
      gcc/testsuite/
      	* gcc.target/mips/loongson-ctz.c: Fix typo.
      	* gcc.target/mips/loongson-dctz.c: Fix typo.
      
      From-SVN: r265871
      Chenghua Xu committed
    • tree.c (free_lang_data_in_type): Add fld parameter; simplify return and… · 36b56cd3
      tree.c (free_lang_data_in_type): Add fld parameter; simplify return and parameter types of function and method types.
      
      
      	* tree.c (free_lang_data_in_type): Add fld parameter; simplify
      	return and parameter types of function and method types.
      	(free_lang_data_in_cgraph): Update.
      
      From-SVN: r265870
      Jan Hubicka committed
    • Fix UBSAN in postreload-gcse.c (PR rtl-optimization/87868). · 907050e3
      2018-11-07  Martin Liska  <mliska@suse.cz>
      
      	PR rtl-optimization/87868
      	* postreload-gcse.c (eliminate_partially_redundant_load): Set
      	threshold to max_count if we would overflow.
      	* profile-count.h: Make max_count a public constant.
      
      From-SVN: r265869
      Martin Liska committed
    • Fix GNU coding style (V2). · 9cfc08c0
      2018-11-07  Martin Liska  <mliska@suse.cz>
      
      	* mem-stats.h: Fix GNU coding style.
      
      From-SVN: r265868
      Martin Liska committed
    • Add support for Loongson 2K1000 processor. · 8fa1acc7
      gcc/
      	* config/mips/gs264e.md: New.
      	* config/mips/mips-cpus.def: Define gs264e.
      	* config/mips/mips-tables.opt: Regenerate.
      	* config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
      	gs264e.
      	(mips_issue_rate): Add support for gs264e.
      	(mips_multipass_dfa_lookahead): Likewise.
      	* config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
      	(MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
      	(MIPS_ASE_MSA_SPEC): New.
      	(BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
      	(ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
      	(ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
      	* config/mips/mips.md: Include gs264e.md.
      	(processor): Add gs264e.
      	* config/mips/mips.opt (MSA): Use Mask instead of Var.
      	* doc/invoke.texi: Add gs264e to supported architectures.
      
      From-SVN: r265867
      Chenghua Xu committed
    • Add support for Loongson 3A2000/3A3000 processor. · 659ce7cb
      gcc/
      	* config/mips/gs464e.md: New.
      	* config/mips/mips-cpus.def: Define gs464e.
      	* config/mips/mips-tables.opt: Regenerate.
      	* config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
      	gs464e.
      	(mips_issue_rate): Add support for gs464e.
      	(mips_multipass_dfa_lookahead): Likewise.
      	(mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
      	* config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
      	(MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
      	(ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
      	(ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
      	* config/mips/mips.md: Include gs464e.md.
      	(processor): Add gs464e.
      	* doc/invoke.texi: Add gs464e to supported architectures.
      
      From-SVN: r265866
      Chenghua Xu committed
    • Add support for Loongson 3A1000 processor. · 2b94a36d
      gcc/
      	* config/mips/loongson3a.md: Rename to ...
      	* config/mips/gs464.md: ... here.
      	* config/mips/mips-cpus.def: Define gs464; Add loongson3a
      	as an alias of gs464 processor.
      	* config/mips/mips-tables.opt: Regenerate.
      	* config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
      	instead of PROCESSOR_LOONGSON_3A.
      	(mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
      	TUNE_LOONGSON_3A.
      	(mips_option_override): Enable MMI and EXT for gs464.
      	* config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
      	Rename TUNE_LOONGSON_3A to TUNE_GS464.
      	(MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
      	(ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
      	ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
      	TARGET_LOONGSON_3A.
      	* config/mips/mips.md: Include gs464.md instead of loongson3a.md.
      	(processor): Add gs464;
      	* doc/invoke.texi: Add gs464 to supported architectures.
      
      From-SVN: r265865
      Chenghua Xu committed