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.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214618 138bc75d-0d04-0410-961f-82ee72b054a4
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.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214619 138bc75d-0d04-0410-961f-82ee72b054a4
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.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214620 138bc75d-0d04-0410-961f-82ee72b054a4
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.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214621 138bc75d-0d04-0410-961f-82ee72b054a4
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.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214622 138bc75d-0d04-0410-961f-82ee72b054a4
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.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214623 138bc75d-0d04-0410-961f-82ee72b054a4
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.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214624 138bc75d-0d04-0410-961f-82ee72b054a4
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.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214625 138bc75d-0d04-0410-961f-82ee72b054a4
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.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214626 138bc75d-0d04-0410-961f-82ee72b054a4
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.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214627 138bc75d-0d04-0410-961f-82ee72b054a4
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.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214628 138bc75d-0d04-0410-961f-82ee72b054a4
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.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214629 138bc75d-0d04-0410-961f-82ee72b054a4
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.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214630 138bc75d-0d04-0410-961f-82ee72b054a4
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.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214631 138bc75d-0d04-0410-961f-82ee72b054a4
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.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214632 138bc75d-0d04-0410-961f-82ee72b054a4
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.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214633 138bc75d-0d04-0410-961f-82ee72b054a4
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.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214634 138bc75d-0d04-0410-961f-82ee72b054a4
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.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214635 138bc75d-0d04-0410-961f-82ee72b054a4
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.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214636 138bc75d-0d04-0410-961f-82ee72b054a4
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.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214637 138bc75d-0d04-0410-961f-82ee72b054a4