Commit Graph

129886 Commits

Author SHA1 Message Date
Richard Sandiford
23b3372508 emit-rtl.h (replace_equiv_address, [...]): Add an inplace argument.
gcc/
	* emit-rtl.h (replace_equiv_address, replace_equiv_address_nv): Add an
	inplace argument.  Store the new address in the original MEM when true.
	* emit-rtl.c (change_address_1): Likewise.
	(adjust_address_1, adjust_automodify_address_1, offset_address):
	Update accordingly.
	* rtl.h (plus_constant): Add an inplace argument.
	* explow.c (plus_constant): Likewise.  Try to reuse the original PLUS
	when true.  Avoid generating (plus X (const_int 0)).
	* function.c (instantiate_virtual_regs_in_rtx): Adjust the PLUS
	in-place.  Pass true to plus_constant.
	(instantiate_virtual_regs_in_insn): Pass true to replace_equiv_address.

From-SVN: r210543
2014-05-17 07:00:02 +00:00
GCC Administrator
e16db39967 Daily bump.
From-SVN: r210542
2014-05-17 00:17:11 +00:00
Dehao Chen
2f6eed01c3 tree-cfg.c (gimple_merge_blocks): Updates bb count with max count.
2014-05-16  Dehao Chen  <dehao@google.com>

	* tree-cfg.c (gimple_merge_blocks): Updates bb count with max count.

From-SVN: r210538
2014-05-16 23:16:13 +00:00
Oleg Endo
b200de021c re PR target/54089 ([SH] Refactor shift patterns)
gcc/
	PR target/54089
	* config/sh/predicates.md (negt_reg_shl31_operand): Match additional
	patterns.
	* config/sh/sh.md (*negt_msb): Merge SH2A and non-SH2A variants.

From-SVN: r210537
2014-05-16 23:12:19 +00:00
Dehao Chen
cf40f9734f ira-int.h (REG_FREQ_FROM_EDGE_FREQ): Use optimize_function_for_size_p.
2014-05-16  Dehao Chen  <dehao@google.com>

        * ira-int.h (REG_FREQ_FROM_EDGE_FREQ): Use optimize_function_for_size_p.
        * regs.h (REG_FREQ_FROM_BB): Likewise.

From-SVN: r210536
2014-05-16 23:01:26 +00:00
Oleg Endo
48d8568e1f re PR target/51244 ([SH] Inefficient conditional branch and code around T bit)
gcc/
	PR target/51244
	* config/sh/sh.c (sh_eval_treg_value): Handle t_reg_operand and
	negt_reg_operand cases.
	* config/sh/sh.md (*cset_zero): Likewise by using cbranch_treg_value
	predicate.
	* config/sh/predicates.md (cbranch_treg_value): Simplify.

From-SVN: r210535
2014-05-16 22:54:32 +00:00
Oleg Endo
d580af0f7a sh.c (sh_option_override): Set branch cost to 2 for all target variants.
gcc/
	* config/sh/sh.c (sh_option_override): Set branch cost to 2 for all
	target variants.

From-SVN: r210534
2014-05-16 22:21:52 +00:00
David Malcolm
6c7571a29a Revert r209902 "Dump the return type of functions in gimple dumps"
This commit reverts r209902 aka 1f09cb43ee8e199dca339233fb1b92b7ffdbc660
due to issues described in
  https://gcc.gnu.org/ml/gcc-patches/2014-05/msg01271.html

gcc/
2014-05-16  David Malcolm  <dmalcolm@redhat.com>

	Revert:
	2014-04-29  David Malcolm  <dmalcolm@redhat.com>

	* tree-cfg.c (dump_function_to_file): Dump the return type of
	functions, in a line to itself before the function body, mimicking
	the layout of a C function.

gcc/testsuite
2014-05-16  David Malcolm  <dmalcolm@redhat.com>

	Revert:
	2014-04-29  David Malcolm  <dmalcolm@redhat.com>

	* gcc.dg/tree-ssa/pr23401.c: Update the expected number of
	occurrences of "int" in the gimple dump to reflect that the return
	types of functions now show up in such dumps.
	* gcc.dg/tree-ssa/pr27810.c: Likewise.

From-SVN: r210533
2014-05-16 21:39:22 +00:00
Iain Sandoe
cac363bc3c abi.exp: Defer setting of baseline_subdir until after checking that the test is eligible...
2014-05-16  Iain Sandoe  <iain@codesourcery.com>
	    Sandra Loosemore  <sandra@codesourcery.com>

        libstdc++-v3/
        * testsuite/libstdc++-abi/abi.exp: Defer setting of baseline_subdir
        until after checking that the test is eligible to be run.

Co-Authored-By: Sandra Loosemore <sandra@codesourcery.com>

From-SVN: r210531
2014-05-16 16:56:03 -04:00
Dehao Chen
b0e66512ee cfghooks.c (make_forwarder_block): Use direct computation to get fall-through edge's count and frequency.
2014-05-16  Dehao Chen  <dehao@google.com>

	* cfghooks.c (make_forwarder_block): Use direct computation to
	get fall-through edge's count and frequency.

From-SVN: r210528
2014-05-16 20:40:29 +00:00
Janne Blomqvist
870c7fa03a PR 61187 Fix use of uninitialized memory.
2014-05-16  Janne Blomqvist  <jb@gcc.gnu.org>

	PR libfortran/61187
	* io/unix.c (raw_close): Check if s->fd is -1.
	(fd_to_stream): Check return value of fstat(), handle error.

From-SVN: r210527
2014-05-16 23:37:13 +03:00
Benno Schulenberg
2236746bbb arc.c (arc_init): Fix typo in error message.
2014-02-07  Benno Schulenberg  <bensberg@justemail.net>

	* config/arc/arc.c (arc_init): Fix typo in error message.
	* config/i386/i386.c (ix86_expand_builtin): Likewise.
	(split_stack_prologue_scratch_regno): Likewise.
	* fortran/check.c (gfc_check_fn_rc2008): Remove duplicate
	word from error message.

From-SVN: r210526
2014-05-16 13:52:17 -06:00
Zhouyi Zhou
420ab54b75 ira-costs.c: Fix typo in comment.
2014-05-16  Zhouyi Zhou <yizhouzhou@ict.ac.cn>

        * ira-costs.c: Fix typo in comment.

From-SVN: r210525
2014-05-16 12:22:44 -06:00
David Wohlferd
8e90f6107b extend.texi: (Visibility Pragmas) Fix misplaced @xref
2014-05-14  David Wohlferd <dw@LimeGreenSocks.com>

	 * doc/extend.texi: (Visibility Pragmas) Fix misplaced @xref

From-SVN: r210524
2014-05-16 12:20:38 -06:00
Jan Hubicka
6de88c6a1c varpool.c (dump_varpool_node): Dump write-only flag.
* varpool.c (dump_varpool_node): Dump write-only flag.
	* lto-cgraph.c (lto_output_varpool_node, input_varpool_node): Stream
	write-only flag.
	* tree-cfg.c (execute_fixup_cfg): Remove statements setting write-only variables.


	* gcc.c-torture/execute/20101011-1.c: Update testcase.
	* gcc.dg/ira-shrinkwrap-prep-1.c: Update testcase.
	* gcc.dg/tree-ssa/writeonly.c: New testcase.
	* gcc.dg/tree-ssa/ssa-dse-6.c: Update testcase.
	* gcc.dg/tree-ssa/pr21559.c: Update testcase.
	* gcc.dg/debug/pr35154.c: Update testcase.
	* gcc.target/i386/vectorize1.c: Update testcase.
	* ipa.c (process_references): New function.
	(set_readonly_bit): New function.
	(set_writeonly_bit): New function.
	(clear_addressable_bit): New function.
	(ipa_discover_readonly_nonaddressable_var): Mark write only variables; fix
	handling of aliases.
	* cgraph.h (struct varpool_node): Add writeonly flag.

From-SVN: r210522
2014-05-16 17:49:06 +00:00
Paolo Carlini
54674a35bd re PR c++/51640 (Misleading error if the type in the catch() is ambiguous)
/cp
2014-05-16  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/51640
	* parser.c (cp_parser_diagnose_invalid_type_name): Early return
	when cp_parser_lookup_name sets ambiguous_decls.

/testsuite
2014-05-16  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/51640
	* g++.dg/parse/error54.C: New.

From-SVN: r210521
2014-05-16 17:42:23 +00:00
Vladimir Makarov
f4e075e7d9 re PR rtl-optimization/60969 (ICE in output_129 in MMXMOV of mode MODE_SF for march=pentium4)
2014-05-16  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/60969
	* ira-costs.c (record_reg_classes): Allow only memory for pseudo.
	Calculate costs for this case.

2014-05-16  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/60969
	* g++.dg/pr60969.C: New.

From-SVN: r210520
2014-05-16 17:37:17 +00:00
Eric Botcazou
8b628e86ec fold-const (fold_unary_loc): New case.
* fold-const (fold_unary_loc) <NON_LVALUE_EXPR>: New case.
	<CASE_CONVERT>: Pass arg0 instead of op0 to fold_convert_const.

From-SVN: r210518
2014-05-16 16:59:38 +00:00
Jonathan Wakely
53caffbe8d typedefs-1.cc: Fix test for 32-bit target.
* testsuite/20_util/make_unsigned/requirements/typedefs-1.cc: Fix
	test for 32-bit target.
	* testsuite/20_util/make_unsigned/requirements/typedefs-2.cc:
	Likewise.
	* testsuite/tr1/2_general_utilities/shared_ptr/modifiers/reset_neg.cc:
	Fix test.

From-SVN: r210517
2014-05-16 15:55:45 +01:00
Alexey Merzlyakov
2a2794f7be re PR libstdc++/60758 (Infinite backtrace in __cxa_end_cleanup)
2014-05-16  Alexey Merzlyakov  <alexey.merzlyakov@samsung.com>

	PR libstdc++/60758
	* libsupc++/eh_arm.cc (__cxa_end_cleanup): Change r4 to lr in save/restore
	and add unwind directives.

From-SVN: r210515
2014-05-16 13:16:33 +00:00
Richard Biener
52264dbf66 re PR tree-optimization/61194 (vectorization failed with "bit-precision arithmetic not supported" even if conversion to int is requested)
2014-05-16  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/61194
	* tree-vect-patterns.c (adjust_bool_pattern): Also handle
	bool patterns ending in a COND_EXPR.

	* gcc.dg/vect/pr61194.c: New testcase.

From-SVN: r210514
2014-05-16 11:21:11 +00:00
Jonathan Wakely
cd1464dbc6 parse_numbers.h (__parse_int::_Number_help): Check for overflow.
* include/bits/parse_numbers.h (__parse_int::_Number_help): Check for
	overflow.
	* include/std/chrono (chrono_literals::__select_type::_Select_type):
	Remove.
	(chrono_literals::_Checked_integral_constant): Define.
	Simplify UDL operator templates and check for overflow.
	* testsuite/20_util/duration/literals/range.cc: New.

From-SVN: r210513
2014-05-16 12:08:49 +01:00
James Greenhalgh
3d840f7d1f [AArch64 costs] Fixup to costing of FNMUL
gcc/

	* config/aarch64/aarch64.c (aarch64_rtx_mult_cost): Fix FNMUL case.

From-SVN: r210512
2014-05-16 10:15:54 +00:00
Ed Smith-Rowland
a2f4bd2ae1 re PR libstdc++/61166 (overflow when parse number in std::duration operator"")
2014-05-15  Ed Smith-Rowland  <3dw4rd@verizon.net>
	    Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/61166
	* include/bits/parse_numbers.h: Use integral_constant to remove
	duplication and simplify.
	* testsuite/20_util/duration/literals/61166.cc: New.

Co-Authored-By: Jonathan Wakely <jwakely@redhat.com>

From-SVN: r210511
2014-05-16 10:30:57 +01:00
James Greenhalgh
88d4fbcf50 [AArch64 costs 18/18] Dump a message if we are unable to cost an insn.
gcc/

	* config/aarch64/aarch64.c (aarch64_rtx_costs): Handle the case
	where we were unable to cost an RTX.

From-SVN: r210510
2014-05-16 09:27:55 +00:00
James Greenhalgh
909734beb7 [AArch64 costs 17/18] Cost for SYMBOL_REF, HIGH and LO_SUM
gcc/

	* config/aarch64/aarch64.c (aarch64_rtx_costs): Cost SYMBOL_REF,
	HIGH, LO_SUM.

From-SVN: r210509
2014-05-16 09:25:48 +00:00
James Greenhalgh
fb620c4a9a [AArch64 costs 16/18] Cost TRUNCATE
gcc/

	* config/aarch64/aarch64.c (aarch64_rtx_costs): Cost TRUNCATE.


Co-Authored-By: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

From-SVN: r210508
2014-05-16 09:23:28 +00:00
James Greenhalgh
b292109f9e [AArch64 costs 15/18] Cost more Floating point RTX.
gcc/

	* config/aarch64/aarch64.c (aarch64_rtx_costs): Cost FMA,
	FLOAT_EXTEND, FLOAT_TRUNCATE, ABS, SMAX, and SMIN.


Co-Authored-By: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

From-SVN: r210507
2014-05-16 09:20:22 +00:00
James Greenhalgh
a8eecd00ec [AArch64 costs 14/18] Cost comparisons, flag setting operators and IF_THEN_ELSE
gcc/

	* config/aarch64/aarch64.c (aarch64_rtx_costs): Cost comparison
	operators.


Co-Authored-By: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

From-SVN: r210506
2014-05-16 09:16:23 +00:00
James Greenhalgh
4105fe3885 [AArch64 costs 13/18] Improve costs for div/mod
gcc/

	* config/aarch64/aarch64.c (aarch64_rtx_costs): Improve costs for
	DIV/MOD.


Co-Authored-By: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

From-SVN: r210505
2014-05-16 09:12:14 +00:00
James Greenhalgh
7cc2145f54 [AArch64 costs 12/18] Improve costs for sign/zero extracts
gcc/

	* config/aarch64/aarch64.c (aarch64_rtx_costs): Improve costs for
	SIGN/ZERO_EXTRACT.


Co-Authored-By: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

From-SVN: r210504
2014-05-16 09:07:34 +00:00
James Greenhalgh
ba0cfa1700 [AArch64 costs 11/18] Improve costs for rotate and shift operations.
* config/aarch64/aarch64.c (aarch64_rtx_costs): Improve costs for
	rotates and shifts.


Co-Authored-By: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

From-SVN: r210503
2014-05-16 09:03:19 +00:00
James Greenhalgh
b1685e6274 [AArch64 costs 10/18] Improve costs for sign/zero extend operations
gcc/

	* config/aarch64/aarch64.c (aarch64_rtx_costs): Cost
	ZERO_EXTEND and SIGN_EXTEND better.


Co-Authored-By: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

From-SVN: r210502
2014-05-16 09:01:28 +00:00
James Greenhalgh
268c3b4758 [AArch64 costs 9/18] Better cost logical operations
gcc/

	* config/aarch64/aarch64.c (aarch64_rtx_costs): Improve cost for
	logical operations.


Co-Authored-By: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

From-SVN: r210501
2014-05-16 08:59:07 +00:00
James Greenhalgh
2961177e7d [AArch64 costs 8/18] Cost memory accesses using address costs
gcc/

	* config/aarch64/aarch64.c (aarch64_rtx_costs): Use address
	costs when costing loads and stores to memory.


Co-Authored-By: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

From-SVN: r210500
2014-05-16 08:56:54 +00:00
James Greenhalgh
ba123b0de5 [AArch64 costs 7/18] Improve SET cost.
gcc/

	* config/aarch64/aarch64.c (aarch64_rtx_costs): Improve costing
	for SET RTX.


Co-Authored-By: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

From-SVN: r210499
2014-05-16 08:55:04 +00:00
James Greenhalgh
7fc5ef02f4 [AArch64 costs 6/18] Set default costs and handle vector modes.
gcc/

	* config/aarch64/aarch64.c (aarch64_rtx_costs): Set default costs.

From-SVN: r210498
2014-05-16 08:52:30 +00:00
James Greenhalgh
4745e70151 [AArch64 costs 5/18] Factor out common MULT cases
gcc/

	* config/aarch64/aarch64.c (aarch64_strip_shift_or_extend): Rename
	to...
	(aarch64_strip_extend): ...this, don't strip shifts, check RTX is
	well formed.
	(aarch64_rtx_mult_cost): New.
	(aarch64_rtx_costs): Use it, refactor as appropriate.


Co-Authored-By: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

From-SVN: r210497
2014-05-16 08:50:51 +00:00
James Greenhalgh
9dfc162c47 [AArch64 costs 4/18] Better estimate cost of building a constant
gcc/

	* config/aarch64/aarch64.c (aarch64_build_constant): Conditionally
	emit instructions, return number of instructions which would
	be emitted.
	(aarch64_add_constant): Update call to aarch64_build_constant.
	(aarch64_output_mi_thunk): Likewise.
	(aarch64_rtx_costs): Estimate cost of a CONST_INT, cost
	a CONST_DOUBLE.


Co-Authored-By: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

From-SVN: r210496
2014-05-16 08:47:59 +00:00
James Greenhalgh
0ee859b53b [AArch64 costs 3/18] Wrap aarch64_rtx_costs to dump verbose output
gcc/

	* config/aarch64/aarch64.c (aarch64_rtx_costs_wrapper): New.
	(TARGET_RTX_COSTS): Call it.

From-SVN: r210495
2014-05-16 08:45:39 +00:00
James Greenhalgh
60bff09020 [AArch64 costs 2/18] Add cost tables for Cortex-A57
gcc/

	* config/aarch64/aarch64.c (cortexa57_addrcost_table): New.
	(cortexa57_vector_cost): Likewise.
	(cortexa57_tunings): Use them.

From-SVN: r210494
2014-05-16 08:43:51 +00:00
James Greenhalgh
677473677a [AArch64 costs 1/18] Refactor aarch64_address_costs.
gcc/

	* config/aarch64/aarch64-protos.h (scale_addr_mode_cost): New.
	(cpu_addrcost_table): Use it.
	* config/aarch64/aarch64.c (generic_addrcost_table): Initialize it.
	(aarch64_address_cost): Rewrite using aarch64_classify_address,
	move it.

From-SVN: r210493
2014-05-16 08:41:46 +00:00
Richard Biener
a764d66099 tree-ssa-sccvn.c: Include tree-cfg.h and domwalk.h.
2014-05-16  Richard Biener  <rguenther@suse.de>

	* tree-ssa-sccvn.c: Include tree-cfg.h and domwalk.h.
	(set_ssa_val_to): Handle unexpected sets to VN_TOP.
	(visit_phi): Ignore edges marked as not executable.
	(class cond_dom_walker): New.
	(cond_dom_walker::before_dom_children): Value-number
	control statements and mark successor edges as not
	executable if possible.
	(run_scc_vn): First walk all control statements in
	dominator order, marking edges as not executable.
	* tree-inline.c (copy_edges_for_bb): Be not confused
	about random edge flags.

	* gcc.dg/tree-ssa/ssa-fre-39.c: New testcase.
	* gcc.dg/tree-ssa/ssa-fre-40.c: Likewise.
	* gcc.dg/tree-ssa/ssa-pre-8.c: One more elimination.
	* gcc.dg/tree-ssa/struct-aliasing-2.c: Scan cddce1 dump.

From-SVN: r210492
2014-05-16 08:05:50 +00:00
Richard Biener
a27c386001 tree-ssa-sccvn.c (visit_use): Also constant-fold calls.
2014-05-16  Richard Biener  <rguenther@suse.de>

	* tree-ssa-sccvn.c (visit_use): Also constant-fold calls.

	* gcc.dg/tree-ssa/ssa-fre-41.c: New testcase.

From-SVN: r210491
2014-05-16 07:57:46 +00:00
Peter Bergner
d8c55b91ae re PR target/61193 (ABI incompatibility between POWER and Z HTM builtins and intrinsics)
PR target/61193
	* config/rs6000/htmxlintrin.h (_HTM_TBEGIN_STARTED): New define.
	(__TM_simple_begin): Use it.
	(__TM_begin): Likewise.

From-SVN: r210486
2014-05-15 22:43:12 -05:00
GCC Administrator
ef1f23cc6b Daily bump.
From-SVN: r210484
2014-05-16 00:17:08 +00:00
Jonathan Wakely
c6139a7763 Fix typo in my name.
From-SVN: r210479
2014-05-15 20:12:04 +01:00
Martin Jambor
8a2256dda3 re PR ipa/61085 (wrong code with -O2 -fno-early-inlining (maybe wrong devirtualization))
2014-05-15  Martin Jambor  <mjambor@suse.cz>

	PR ipa/61085
	* ipa-prop.c (update_indirect_edges_after_inlining): Check
	type_preserved flag when the indirect edge is polymorphic.

testsuite/
	* g++.dg/ipa/pr61085.C: New test.

From-SVN: r210477
2014-05-15 17:04:18 +02:00
Martin Jambor
9d2681a399 re PR tree-optimization/61090 (ICE in build_ref_for_offset)
2014-05-15  Martin Jambor  <mjambor@suse.cz>

	PR tree-optimization/61090
	* tree-sra.c (sra_modify_expr): Pass the current gsi to
	build_ref_for_model.

testsuite/
	* gcc.dg/tree-ssa/pr61090.c: New test.

From-SVN: r210476
2014-05-15 16:54:29 +02:00
Jason Merrill
8fa53379d5 * call.c (print_conversion_rejection): Use loc consistently.
From-SVN: r210475
2014-05-15 08:52:35 -04:00