Commit Graph

132448 Commits

Author SHA1 Message Date
Richard Sandiford
3b4459f903 var-tracking.c (add_uses): Take an rtx rather than an rtx *.
gcc/
	* var-tracking.c (add_uses): Take an rtx rather than an rtx *.
	Give real type of data parameter.  Remove return value.
	(add_uses_1): Use FOR_EACH_SUBRTX_VAR rather than for_each_rtx
	to iterate over subrtxes.

From-SVN: r214664
2014-08-28 06:25:05 +00:00
Richard Sandiford
b328e73048 var-tracking.c (use_narrower_mode_test): Turn from being a for_each_rtx callback to being a function that examines each...
gcc/
	* var-tracking.c (use_narrower_mode_test): Turn from being a
	for_each_rtx callback to being a function that examines each
	subrtx itself.
	(adjust_mems): Update accordingly.

From-SVN: r214663
2014-08-28 06:25:01 +00:00
Richard Sandiford
7e56c2835e var-tracking.c (non_suitable_const): Turn from being a for_each_rtx callback to being a function that examines each...
gcc/
	* var-tracking.c (non_suitable_const): Turn from being a for_each_rtx
	callback to being a function that examines each subrtx itself.
	Remove handling of null rtxes.
	(add_uses): Update accordingly.

From-SVN: r214662
2014-08-28 06:24:57 +00:00
Richard Sandiford
4f498863ce var-tracking.c: Include rtl-iter.h.
gcc/
	* var-tracking.c: Include rtl-iter.h.
	(rtx_debug_expr_p): Turn from being a for_each_rtx callback
	to being a function that examines each subrtx itself.
	(use_type): Update accordingly.

From-SVN: r214661
2014-08-28 06:24:53 +00:00
Richard Sandiford
638e18a4f2 store-motion.c: Include rtl-iter.h.
gcc/
	* store-motion.c: Include rtl-iter.h.
	(extract_mentioned_regs_1): Delete.
	(extract_mentioned_regs): Use FOR_EACH_SUBRTX_VAR rather than
	for_each_rtx to iterate over subrtxes.

From-SVN: r214660
2014-08-28 06:24:48 +00:00
Richard Sandiford
34a1e300b8 sel-sched.c: Include rtl-iter.h
gcc/
	* sel-sched.c: Include rtl-iter.h
	(count_occurrences_1): Delete.
	(count_occurrences_equiv): Turn rtxes into const_rtxes.
	Use FOR_EACH_SUBRTX rather than for_each_rtx.

From-SVN: r214659
2014-08-28 06:24:44 +00:00
Richard Sandiford
6180e3d870 rtl.h (tls_referenced_p): Take a const_rtx rather than an rtx.
gcc/
	* rtl.h (tls_referenced_p): Take a const_rtx rather than an rtx.
	* rtlanal.c (tls_referenced_p_1): Delete.
	(tls_referenced_p): Take a const_rtx rather than an rtx.
	Use FOR_EACH_SUBRTX rather than for_each_rtx.

From-SVN: r214658
2014-08-28 06:24:40 +00:00
Richard Sandiford
8d8e205b92 rtl.h (for_each_inc_dec_fn): Remove special case for -1.
gcc/
	* rtl.h (for_each_inc_dec_fn): Remove special case for -1.
	(for_each_inc_dec): Take an rtx rather than an rtx *.
	* cselib.c (cselib_record_autoinc_cb): Update accordingly.
	(cselib_record_sets): Likewise.
	* dse.c (emit_inc_dec_insn_before, check_for_inc_dec_1)
	(check_for_inc_dec): Likewise.
	* rtlanal.c (for_each_inc_dec_ops): Delete.
	(for_each_inc_dec_find_inc_dec): Take the MEM as argument,
	rather than a pointer to the memory address.  Replace
	for_each_inc_dec_ops argument with separate function and data
	arguments.  Abort on non-autoinc addresses.
	(for_each_inc_dec_find_mem): Delete.
	(for_each_inc_dec): Take an rtx rather than an rtx *.  Use
	FOR_EACH_SUBRTX_VAR to visit every autoinc MEM.

From-SVN: r214657
2014-08-28 06:24:36 +00:00
Richard Sandiford
f7d0b0fc77 rtl.h (find_all_hard_regs): Declare.
gcc/
	* rtl.h (find_all_hard_regs): Declare.
	* rtlanal.c (find_all_hard_regs): New function.
	(record_hard_reg_uses_1): Delete.
	(record_hard_reg_uses): Use find_all_hard_regs.

From-SVN: r214656
2014-08-28 06:24:32 +00:00
Richard Sandiford
a2b7026c2e rtl.h (replace_label_data): Delete.
gcc/
	* rtl.h (replace_label_data): Delete.
	(replace_label): Take the old label, new label and update-nuses flag
	as direct arguments.  Return void.
	* cfgcleanup.c (outgoing_edges_match): Update accordingly.
	* rtlanal.c (replace_label): Update interface as above.  Handle
	JUMP_TABLE_DATA as a special case.  Handle JUMPs outside the
	iterator.  Use FOR_EACH_SUBRTX_PTR.

From-SVN: r214655
2014-08-28 06:24:27 +00:00
Richard Sandiford
e08cf83616 rtl.h (get_pool_constant, [...]): Replace rtx parameters with const_rtx parameters.
gcc/
	* rtl.h (get_pool_constant, rtx_referenced_p): Replace rtx parameters
	with const_rtx parameters.
	* varasm.c (get_pool_constant): Likewise.
	* rtlanal.c (rtx_referenced_p_1): Delete.
	(rtx_referenced_p): Use FOR_EACH_SUBRTX instead of for_each_rtx.
	Assert that the rtx we're looking for is nonnull.  Allow searches
	for constant pool SYMBOL_REFs.

From-SVN: r214654
2014-08-28 06:24:23 +00:00
Richard Sandiford
b37c2fe0fe reload1.c: Include rtl-iter.h.
gcc/
	* reload1.c: Include rtl-iter.h.
	(note_reg_elim_costly): Turn from being a for_each_rtx callback
	to being a function that examines each subrtx itself.
	(eliminate_regs_1, elimination_costs_in_insn): Update accordingly.

From-SVN: r214653
2014-08-28 06:24:16 +00:00
Richard Sandiford
0d2e76b87c regcprop.c (cprop_find_used_regs_1): Delete.
gcc/
	* regcprop.c (cprop_find_used_regs_1): Delete.
	(cprop_find_used_regs): Use FOR_EACH_SUBRTX instead of for_each_rtx.

From-SVN: r214652
2014-08-28 06:24:12 +00:00
Richard Sandiford
4ca738b329 regcprop.c: Include rtl-iter.h.
gcc/
	* regcprop.c: Include rtl-iter.h.
	(kill_value): Take a const_rtx.
	(kill_autoinc_value): Turn from being a for_each_rtx callback
	to being a function that examines each subrtx itself.
	(copyprop_hardreg_forward_1): Update accordingly.

From-SVN: r214651
2014-08-28 06:24:08 +00:00
Richard Sandiford
6c0cda9157 reg-stack.c: Include rtl-iter.h.
gcc/
	* reg-stack.c: Include rtl-iter.h.
	(subst_stack_regs_in_debug_insn): Delete.
	(subst_all_stack_regs_in_debug_insn): Use FOR_EACH_SUBRTX_PTR
	instead of for_each_rtx.

From-SVN: r214650
2014-08-28 06:24:03 +00:00
Richard Sandiford
a36a1928e2 lower-subreg.c (find_decomposable_subregs): Turn from being a for_each_rtx callback to being a function that examines each...
gcc/
	* lower-subreg.c (find_decomposable_subregs): Turn from being
	a for_each_rtx callback to being a function that examines each
	subrtx itself.  Remove handling of null rtxes.
	(decompose_multiword_subregs): Update accordingly.

From-SVN: r214649
2014-08-28 06:23:58 +00:00
Richard Sandiford
f2d3f3471e lower-subreg.c (adjust_decomposed_uses): Delete.
gcc/
	* lower-subreg.c (adjust_decomposed_uses): Delete.
	(resolve_debug): Use FOR_EACH_SUBRTX_PTR rather than for_each_rtx.
	Remove handling of null rtxes.

From-SVN: r214648
2014-08-28 06:23:55 +00:00
Richard Sandiford
cf55cb6a19 lower-subreg.c: Include rtl-iter.h.
gcc/
	* lower-subreg.c: Include rtl-iter.h.
	(resolve_subreg_use): Turn from being a for_each_rtx callback
	to being a function that examines each subrtx itself.  Remove
	handling of null rtxes.
	(resolve_reg_notes, resolve_simple_move): Update accordingly.
	(decompose_multiword_subregs): Likewise.

From-SVN: r214647
2014-08-28 06:23:51 +00:00
Richard Sandiford
b42b06e6d7 loop-iv.c (altered_reg_used): Turn from being a for_each_rtx callback to being a function that examines each...
gcc/
	* loop-iv.c (altered_reg_used): Turn from being a for_each_rtx callback
	to being a function that examines each subrtx itself.
	(simplify_using_condition, simplify_using_initial_values): Update
	accordingly.

From-SVN: r214646
2014-08-28 06:23:47 +00:00
Richard Sandiford
4ca29addfc loop-iv.c: Include rtl-iter.h.
gcc/
	* loop-iv.c: Include rtl-iter.h.
	(find_single_def_src): New function.
	(replace_single_def_regs): Turn from being a for_each_rtx callback
	to being a function that examines each subrtx itself.
	(replace_in_expr, simplify_using_initial_values): Update accordingly.

From-SVN: r214645
2014-08-28 06:23:42 +00:00
Richard Sandiford
e7c4427661 jump.c (eh_returnjump_p_1): Delete.
gcc/
	* jump.c (eh_returnjump_p_1): Delete.
	(eh_returnjump_p): Use FOR_EACH_SUBRTX rather than for_each_rtx.
	Remove handling of null rtxes.

From-SVN: r214644
2014-08-28 06:23:39 +00:00
Richard Sandiford
bc702273a7 jump.c: Include rtl-iter.h.
gcc/
	* jump.c: Include rtl-iter.h.
	(returnjump_p_1): Delete.
	(returnjump_p): Use FOR_EACH_SUBRTX rather than for_each_rtx.
	Remove handling of null rtxes.

From-SVN: r214643
2014-08-28 06:23:34 +00:00
Richard Sandiford
40954ce58f ira.c: Include rtl-iter.h.
gcc/
	* ira.c: Include rtl-iter.h.
	(set_paradoxical_subreg): Turn from being a for_each_rtx callback
	to being a function that examines each subrtx itself.  Remove
	handling of null rtxes.
	(update_equiv_regs): Update call accordingly.

From-SVN: r214642
2014-08-28 06:23:31 +00:00
Richard Sandiford
aa4e2d7ef0 fwprop.c: Include rtl-iter.h.
gcc/
	* fwprop.c: Include rtl-iter.h.
	(varying_mem_p): Turn from being a for_each_rtx callback to being
	a function that examines each subrtx itself.
	(propagate_rtx): Update accordingly.

From-SVN: r214641
2014-08-28 06:23:26 +00:00
Richard Sandiford
b87048010c function.c: Include rtl-iter.h
gcc/
	* function.c: Include rtl-iter.h
	(instantiate_virtual_regs_in_rtx): Turn from being a for_each_rtx
	callback to being a function that examines each subrtx itself.
	Return the changed flag.
	(instantiate_virtual_regs_in_insn, instantiate_decl_rtl)
	(instantiate_virtual_regs): Update calls accordingly.

From-SVN: r214640
2014-08-28 06:23:22 +00:00
Richard Sandiford
effb8a2646 final.c: Include rtl-iter.h.
gcc/
	* final.c: Include rtl-iter.h.
	(mark_symbol_ref_as_used): Delete.
	(mark_symbol_refs_as_used): Use FOR_EACH_SUBRTX instead of
	for_each_rtx.

From-SVN: r214639
2014-08-28 06:23:18 +00:00
Richard Sandiford
9021b8ec96 emit-rtl.c: Include rtl-iter.h.
gcc/
	* emit-rtl.c: Include rtl-iter.h.
	(find_auto_inc): Turn from being a for_each_rtx callback to being
	a function that examines each subrtx itself.  Assume the first operand
	to an RTX_AUTOINC is the automodified register.
	(try_split): Update call accordingly.

From-SVN: r214638
2014-08-28 06:23:13 +00:00
Richard Sandiford
3e971a9125 dwarf2out.c (resolve_one_addr): Remove unused data parameter.
gcc/
	* dwarf2out.c (resolve_one_addr): Remove unused data parameter.
	Return a bool, inverting the result so that 0/false means "not ok".
	Use FOR_EACH_SUBRTX_PTR instead of for_each_rtx to iterate over
	subrtxes of a CONST.
	(mem_loc_descriptor, add_const_value_attribute)
	(resolve_addr_in_expr): Update calls accordingly.

From-SVN: r214637
2014-08-28 06:23:09 +00:00
Richard Sandiford
a4ba89ffca dwarf2out.c: Include rtl-iter.h.
gcc/
	* dwarf2out.c: Include rtl-iter.h.
	(const_ok_for_output_1): Take the rtx instead of a pointer to it.
	Remove unused data parameter.  Return a bool, inverting the result
	so that 0/false means "not ok".
	(const_ok_for_output): Update accordingly.  Use FOR_EACH_SUBRTX_VAR
	instead of for_each_rtx.

From-SVN: r214636
2014-08-28 06:23:04 +00:00
Richard Sandiford
d7111da854 dse.c: Include rtl-iter.h.
gcc/
	* dse.c: Include rtl-iter.h.
	(check_mem_read_rtx): Change void * parameter to real type.
	Remove return value.
	(check_mem_read_use): Fix comment.  Use FOR_EACH_SUBRTX_PTR instead of
	for_each_rtx.  Don't handle null rtxes.

From-SVN: r214635
2014-08-28 06:23:00 +00:00
Richard Sandiford
42be54562a df-problems.c: Include rtl-iter.h.
gcc/
	* df-problems.c: Include rtl-iter.h.
	(find_memory): Turn from being a for_each_rtx callback to being
	a function that examines each subrtx itself.  Continue to look for
	volatile references even after a nonvolatile one has been found.
	(can_move_insns_across): Update calls accordingly.

From-SVN: r214634
2014-08-28 06:22:56 +00:00
Richard Sandiford
a3aa081329 ddg.c (walk_mems_2, [...]): Delete.
gcc/
	* ddg.c (walk_mems_2, walk_mems_1): Delete.
	(insns_may_alias_p): Use FOR_EACH_SUBRTX rather than for_each_rtx
	to iterate over subrtxes.  Return a bool rather than an int.

From-SVN: r214633
2014-08-28 06:22:51 +00:00
Richard Sandiford
fbf3fc0fc9 ddg.c: Include rtl-iter.h.
gcc/
	* ddg.c: Include rtl-iter.h.
	(mark_mem_use_1): Rename to...
	(mark_mem_use): ...deleting old mark_mem_use.  Use FOR_EACH_SUBRTX
	instead of for_each_rtx.
	(mem_read_insn_p): Update accordingly.

From-SVN: r214632
2014-08-28 06:22:46 +00:00
Richard Sandiford
a9052a4081 cse.c (change_cc_mode_args): Delete.
gcc/
	* cse.c (change_cc_mode_args): Delete.
	(cse_change_cc_mode): Turn from being a for_each_rtx callback to being
	a function that examines each subrtx itself.  Take the fields of
	change_cc_mode_args as argument and return void.
	(cse_change_cc_mode_insn): Update calls accordingly.

From-SVN: r214631
2014-08-28 06:22:42 +00:00
Richard Sandiford
a5b9bc172a cse.c (is_dead_reg): Change argument to const_rtx.
gcc/
	* cse.c (is_dead_reg): Change argument to const_rtx.
	(dead_debug_insn_data): Delete.
	(is_dead_debug_insn): Expand commentary.  Turn from being a
	for_each_rtx callback to being a function that examines
	each subrtx itself.  Take the fields of dead_debug_insn_data
	as argument.
	(delete_trivially_dead_insns): Update call accordingly.

From-SVN: r214630
2014-08-28 06:22:38 +00:00
Richard Sandiford
f000294852 cse.c (check_for_label_ref): Move earlier in file.
gcc/
	* cse.c (check_for_label_ref): Move earlier in file.  Turn from
	being a for_each_rtx callback to being a function that examines
	each subrtx itself.
	(cse_extended_basic_block): Update call accordingly.

From-SVN: r214629
2014-08-28 06:22:33 +00:00
Richard Sandiford
c992c06661 cse.c (check_dependence_data): Delete.
gcc/
	* cse.c (check_dependence_data): Delete.
	(check_dependence): Change from being a for_each_rtx callback to being
	a function that examines all subrtxes itself.  Don't handle null rtxes.
	(invalidate): Update call accordingly.

From-SVN: r214628
2014-08-28 06:22:29 +00:00
Richard Sandiford
e89b312ed3 cse.c: Include rtl-iter.h.
gcc/
	* cse.c: Include rtl-iter.h.
	(approx_reg_cost_1): Delete.
	(approx_reg_cost): Use FOR_EACH_SUBRTX instead of for_each_rtx.
	Don't handle null rtxes.

From-SVN: r214627
2014-08-28 06:22:24 +00:00
Richard Sandiford
a2250fe993 cfgcleanup.c: Include rtl-iter.h.
gcc/
	* cfgcleanup.c: Include rtl-iter.h.
	(mentions_nonequal_regs): Turn from being a for_each_rtx callback
	to being a function that examines each subrtx itself.
	(thread_jump): Update accordingly.

From-SVN: r214626
2014-08-28 06:22:20 +00:00
Richard Sandiford
f8305d18b8 combine-stack-adj.c: Include rtl-iter.h.
gcc/
	* combine-stack-adj.c: Include rtl-iter.h.
	(record_stack_refs_data): Delete.
	(record_stack_refs): Turn from being a for_each_rtx callback
	to being a function that examines each subrtx itself.
	Take a pointer to the reflist.  Invert sense of return value
	so that true means success and false means failure.  Don't
	handle null rtxes.
	(combine_stack_adjustments_for_block): Update accordingly.

From-SVN: r214625
2014-08-28 06:22:16 +00:00
Richard Sandiford
46bbda0375 combine.c (record_truncated_value): Turn from being a for_each_rtx callback to a function that takes an rtx and...
gcc/
	* combine.c (record_truncated_value): Turn from being a for_each_rtx
	callback to a function that takes an rtx and returns a bool
	(record_truncated_values): Use FOR_EACH_SUBRTX_VAR instead of
	for_each_rtx.

From-SVN: r214624
2014-08-28 06:22:12 +00:00
Richard Sandiford
1ecb5b94a1 combine.c: Include rtl-iter.h.
gcc/
	* combine.c: Include rtl-iter.h.
	(unmentioned_reg_p_1): Delete.
	(unmentioned_reg_p): Use FOR_EACH_SUBRTX rather than for_each_rtx.
	Don't handle null rtxes.

From-SVN: r214623
2014-08-28 06:22:07 +00:00
Richard Sandiford
e9f56944fd calls.c: Include rtl-iter.h.
gcc/
	* calls.c: Include rtl-iter.h.
	(internal_arg_pointer_based_exp_1): Delete.
	(internal_arg_pointer_based_exp): Take a const_rtx.
	Use FOR_EACH_SUBRTX to iterate over subrtxes.

From-SVN: r214622
2014-08-28 06:21:59 +00:00
Richard Sandiford
1cb22a678b caller-save.c: Include rtl-iter.h.
gcc/
	* caller-save.c: Include rtl-iter.h.
	(add_used_regs_1): Delete.
	(add_used_regs): Use FOR_EACH_SUBRTX rather than for_each_rtx
	to iterate over subrtxes.  Assert that any remaining pseudos
	have been spilled.

From-SVN: r214621
2014-08-28 06:21:54 +00:00
Richard Sandiford
b8ec23acb8 bt-load.c: Include rtl-iter.h.
gcc/
	* bt-load.c: Include rtl-iter.h.
	(btr_reference_found, find_btr_reference, btr_referenced_p): Delete.
	(find_btr_use): Move further up file.  Use FOR_EACH_SUBRTX_PTR
	to iterate over subrtxes.
	(insn_sets_btr_p, new_btr_user, compute_defs_uses_and_gen): Use
	find_btr_use rather than btr_referenced_p.

From-SVN: r214620
2014-08-28 06:21:50 +00:00
Richard Sandiford
403837b4cb alias.c: Include rtl-iter.h.
gcc/
	* alias.c: Include rtl-iter.h.
	(refs_newer_value_cb): Delete.
	(refs_newer_value_p): Use FOR_EACH_SUBRTX instead of for_each_rtx.

From-SVN: r214619
2014-08-28 06:21:44 +00:00
Richard Sandiford
476dd0ce18 rtl-iter.h: New file.
gcc/
	* rtl-iter.h: New file.
	* rtlanal.c: Include it.
	(rtx_all_subrtx_bounds, rtx_nonconst_subrtx_bounds): New variables.
	(generic_subrtx_iterator <T>::add_single_to_queue)
	(generic_subrtx_iterator <T>::add_subrtxes_to_queue)
	(generic_subrtx_iterator <T>::free_array): New functions.
	(generic_subrtx_iterator <T>::LOCAL_ELEMS): Define.
	(generic_subrtx_iterator <const_rtx_accessor>)
	(generic_subrtx_iterator <rtx_var_accessor>
	(generic_subrtx_iterator <rtx_ptr_accessor>): Instantiate.
	(setup_reg_subrtx_bounds): New function.
	(init_rtlanal): Call it.

From-SVN: r214618
2014-08-28 06:20:12 +00:00
Edward Smith-Rowland
7c05e50c73 PR cpp/23827 - standard C++ should not have hex float preprocessor
libcpp/

2014-08-27  Edward Smith-Rowland  <3dw4rd@verizon.net>

	PR cpp/23827 - standard C++ should not have hex float preprocessor
	tokens
	* libcpp/init.c (lang_flags): Change CXX98 flag for extended numbers
	from 1 to 0.
	* libcpp/expr.c (cpp_classify_number): Weite error message for improper
	use of hex floating literal.


gcc/testsuite/

2014-08-27  Edward Smith-Rowland  <3dw4rd@verizon.net>

	PR cpp/23827 - standard C++ should not have hex float preprocessor
	tokens
	* g++.dg/cpp/pr23827_cxx11.C: New.
	* g++.dg/cpp/pr23827_cxx98.C: New.
	* g++.dg/cpp/pr23827_cxx98_neg.C: New.
	* gcc.dg/cpp/pr23827_c90.c: New.
	* gcc.dg/cpp/pr23827_c90_neg.c: New.
	* gcc.dg/cpp/pr23827_c99.c: New.

From-SVN: r214616
2014-08-28 02:38:24 +00:00
GCC Administrator
241622a514 Daily bump.
From-SVN: r214615
2014-08-28 00:16:44 +00:00
Kaz Kojima
1284f55903 re PR target/62261 ([sh64] ICE for negative shift counts)
PR target/62261
        * config/sh/sh.md (ashlsi3): Handle negative shift count for
	TARGET_SHMEDIA.
	(ashldi3, ashrsi3, ashrdi3, lshrsi3, lshrdi3): Likewise.

From-SVN: r214612
2014-08-27 23:25:14 +00:00