Commit Graph

173001 Commits

Author SHA1 Message Date
Andrew Stubbs
86b0eb8183 Limit LDS usage.
2019-11-22  Andrew Stubbs  <ams@codesourcery.com>

	gcc/
	* config/gcn/gcn.c (OMP_LDS_SIZE): Define.
	(ACC_LDS_SIZE): Define.
	(OTHER_LDS_SIZE): Define.
	(LDS_SIZE): Redefine using above.
	(gcn_expand_prologue): Initialize m0 with LDS_SIZE-1.

From-SVN: r278622
2019-11-22 16:43:46 +00:00
Martin Sebor
d2f8402a08 PR tree-optimization/92501 - strncmp with constant unterminated arrays not folded
gcc/testsuite/ChangeLog:

	PR tree-optimization/92501
	* gcc.dg/strcmpopt_7.c: New test.

gcc/ChangeLog:

	PR tree-optimization/92501
	* gimple-fold.c ((gimple_fold_builtin_string_compare): Let strncmp
	handle unterminated arrays.  Rename local variables for clarity.

From-SVN: r278621
2019-11-22 09:39:37 -07:00
Andrew Stubbs
aa84ec8415 Use GFX9 granulated sgprs count correctly.
2019-11-22  Andrew Stubbs  <ams@codesourcery.com>

	gcc/
	* config/gcn/gcn.c (gcn_hsa_declare_function_name): Calculate
	granulated_sgprs according to architecture.

From-SVN: r278617
2019-11-22 14:42:49 +00:00
Jan Hubicka
9fd052e775 Release memory-block-pool memory back to malloc.
* ggc-page.c (ggc_collect): Call memory_block_pool::trim.
	* memory-block.cc (memory_block_pool::clear_free_list): Rename to ...
	(memory_block_pool::reduce_free_list): ... this one.
	(memory_block_pool::trim): New static function.
	* memory-block.h (memory_block_pool::freelist_size): New constant
	(memory_block_pool::clear_free_list): Rename to ...
	(memory_block_pool::reduce_free_list): ... this one.
	(memory_block_pool::trim): Declare.
	
	* lto.c (lto_wpa_write_files): Call memory_block_pool::trim.

From-SVN: r278616
2019-11-22 14:37:37 +00:00
Richard Sandiford
f2f3dbc67b Disable epilogue loop vectorisation for vect-widen-mult-u8-*.c
vect-widen-mult-u8.c and vect-widen-mult-u8-u32.c were failing
on arm-linux-gnueabihf with epilogue vectorisation because we
print the expected messages twice rather than once.  We could
fix that either by removing the counts or by disabling epilogue
loop vectorisation.  The other vect-widen-mult-* tests do the
latter, so I did the same here.

2019-11-22  Richard Sandiford  <richard.sandiford@arm.com>

gcc/testsuite/
	* gcc.dg/vect/vect-widen-mult-u8.c: Disable epilogue loop
	vectorization.
	* gcc.dg/vect/vect-widen-mult-u8-u32.c: Likewise.

From-SVN: r278613
2019-11-22 12:03:08 +00:00
Richard Sandiford
aa5521f298 Fix markup in gcc.dg/vect/vect-cond-reduc-3.c
gcc.dg/vect/vect-cond-reduc-3.c had been failing on
arm-linux-gnueabihf since the test was added, because the test needs
support for VEC_COND_EXPR <float cmp float, int, int> whereas the target
only supports VEC_COND_EXPRs in which all modes are the same.  (I have
a fix for that, but it's not really stage 3 material.)

2019-11-22  Richard Sandiford  <richard.sandiford@arm.com>

gcc/testsuite/
	* gcc.dg/vect/vect-cond-reduc-3.c: Require vect_cond_mixed
	rather than vect_condition.

From-SVN: r278612
2019-11-22 10:56:13 +00:00
Richard Sandiford
2707101352 Move EXTRACT_LAST_REDUCTION costing to vectorizable_condition
gcc.target/aarch64/sve/clastb_[57].c started failing after the increase
in the cost of vec_to_scalar (r278452).  The problem is that we were
double-counting the cost of the CLASTB: once in vect_model_reduction_cost
as a vec_to_scalar and once in vectorizable_condition as a plain
vector_stmt.

Based on the TODO above vect_model_reduction_cost, I think the
preferred long-term direction is for vectorizable_* to cost these
things itself, so that's what the patch does (for this one case only).

2019-11-22  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* tree-vect-stmts.c (vect_model_simple_cost): Take an optional
	vect_cost_for_stmt.
	(vectorizable_condition): Calculate the cost of EXTRACT_LAST_REDUCTION
	here rather than...
	* tree-vect-loop.c (vect_model_reduction_cost): ...here.

From-SVN: r278611
2019-11-22 09:58:08 +00:00
Claudiu Zissulescu
d9c50233e4 [ARC] Fix failing pr77309 for ARC700
The patterns neg_scc_insn and not_scc_insn are not correct, leading to
failing pr77309 test for ARC700. Add two new bic compare with zero
patterns to improve output code.

gcc/
xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc.md (bic_f): Use cc_set_register predicate.
	(bic_cmp0_noout): New pattern.
	(bic_cmp0): Likewise.
	(neg_scc_insn): Remove pattern.
	(not_scc_insn): Likewise.

From-SVN: r278610
2019-11-22 09:00:33 +01:00
Claudiu Zissulescu
713877cbd7 [ARC] Fix ARC target specific tests.
Fix ARC specific tests by improving the matching pattern and adding
the missing functionality in arc.exp

gcc/tests
xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>

	* gcc.target/arc/add_n-combine.c: Match add1/2/3 instruction in
	output assembly.
	* gcc.target/arc/arc.exp (check_effective_target_codedensity):
	Add.
	* gcc.target/arc/cmem-7.c: Fix matching patterns.
	* gcc.target/arc/cmem-bit-1.c: Likewise.
	* gcc.target/arc/cmem-bit-2.c: Likewise.
	* gcc.target/arc/cmem-bit-3.c: Likewise.
	* gcc.target/arc/cmem-bit-4.c: Likewise.
	* gcc.target/arc/interrupt-2.c: Match rtie insn for A7.
	* gcc.target/arc/store-merge-1.c: This test is only meaningful for
	architectures with double load/store operations.

From-SVN: r278609
2019-11-22 08:59:54 +01:00
Martin Sebor
7028c2179c strlenopt-66.c: Avoid buffer overflow.
gcc/testsuite/ChangeLog:
	* gcc.dg/strlenopt-66.c: Avoid buffer overflow.  Add more test cases.

From-SVN: r278608
2019-11-21 17:51:16 -07:00
GCC Administrator
fb6543092e Daily bump.
From-SVN: r278607
2019-11-22 00:16:42 +00:00
Harald van Dijk
ee573dca11 doc: Remove claim about ISO C
The patch to make -fcommon the default introduces a bogus claim into
the GCC documentation.

-fcommon was claimed to be incompatible with ISO C for preventing
duplicate definitions from being diagnosed.  It does, but as that
elicits undefined behaviour (the requirement that there shall be no
more than one external definition is not a constraint), ISO C does not
require any diagnostic for it.  In the absence of any other rule this
would violate, both -fcommon and -fno-common are fully compatible with
all versions of ISO C.

2019-11-21  Harald van Dijk  <harald@gigawatt.nl>

	* doc/invoke.texi (-fcommon): Remove claim about ISO C.

From-SVN: r278604
2019-11-21 23:27:39 +00:00
Joseph Myers
6c80b1b56d Make more bad uses of fallthrough attribute into pedwarns.
Various bad uses of the [[fallthrough]] attribute are constraint
violations in C2x, so need pedwarns rather than warnings.

This patch duly turns the relevant warnings into pedwarns.  The
relevant code is not specific to C, and does not know which form the
attribute was given in ([[fallthrough]] or [[gnu::fallthrough]] or
__attribute__((fallthrough))), but as I understand it these usages are
also erroneous for C++ and it seems reasonable to give a pedwarn here
even when a form other than [[fallthrough]] is being used.

The precise meaning of the standard wording about "The next statement
that would be executed" seems a but unclear in some corner cases; the
tests added keep to cases where it is clear whether or not the next
statement executed is of the required form.

Bootstrapped with no regressions for x86_64-pc-linux-gnu.

gcc:
	* gimplify.c (expand_FALLTHROUGH_r, expand_FALLTHROUGH): Use
	pedwarn instead of warning_at for fallthrough not preceding a case
	or default label.

gcc/c-family:
	* c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
	of warning.

gcc/testsuite:
	* gcc.dg/c2x-attr-fallthrough-6.c: New test.  Split out from
	c2x-attr-fallthrough-3.c.
	* gcc.dg/c2x-attr-fallthrough-1.c: Add more tests.
	* gcc.dg/c2x-attr-fallthrough-2.c: Update expected diagnostics.
	* gcc.dg/c2x-attr-fallthrough-3.c: Split inside-switch part of
	test out to c2x-attr-fallthrough-6.c.

From-SVN: r278599
2019-11-21 20:29:40 +00:00
Prathamesh Kulkarni
b30e83f809 Use safe_dyn_cast instead of dyn_cast in find_loop_guard to fix PR92608.
2019-11-22  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

	PR tree-optimization/92608
	* tree-ssa-loop-unswitch.c (find_loop_guard): Use safe_dyn_cast instead
	of dyn_cast.

testsuite/
	* gcc.dg/torture/pr92608.c: New test.

From-SVN: r278598
2019-11-21 20:20:36 +00:00
Iain Sandoe
d2993abd39 [Darwin, testsuite] Update tests for common section use.
These two tests are explicitly testing the use of specific
sections or assembler directives for data that is placed in
common.  Append -fcommon to the flags to restore them.

gcc/testsuite/ChangeLog:

2019-11-21  Iain Sandoe  <iain@sandoe.co.uk>

	* gcc.dg/darwin-comm.c: Add -fcommon to compile flags.
	* gcc.dg/darwin-sections.c: Likewise.

From-SVN: r278596
2019-11-21 20:08:57 +00:00
Iain Sandoe
ee4072114b [testsuite] Fix bad dg-error syntax in gnu2x-attrs-1.c.
2019-11-21  Iain Sandoe  <iain@sandoe.co.uk>

	PR testsuite/92619
	* gcc.dg/gnu2x-attrs-1.c: Fix dg-error syntax.

From-SVN: r278594
2019-11-21 19:56:34 +00:00
Segher Boessenkool
eb5485341b rs6000: Don't split FP comparisons at expand time
We currently expand various floating point comparisons early, to some
sequences with cror insns and the like.  This doesn't optimize well.

Change that to allow any of the 14 floating point comparisons in the
instruction stream, and split them after combine (at split1).


	* config/rs6000/predicates.md (extra_insn_branch_comparison_operator):
	New predicate.
	* config/rs6000/rs6000-protos.h (rs6000_emit_fp_cror): New declaration.
	* config/rs6000/rs6000.c (rs6000_generate_compare): Don't do anything
	special for FP comparisons that need a cror instruction eventually.
	(rs6000_emit_fp_cror): New function.
	(rs6000_emit_sCOND): Expand all floating point comparisons to one
	instruction, for normal FP modes, with HONOR_NANS.
	(rs6000_emit_cbranch): Reformat.
	* config/rs6000/rs6000.md (fp_rev): New iterator.
	(fp_two): New iterator.
	*<code><mode>_cc for fp_rev and GPR: New define_insn_and_split.
	*<code><mode>_cc for fp_two and GPR: New define_insn_and_split.
	*cbranch_2insn: New define_insn_and_split.

From-SVN: r278593
2019-11-21 19:14:28 +01:00
Richard Sandiford
557532d172 Reject versioning for alignment with different masks (PR 92526)
Allowing mixed vector sizes broke the assumption in the following assert,
since it's now possible for different accesses to require different
levels of alignment:

              /* FORNOW: use the same mask to test all potentially unaligned
                 references in the loop.  The vectorizer currently supports
                 a single vector size, see the reference to
                 GET_MODE_NUNITS (TYPE_MODE (vectype)) where the
                 vectorization factor is computed.  */
              gcc_assert (!LOOP_VINFO_PTR_MASK (loop_vinfo)
                          || LOOP_VINFO_PTR_MASK (loop_vinfo) == mask);

I guess we could try to over-align smaller accesses so that all
of them are consistent, or try to support multiple alignment masks,
but for now the easiest fix seems to be to turn the assert into a
bail-out check.

2019-11-21  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	PR tree-optimization/92526
	* tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Reject
	versioning for alignment if the accesses do not have a consistent
	mask, rather than asserting that the masks are consistent.

gcc/testsuite/
	PR tree-optimization/92526
	* gcc.target/aarch64/pr92526.c: New test.

From-SVN: r278592
2019-11-21 17:45:36 +00:00
Richard Sandiford
91f161b03b Add more markup to vect-alias-check-{1,18}.c (PR 92543)
In vect-alias-check-1.c we unroll the inner loop and then vectorise
the stores at a[c + 1][b].  Since the access has no guaranteed
alignemnt, we need a realignment mechanism or support for unaligned
accesses in order to vectorise.

In vect-alias-check-18.c we use a reverse access and so need
permute support in order to vectorise.

I'm not really sure when this part of the testsuite prefers
{ xfail { ! foo } } and when it prefers { target foo }.  xfail
seems like the most common choice for the alignment restriction,
whereas vect_int and vect_perm are mostly dg-require-effective-target
style features, so I went with that combination.

2019-11-21  Richard Sandiford  <richard.sandiford@arm.com>

gcc/testsuite/
	PR testsuite/92543
	* gcc.dg/vect/vect-alias-check-1.c: XFAIL the alias check message
	if there is no realignment support and no support for unaligned
	accesses.
	* gcc.dg/vect/vect-alias-check-18.c: Restrict the test for the
	alias message to targets that have permute support.

From-SVN: r278591
2019-11-21 17:43:24 +00:00
Richard Sandiford
934f135b96 Add missing VECTOR_MODE_P checks (PR 92595)
This patch fixes some cases in which we weren't checking whether we had
a vector mode before calling related_vector_mode or before making vector
optab queries.

2019-11-21  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	PR tree-optimization/92595
	* tree-vect-stmts.c (get_group_load_store_type): Add a VECTOR_MODE_P
	check.
	(vectorizable_store, vectorizable_load): Likewise.

gcc/testsuite/
	PR tree-optimization/92595
	* g++.dg/vect/pr92595.cc: New test.

From-SVN: r278590
2019-11-21 17:41:16 +00:00
Srinath Parvathaneni
8239933547 [GCC][ARM]: Fix the failing ACLE testcase with correct test directive.
Hello,

This patch fixes arm acle testcase crc_hf_1.c by modifying the compiler
options directive.

Regression tested on arm-none-eabi and found no regressions.

Ok for trunk? If ok, please commit on my behalf, I don't have the commit
rights.

Thanks,
Srinath.

Applied on behalf of Srinath.

gcc/testsuite/ChangeLog:

2019-11-21  Srinath Parvathaneni  <srinath.parvathaneni@arm.com>

	* gcc.target/arm/acle/crc_hf_1.c: Modify the compiler options directive
	from dg-options to dg-additional-options.

From-SVN: r278588
2019-11-21 17:31:01 +00:00
Rainer Orth
b8e724465b Fix failures on Solaris with -fno-common default
gcc/testsuite:
	* gcc.c-torture/execute/20030913-1.c: Rename glob to g.
	* gcc.c-torture/execute/960218-1.c: Rename glob to gl.
	* gcc.c-torture/execute/complex-6.c: Rename err to e.
	* gcc.dg/torture/ssa-pta-fn-1.c: Rename glob to g.

	libgomp:
	* testsuite/libgomp.c/pr39591-1.c: Rename err to e.
	* testsuite/libgomp.c/pr39591-2.c: Likewise.
	* testsuite/libgomp.c/pr39591-3.c: Likewise.
	* testsuite/libgomp.c/private-1.c: Likewise.
	* testsuite/libgomp.c/task-1.c: Likewise.
	* testsuite/libgomp.c/task-5.c: Renamed err to serr.

From-SVN: r278571
2019-11-21 16:14:21 +00:00
Marek Polacek
523cfd52a2 PR c++/92450 - ICE with invalid nested name specifier.
* parser.c (cp_parser_member_declaration): Don't attempt to print
	erroneous bit-field diagnostic if grokdeclarator returns
	error_mark_node.

	* g++.dg/parse/crash71.C: New test.

From-SVN: r278570
2019-11-21 15:27:46 +00:00
Jan Hubicka
7c6f2fb9c7 Avoid quadratic behaviour of update_callee_keys.
* ipa-inline.c (update_callee_keys): Add parameter UPDATE_SINCE.
	(resolve_noninline_speculation, inline_small_functions): Avoid
	redundant updates.

From-SVN: r278566
2019-11-21 15:23:09 +00:00
Wilco Dijkstra
5f5e796c9c Fix global_vars_f90_init test failure
Add a missing extern to ensure the test passes with -fno-common change.
Committed as obvious.

    testsuite/
	* gfortran.dg/global_vars_f90_init_driver.c: Add missing extern.

From-SVN: r278557
2019-11-21 15:06:56 +00:00
Richard Biener
033bd26e28 lra.c (lra_insn_recog_data_pool): New.
2019-11-21  Richard Biener  <rguenther@suse.de>

	* lra.c (lra_insn_recog_data_pool): New.
	(free_insn_recog_data): Adjust.
	(finish_insn_recog_data): Release lra_insn_recog_data_pool.
	(lra_set_insn_recog_data): Allocate from lra_insn_recog_data_pool.

From-SVN: r278556
2019-11-21 15:02:19 +00:00
Richard Biener
7c327e2d4d re PR tree-optimization/92596 (ICE in exact_div, at poly-int.h:2162 since r278406)
2019-11-21  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/92596
	* tree-vect-slp.c (vect_build_slp_tree): Fix pasto.

	* gcc.dg/torture/pr92596-1.c: New testcase.

From-SVN: r278555
2019-11-21 15:01:17 +00:00
Jan Hubicka
9c572192f0 Fix previous commit.
* ipa-prop.h (ipa_release_agg_values): Add parameter RELEASE_VECTOR.

From-SVN: r278554
2019-11-21 14:59:20 +00:00
Jan Hubicka
b0d5547612 ipa-fnsummary.c (evaluate_conditions_for_known_args): Be ready for some vectors to not be allocated.
* ipa-fnsummary.c (evaluate_conditions_for_known_args): Be
	ready for some vectors to not be allocated.
	(evaluate_properties_for_edge): Document better; make
	known_vals and known_aggs caller allocated; avoid determining
	values of parameters which are not used.
	(ipa_merge_fn_summary_after_inlining): Pre allocate known_vals and
	known_aggs.
	* ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
	(do_estimate_edge_size): Likewise.
	(do_estimate_edge_hints): Likewise.
	* ipa-cp.c (ipa_get_indirect_edge_target_1): Do not early exit when
	values are not known.
	(ipa_release_agg_values): Add option to not release vector itself.

From-SVN: r278553
2019-11-21 14:58:08 +00:00
Tamar Christina
48ffab987a Testsuite: Fix fp-int-convert-timode-1.c testism.
The test fp-int-convert-timode-1.c uses FE_TONEAREST without
actually checking if the target has defined it.

Like the rest of the tests I now add a check to see if the target
has actually implemented it.

This fixed Arm newlib target failures.

Regtested on aarch64-none-elf and aarch64_be-none-elf and no issues.

Committed under the GCC obvious rules.

gcc/testsuite/ChangeLog:

	* gcc.dg/torture/fp-int-convert-timode-1.c: Add check for FE_TONEAREST.

From-SVN: r278552
2019-11-21 14:08:10 +00:00
Richard Biener
d78b70959f cfgloop.h (loop_iterator::~loop_iterator): Remove.
2019-11-21  Richard Biener  <rguenther@suse.de>

	* cfgloop.h (loop_iterator::~loop_iterator): Remove.
	(loop_iterator::to_visit): Use an auto_vec with internal storage.
	(loop_iterator::loop_iterator): Adjust.
	* cfganal.c (compute_dominance_frontiers_1): Fold into...
	(compute_dominance_frontiers): ... this.  Hoist invariant
	get_immediate_dominator call.
	(compute_idf): Use a work-set instead of a work-list for more
	optimal iteration order and duplicate avoidance.
	* tree-into-ssa.c (mark_phi_for_rewrite): Avoid re-allocating
	the vector all the time, instead pre-allocate the vector only
	once.
	(delete_update_ssa): Simplify.
	* vec.h (va_heap::release): Disable -Wfree-nonheap-object around it.

From-SVN: r278550
2019-11-21 13:46:18 +00:00
Richard Sandiford
e2a05fdfd4 [AArch64] Add -fno-vect-cost-model to sve2/whilerw_1.c
Bumping the cost of vec_to_scalar made the .s loop in
gcc.target/aarch64/sve2/whilerw_1.c use a runtime profitability check,
like the .d version already did.  Since the cost model isn't really
being tested here, the most robust fix seemed to be to disable it,
which I should really have done from the outset.

2019-11-21  Richard Sandiford  <richard.sandiford@arm.com>

gcc/testsuite/
	* gcc.target/aarch64/sve2/whilerw_1.c: Add -fno-vect-cost-model.
	Require x0 in the .d test too.

From-SVN: r278549
2019-11-21 12:03:54 +00:00
Jakub Jelinek
01a0fba626 re PR tree-optimization/91355 (optimized code does not call destructor while unwinding after exception)
PR tree-optimization/91355
	* tree-ssa-sink.c (select_best_block): Use >= rather than >
	for early_bb scaled count with best_bb count comparison.

	* g++.dg/torture/pr91355.C: New test.

From-SVN: r278548
2019-11-21 11:59:27 +01:00
Iain Sandoe
141793d5e9 [Darwin, testsuite] Fix fail of gnu2x-attrs-1.c.
This test fails on targets without symbol alias support, but we don't
want to skip it entirely with the usual dg-requires, thus expect the
error on the alias line.

gcc/testsuite/ChangeLog:

2019-11-21  Iain Sandoe  <iain@sandoe.co.uk>

	* gcc.dg/gnu2x-attrs-1.c: Expect an error for the alias case
	on Darwin.

From-SVN: r278547
2019-11-21 10:41:41 +00:00
Jakub Jelinek
e4112065b0 ipa-fnsummary.h (enum ipa_hints_vals): Fix comment typo, preffer -> prefer.
* ipa-fnsummary.h (enum ipa_hints_vals): Fix comment typo,
	preffer -> prefer.
	* ipa-inline.c (edge_badness): Likewise.
	* lto-streamer.h (class lto_location_cache): Likewise.
	* tree-ssa-sink.c (select_best_block): Likewise.  Fix comment typos,
	gratutious -> gratuitous.

From-SVN: r278546
2019-11-21 10:39:47 +01:00
Richard Biener
a877996fa3 revert: re PR tree-optimization/91790 (ICE: verify_ssa failed (error: definition in block 2 follows the use))
2019-11-21  Richard Biener  <rguenther@suse.de>

	Revert
	2019-09-17  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/91790
	* tree-vect-stmts.c (vectorizable_load): For BB vectorization
	use the correct DR for setting up realignment.

From-SVN: r278544
2019-11-21 09:16:46 +00:00
Richard Biener
a3d2f8e21c cfganal.c (pre_and_rev_post_order_compute_fn): Use an auto_bb_flag instead of an sbitmap for visited handling.
2019-11-21  Richard Biener  <rguenther@suse.de>

	* cfganal.c (pre_and_rev_post_order_compute_fn): Use an
	auto_bb_flag instead of an sbitmap for visited handling.
	* lra.c (lra_insn_recog_data_pool): New.
	(free_insn_recog_data): Adjust.
	(finish_insn_recog_data): Release lra_insn_recog_data_pool.
	(lra_set_insn_recog_data): Allocate from lra_insn_recog_data_pool.
	* tree-ssa-structalias.c (equiv_class_hasher): Change to nofree.
	(equiv_class_obstack): New.
	(equiv_class_lookup_or_add): Allocate from equiv_class_obstack.
	(perform_var_substitution): Initialize equiv_class_obstack.
	(free_var_substitution_info): Free equiv_class_obstack.

From-SVN: r278543
2019-11-21 08:39:53 +00:00
Jan Hubicka
49e2650072 Avoid quadratic behaviour of early inliner.
* ipa-inline.c (want_early_inline_function_p): Do not estimate
	edge growth when callee function is very large.
	* ipa-inline.h (estimate_min_edge_growth): New.

From-SVN: r278542
2019-11-21 08:15:47 +00:00
Jan Hubicka
d2bcf46cd0 Incremental updating of inline summaries.
* ipa-fnsummary.c (ipa_fn_summary::account_size_time): Allow
	negative time in calls summary; correct roundoff errors
	leading to negative times.
	(ipa_merge_fn_summary_after_inlining): Update calls size time table
	if present.
	(ipa_update_overall_fn_summary): Add RESET parameter.
	* ipa-fnsummary.h (ipa_update_overall_fn_summary): Update prototype.
	* ipa-inline-transform.c (inline_call): Enable incremental updates.

From-SVN: r278541
2019-11-21 08:03:01 +00:00
Ian Lance Taylor
b4b7464b57 re PR go/92605 (r278509 causes/reveals issue in building go library)
PR go/92605
    runtime: declare runtime_usestackmaps in stack.c, not runtime.h
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/208161

From-SVN: r278540
2019-11-21 01:06:47 +00:00
Ian Lance Taylor
025f56b7d3 mksysinfo: use type aliases for time struct field types
Also fix a case where grep wasn't redirecting to /dev/null.
    
    Fixes golang/go#35713
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/208160

From-SVN: r278539
2019-11-21 01:03:55 +00:00
Jakub Jelinek
b69d4d4542 re PR c++/90842 (ICE in poplevel, at cp/decl.c:585)
PR c++/90842
	* parser.c (cp_parser_decl_specifier_seq): For concept or typedef
	break early if CP_PARSER_FLAGS_ONLY_MUTABLE_OR_CONSTEXPR.
	For type specifiers, set CP_PARSER_FLAGS_NO_TYPE_DEFINITIONS
	if CP_PARSER_FLAGS_ONLY_MUTABLE_OR_CONSTEXPR is set.

	* g++.dg/cpp1y/lambda-generic-90842.C: New test.

Co-Authored-By: Jason Merrill <jason@redhat.com>

From-SVN: r278538
2019-11-21 02:00:43 +01:00
GCC Administrator
f0a2c2c89c Daily bump.
From-SVN: r278537
2019-11-21 00:16:35 +00:00
Marek Polacek
3697264c3a Add test for PR c++/92443.
* g++.dg/cpp0x/constexpr-92443.C: New test.

From-SVN: r278534
2019-11-20 22:59:20 +00:00
Richard Sandiford
0f6e9b2946 Restore stmt def types after scheduling two-operation SLP
2019-11-20  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* tree-vect-slp.c (vect_schedule_slp_instance): Restore stmt
	def types for two-operation SLP.

From-SVN: r278533
2019-11-20 21:15:54 +00:00
Richard Sandiford
28cebdb178 Restrict bb-slp-40.c to targets with VnQI addition (PR 92366)
bb-slp-40.c fails on SPARC targets without VIS4 because it
requires addition on vectors of bytes.  There doesn't seem to be
an existing target selector for this, so I added vect_char_add.
(Wasn't sure whether to use vect_char_add, for consistency
with vect_no_int_add/vect_int_mult etc., or vect_add_char for
consistency with vect_shift_char etc.)

I took the target list from vect_int and removed targets that didn't
seem to support the operation (namely sparc*, since we don't seem to
have any test for VIS4, niagara7 or m8, and alpha*-*-*.)

2019-11-20  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	PR testsuite/92366
	* doc/sourcebuild.texi (vect_char_add): Document.

gcc/testsuite/
	PR testsuite/92366
	* lib/target-supports.exp (check_effective_target_vect_char_add):
	New proc.
	* gcc.dg/vect/bb-slp-40.c: Require vect_char_add instead of vect_int.

From-SVN: r278532
2019-11-20 21:13:05 +00:00
Richard Sandiford
be12e7c726 Adjust expected output for bb-slp-21.c (PR 92527)
After r278246, we can try building the out[] store value from scalars
if the target has no multiplication support.  That's not necessarily
a good thing, but like most of vect/, this test is run with the cost
model disabled.

2019-11-20  Richard Sandiford  <richard.sandiford@arm.com>

gcc/testsuite/
	PR testsuite/92527
	* gcc.dg/vect/bb-slp-21.c: Expect both SLP groups to be vectorized,
	regardless of whether the target supports multiplication.

From-SVN: r278531
2019-11-20 21:08:52 +00:00
Paolo Carlini
df2653441a typeck2.c (build_x_arrow): Early return if decay_conversion returns error_mark_node.
/gcc
2019-11-20  Paolo Carlini  <paolo.carlini@oracle.com>

	* typeck2.c (build_x_arrow): Early return if decay_conversion
	returns error_mark_node.

/testsuite
2019-11-20  Paolo Carlini  <paolo.carlini@oracle.com>

	* g++.dg/parse/error43.C: Adjust expected error.

From-SVN: r278530
2019-11-20 21:03:05 +00:00
Alexandre Oliva
c013852d61 drop attempt to reuse cgraph callees for -fcallgraph-info
The information in cgraph callees is released long before we get to
the point in which -fcallgraph-info edges are dumped, or even
expanded.  It doesn't make sense to retain it longer: the edges
created for -fcallgraph-info are much smaller, and they don't even
coexist, so not even peak use grows.


for  gcc/ChangeLog

	* function.h (CALLEE_FROM_CGRAPH_P): Remove.
	* function.c (record_final_call): Record even calls that might
	have been in the cgraph.
	* toplev.c (dump_final_node_vcg): Skip iteration over cgraph
	callees.

From-SVN: r278529
2019-11-20 20:54:31 +00:00
Janne Blomqvist
aeebd94c77 Switch gcc ftp URL's to https
The FTP protocol is getting long in the tooth, and we should emphasize
HTTPS where that is available. This patch changes various gcc.gnu.org
URL's to instead use HTTPS.

For instance, kernel.org shut down FTP access in 2017, with the
explanation:

- The protocol is inefficient and requires adding awkward kludges to
  firewalls and load-balancing daemons
- FTP servers have no support for caching or accelerators, which has
  significant performance impacts
- Most software implementations have stagnated and see infrequent
  updates

ChangeLog:

2019-11-20  Janne Blomqvist  <jb@gcc.gnu.org>

        * configure.ac: Use https for gcc.gnu.org.
        * configure: Regenerated.

gcc/ChangeLog:

2019-11-20  Janne Blomqvist  <jb@gcc.gnu.org>

        * configure.ac: Use https for gcc.gnu.org.
        * configure: Regenerated.
        * doc/install.texi: Use https for gcc.gnu.org.
        * doc/sourcebuild.texi: Likewise.

gcc/testsuite/ChangeLog:

2019-11-20  Janne Blomqvist  <jb@gcc.gnu.org>

        * README: Use https for gcc.gnu.org.

libstdc++-v3/ChangeLog:

2019-11-20  Janne Blomqvist  <jb@gcc.gnu.org>

        * doc/html/api.html: Use https for gcc.gnu.org.
        * doc/xml/api.xml: Likewise.

maintainer-scripts/ChangeLog:

2019-11-20  Janne Blomqvist  <jb@gcc.gnu.org>

        * gcc_release: Use https for gcc.gnu.org.

From-SVN: r278526
2019-11-20 22:24:48 +02:00