Commit Graph

132423 Commits

Author SHA1 Message Date
David Malcolm c5241a21a3 tablejump_p takes an rtx_insn
gcc/
2014-08-28  David Malcolm  <dmalcolm@redhat.com>

	* rtl.h (tablejump_p): Strengthen first param from const_rtx to
	const rtx_insn *.
	(label_is_jump_target_p): Likewise for second param.

	* rtlanal.c (tablejump_p): Likewise for param "insn".
	(label_is_jump_target_p): Likewise for param "jump_insn".

From-SVN: r214696
2014-08-28 20:51:33 +00:00
David Malcolm 9321cf00db find_first_parameter_load params and return type
gcc/
2014-08-28  David Malcolm  <dmalcolm@redhat.com>

	* rtl.h (find_first_parameter_load): Strengthen return type and
	both params from rtx to rtx_insn *.
	* rtlanal.c (find_first_parameter_load): Strengthen return type,
	both params and locals "before", "first_set" from rtx to
	rtx_insn *.  Remove now-redundant cast.
	* except.c (sjlj_mark_call_sites): Use NULL rather than NULL_RTX.

From-SVN: r214695
2014-08-28 20:49:58 +00:00
David Malcolm bdda9b179d Delete find_last_value
gcc/
2014-08-28  David Malcolm  <dmalcolm@redhat.com>

	* rtl.h (find_last_value): Delete.
	* rtlanal.c (find_last_value): Delete.

From-SVN: r214694
2014-08-28 20:47:49 +00:00
David Malcolm dc01c3d194 Work towards NEXT_INSN/PREV_INSN requiring insns as their params
gcc/
2014-08-28  David Malcolm  <dmalcolm@redhat.com>

	* cfgexpand.c (pass_expand::execute): Strengthen local "after"
	from rtx to rtx_insn *.
	* cfgrtl.c (force_nonfallthru_and_redirect): Replace use of local
	rtx "note" with new local rtx_insn * "new_head" when calculating
	head insn of new basic block.
	* combine.c (combine_split_insns): Strengthen return type and local
	"ret" from rtx to rtx_insn *.
	(likely_spilled_retval_p): Likewise for locals "use" and "p".
	(try_combine): Eliminate local "m_split", splitting into new
	locals "m_split_insn" and "m_split_pat".
	(find_split_point): Strengthen local "seq" from rtx into
	rtx_insn *.
	* config/spu/spu.c (spu_machine_dependent_reorg): Likewise for
	locals "label", "branch".
	* config/spu/spu.md (define_expand "smulsi3_highpart"): Likewise
	for local "insn".
	(define_expand "umulsi3_highpart"): Likewise for local "insn".
	* dse.c (note_add_store_info): Likewise for fields "first",
	"current".
	(note_add_store): Likewise for local "insn".
	(emit_inc_dec_insn_before): Likewise for locals "insn",
	"new_insn", "cur".
	(find_shift_sequence): Likewise for locals "shift_seq", "insn".
	(replace_read): Likewise for locals "insns", "this_insn".
	* dwarf2cfi.c (dw_trace_info): Likewise for field "eh_head".
	(notice_eh_throw): Likewise for param "insn".
	(before_next_cfi_note): Likewise for return type, param, and local
	"prev".
	(connect_traces): Likewise for local "note".
	* emit-rtl.c (reset_all_used_flags): Likewise for local "p".
	(verify_rtl_sharing): Likewise.
	(unshare_all_rtl_in_chain): Likewise for param "insn".
	(get_first_nonnote_insn): Likewise for local "insn".
	(get_last_nonnote_insn): Likewise.  Introduce local rtx_sequence *
	"seq" and use its methods to clarify things.
	(next_insn): Strengthen return type from rtx to rtx_insn *.
	Rename param "insn" to "uncast_insn" and reintroduce "insn" as a
	local rtx_insn * using a checked cast, dropping a checked cast
	made redundant by this change.  Use a cast to and method of
	rtx_sequence to clarify the code.
	(previous_insn): Rename param "insn" to "uncast_insn" and
	reintroduce "insn" as a local rtx_insn * using a checked cast,
	dropping a checked cast made redundant by this change.  Use a cast
	to and method of rtx_sequence to clarify the code.
	(next_nonnote_insn): Rename param "insn" to "uncast_insn" and
	reintroduce "insn" as a local rtx_insn * using a checked cast,
	dropping a checked cast made redundant by this change.
	(next_nonnote_insn_bb): Likewise.
	(prev_nonnote_insn): Likewise.
	(prev_nonnote_insn_bb): Likewise.
	(next_nondebug_insn): Likewise.
	(prev_nondebug_insn): Likewise.
	(next_nonnote_nondebug_insn): Likewise.
	(prev_nonnote_nondebug_insn): Likewise.
	(next_real_insn): Likewise.
	(prev_real_insn): Likewise.
	(next_active_insn): Likewise.
	(prev_active_insn): Likewise.
	(next_cc0_user): Likewise.  Use rtx_sequence and a method for
	clarity.
	(prev_cc0_setter): Likewise.
	(try_split): Rename param "trial" to "uncast_trial" and
	reintroduce "insn" as a local rtx_insn * using a checked cast,
	dropping checked casts made redundant by this change.
	Strengthen locals "seq", "tem", "insn_last", "insn", "next" from
	rtx to rtx_insn *.
	(remove_insn): Rename param "insn" to "uncast_insn" and
	reintroduce "insn" as a local rtx_insn * using a checked cast.
	(emit_pattern_after_setloc): Likewise for param "after", as
	"uncast_after".
	(emit_pattern_after): Likewise.  Strengthen local "prev" from
	rtx to rtx_insn *.
	(emit_pattern_before_setloc): Rename param "before" to
	"uncast_before" and reintroduce "before" as a local rtx_insn *
	using a checked cast.  Strengthen locals "first", "last" from
	rtx to rtx_insn *.
	(emit_pattern_before): Likewise rename/cast param "before" to
	"uncast_before". Strengthen local "next" from rtx to rtx_insn *.
	* except.c (copy_reg_eh_region_note_forward): Strengthen param
	"first" and local "insn" from rtx to rtx_insn *.
	(copy_reg_eh_region_note_backward): Likewise for param "last"
	and local "insn".
	* expr.c (fixup_args_size_notes): Rename param "last" to
	"uncast_last" and reintroduce "last" as a local rtx_insn *
	using a checked cast.  Strengthen local "insn" from rtx to
	rtx_insn *.
	* function.c (set_insn_locations): Strengthen param "insn" from
	rtx to rtx_insn *.
	(record_insns): Likewise for param "insns" and local "tmp".
	(active_insn_between): Rename param "tail" to
	"uncast_tail" and reintroduce "tail" as a local rtx_insn *
	using a checked cast.
	(thread_prologue_and_epilogue_insns): Split out top-level local
	rtx "seq" into three different rtx_insn * locals.  Strengthen
	local "prologue_seq" from rtx to rtx_insn *.
	* gcse.c (insert_insn_end_basic_block): Strenghen local "insn"
	from rtx to rtx_insn *.
	* haifa-sched.c (initiate_bb_reg_pressure_info): Likewise.
	(priority): Likewise for locals "prev_first", "twin".
	(setup_insn_max_reg_pressure): Likewise for param "after".
	(sched_setup_bb_reg_pressure_info): Likewise.
	(no_real_insns_p): Strengthen params from const_rtx to
	const rtx_insn *.
	(schedule_block): Strengthen local "next_tail" from rtx to
	rtx_insn *.
	* ifcvt.c (find_active_insn_before): Strengthen return type and
	param "insn" from rtx to rtx_insn *.
	(find_active_insn_after): Likewise.
	(cond_exec_process_insns): Likewise for param "start" and local "insn".
	(cond_exec_process_if_block): Likewise for locals "then_start",
	"then_end", "else_start", "else_end", "insn", "start", "end", "from".
	(noce_process_if_block): Likewise for local "jump".
	(merge_if_block): Likewise for two locals named "end".
	(cond_exec_find_if_block): Likewise for local "last_insn".
	* jump.c (delete_related_insns): Rename param "insn" to
	"uncast_insn" and reintroduce "insn" as a local rtx_insn * using a
	checked cast.  Strengthen local "p" from rtx to rtx_insn *.
	* lra-constraints.c (inherit_reload_reg): Replace NULL_RTX with
	NULL.
	(split_reg): Likewise.
	* lra.c (lra_process_new_insns): Likewise.
	* modulo-sched.c (permute_partial_schedule): Strengthen param
	"last" from rtx to rtx_insn *.
	* optabs.c (add_equal_note): Likewise for param "insns" and local
	"last_insn".
	(expand_binop_directly): Add checked casts to rtx_insn * within
	NEXT_INSN (pat) uses.
	(expand_unop_direct): Likewise.
	(maybe_emit_unop_insn): Likewise.
	* recog.c (peep2_attempt): Strengthen locals "last",
	"before_try", "x" from rtx to rtx_insn *.
	* reorg.c (optimize_skip): Strengthen return type and local
	"delay_list" from rtx to rtx_insn_list *.  Strengthen param "insn"
	and locals "trial", "next_trial" from rtx to rtx_insn *.
	* resource.c (next_insn_no_annul): Strengthen return type and
	param "insn" from rtx to rtx_insn *.  Use a cast to and method of
	rtx_sequence to clarify the code.
	(mark_referenced_resources): Add a checked cast to rtx_insn *
	within PREV_INSN (x).
	(find_dead_or_set_registers): Strengthen return type, param
	"target", locals "insn", "next", "jump_insn", "this_jump_insn"
	from rtx to rtx_insn *.  Strengthen param "jump_target" from rtx *
	to rtx_insn **.
	(mark_target_live_regs): Strengthen params "insns" and "target",
	locals "insn", "jump_target", "start_insn", "stop_insn" from rtx
	to rtx_insn *.  Use cast to and method of rtx_sequence to clarify
	the code.
	* resource.h (mark_target_live_regs): Strengthen params 1 and 2
	from rtx to rtx_insn *.
	* rtl.h (copy_reg_eh_region_note_forward): Strengthen second param
	from rtx to rtx_insn *.
	(copy_reg_eh_region_note_backward): Likewise.
	(unshare_all_rtl_in_chain): Likewise for sole param.
	(dump_rtl_slim): Strengthen second and third params from const_rtx
	to const rtx_insn *.
	* sched-deps.c (sched_free_deps): Strengthen params "head" and
	"tail" and locals "insn", "next_tail" from rtx to rtx_insn *.
	* sched-ebb.c (init_ready_list): Strengthen locals "prev_head",
	"next_tail" from rtx to rtx_insn *.
	(begin_move_insn): Likewise for local "next".
	* sched-int.h (sched_free_deps): Likewise for first and second
	params.
	(no_real_insns_p): Strengthen both params from const_rtx to
	const rtx_insn *.
	(sched_setup_bb_reg_pressure_info): Strengthen second params from
	rtx to rtx_insn *.
	* sched-rgn.c (init_ready_list): Likewise for locals "prev_head",
	"next_tail".
	* sched-vis.c (dump_rtl_slim): Strengthen params "first", "last"
	and locals "insn", "tail" from const_rtx to const rtx_insn *.
	(rtl_dump_bb_for_graph): Strengthen local "insn" from rtx to
	rtx_insn *.
	(debug_rtl_slim): Strengthen params "first" and "last" from
	const_rtx to const rtx_insn *.
	* shrink-wrap.c (try_shrink_wrapping): Strengthen param
	"prologue_seq" and locals "seq", "p_insn" from rtx to rtx_insn *.
	(convert_to_simple_return): Likewise for param "returnjump".
	* shrink-wrap.h (try_shrink_wrapping): Likewise for param
	"prologue_seq".
	(convert_to_simple_return): Likewise for param "returnjump".
	* valtrack.c (propagate_for_debug): Likewise for params
	"insn", "last".
	* valtrack.h (propagate_for_debug): Likewise for second param.

From-SVN: r214693
2014-08-28 20:45:40 +00:00
David Malcolm 8ba24b7b5f insn_current_reference_address takes an rtx_insn
gcc/
2014-08-28  David Malcolm  <dmalcolm@redhat.com>

	* output.h (insn_current_reference_address): Strengthen param
	from rtx to rtx_insn *.
	* final.c (insn_current_reference_address): Likewise.

From-SVN: r214692
2014-08-28 20:37:15 +00:00
David Malcolm eefc72edb9 inside_basic_block_p requires a const rtx_insn *
gcc/
2014-08-28  David Malcolm  <dmalcolm@redhat.com>

	* basic-block.h (inside_basic_block_p): Strengthen param from
	const_rtx to const rtx_insn *.
	* cfgbuild.c (inside_basic_block_p): Likewise.

From-SVN: r214691
2014-08-28 20:35:42 +00:00
David Malcolm 7583d99aa7 Use rtx_insn in more places in dwarf2cfi.c
gcc/
2014-08-28  David Malcolm  <dmalcolm@redhat.com>

	* dwarf2cfi.c (dw_trace_info): Strengthen field "head" from rtx to
	rtx_insn *.
	(get_trace_info): Likewise for param "insn".
	(save_point_p): Likewise.
	(maybe_record_trace_start): Likewise for both params.
	(maybe_record_trace_start_abnormal): Likewise.
	(create_trace_edges): Likewise for sole param and for three of the
	locals named "lab".
	(scan_trace): Strengthen local "prev", "insn", "control" from rtx
	to rtx_insn *, and update a call to pat->element to pat->insn.

From-SVN: r214689
2014-08-28 19:08:12 +00:00
David Malcolm e8c038cab2 Convert forced_labels from an EXPR_LIST to an INSN_LIST
gcc/
2014-08-28  David Malcolm  <dmalcolm@redhat.com>

	* function.h (struct expr_status): Convert field "x_forced_labels"
	from rtx_expr_list * to rtx_insn_list *.

	* cfgbuild.c (make_edges): Convert local "x" from an
	rtx_expr_list * to an rtx_insn_list *, replacing use of
	"element" method with "insn" method.
	* dwarf2cfi.c (create_trace_edges): Likewise for local "lab".
	* except.c (sjlj_emit_dispatch_table): Replace use of
	gen_rtx_EXPR_LIST with gen_rtx_INSN_LIST when prepending to
	forced_labels.
	* jump.c (rebuild_jump_labels_1): Convert local "insn" from an
	rtx_expr_list * to an rtx_insn_list *, replacing use of
	"element" method with "insn" method.
	* reload1.c (set_initial_label_offsets): Likewise for local "x".
	* stmt.c (label_rtx): Strengthen local "ref" from rtx to
	rtx_insn *, adding a checked cast.  Replace use of
	gen_rtx_EXPR_LIST with gen_rtx_INSN_LIST when prepending it to
	forced_labels.
	(expand_label): Likewise for local "label_r".

From-SVN: r214688
2014-08-28 19:05:44 +00:00
David Malcolm b5241a5a9c Convert nonlocal_goto_handler_labels from an EXPR_LIST to an INSN_LIST
gcc/
2014-08-28  David Malcolm  <dmalcolm@redhat.com>

	* function.h (struct rtl_data): Convert field
	"x_nonlocal_goto_handler_labels" from rtx_expr_list * to
	rtx_insn_list *.
	* rtl.h (remove_node_from_insn_list): New prototype.

	* builtins.c (expand_builtin): When prepending to
	nonlocal_goto_handler_labels, use gen_rtx_INSN_LIST rather than
	gen_rtx_EXPR_LIST.
	* cfgbuild.c (make_edges): Convert local "x" from rtx_expr_list *
	to rtx_insn_list *, and use its "insn" method rather than
	"element" method.
	* cfgrtl.c (delete_insn): Use new function
	remove_node_from_insn_list rather than
	remove_node_from_expr_list.
	(cfg_layout_initialize): Convert local "x" from rtx_expr_list *
	to rtx_insn_list *, and use its "insn" method rather than
	"element" method.
	* dwarf2cfi.c (create_trace_edges): Likewise for local "lab".
	* reload1.c (set_initial_label_offsets): Likewise for local "x".
	* rtlanal.c (remove_node_from_insn_list): New function, adapted
	from remove_node_from_expr_list.
	* stmt.c (expand_label): When prepending to
	nonlocal_goto_handler_labels, use gen_rtx_INSN_LIST rather than
	gen_rtx_EXPR_LIST.

From-SVN: r214687
2014-08-28 19:03:22 +00:00
David Malcolm f48bd60e3a Strengthen return_label and naked_return_label to rtx_code_label *
gcc/
2014-08-28  David Malcolm  <dmalcolm@redhat.com>

	* function.h (struct rtl_data): Strengthen fields "x_return_label"
	and "x_naked_return_label" from rtx to rtx_code_label *.

From-SVN: r214686
2014-08-28 19:01:18 +00:00
David Malcolm e6eda74618 Make SET_NEXT_INSN/SET_PREV_INSN require an rtx_insn
gcc/
2014-08-28  David Malcolm  <dmalcolm@redhat.com>

	* rtl.h (SET_PREV_INSN): Strengthen param from rtx to rtx_insn *.
	(SET_NEXT_INSN): Likewise.
	(gen_rtvec_v): Add an overload for param types (int, rtx_insn **).

	* config/c6x/c6x.c (gen_one_bundle): Strengthen param "slot" from
	rtx * to rtx_insn **.  Introduce a new local rtx "seq", using it
	to split out the SEQUENCE from local "bundle", strengthening the
	latter from rtx to rtx_insn * to hold the insn holding the SEQUENCE.
	Strengthen locals "t" and "insn" from rtx to rtx_insn *.
	(c6x_gen_bundles): Strengthen locals "insn", "next", "last_call"
	and the type of the elements of the "slot" array from rtx to
	rtx_insn *.
	(reorg_split_calls): Likewise for locals "insn" and "next", and
	the type of the elements of the "slot" array.

	* config/frv/frv.c (frv_nops): Likewise for the elements of this
	array.
	(frv_function_prologue): Likewise for locals "insn", "next",
	"last_call".
	(frv_register_nop): Introduce a local "nop_insn" to be the
	rtx_insn * containing rtx "nop".

	* config/mep/mep.c (mep_make_bundle): Param "core" is sometimes
	used as an insn and sometimes as a pattern, so rename it to
	"core_insn_or_pat", and introduce local rtx_insn * "core_insn",
	using it where dealing with the core insn.

	* config/picochip/picochip.c (reorder_var_tracking_notes):
	Strengthen locals "insn", "next", "last_insn", "queue",
	"next_queue", "prev" from rtx to rtx_insn *.

	* emit-rtl.c (gen_rtvec_v): Add overloaded implementation for when
	the second param is an rtx_insn ** rather than an rtx **.
	(link_insn_into_chain): Strengthen locals "seq" and "sequence"
	from rtx to rtx_sequence *, and introduce local named "sequence",
	using methods of rtx_sequence to clarify the code.
	(remove_insn): Introduce local rtx_sequence * named "sequence" and
	use its methods.
	(emit_insn_after_1): Strengthen return type from rtx to rtx_insn *.
	Rename param "after" to "uncast_after", reintroducing "after" as a
	local rtx_insn * with a checked cast.
	(emit_pattern_after_noloc): Rename param "after" to "uncast_after",
	reintroducing "after" as a local rtx_insn * with a checked cast.
	Strengthen local "last" from rtx to rtx_insn * and remove the
	now-redundant checked casts.
	(copy_delay_slot_insn): Strengthen return type and param from rtx
	to rtx_insn *.

	* haifa-sched.c (reemit_notes): Strengthen params "insn" and
	"last" from rtx to rtx_insn *.

From-SVN: r214685
2014-08-28 18:59:13 +00:00
David Malcolm f8f0516ef6 Use rtx subclasses in more places in reorg.c
gcc/
2014-08-28  David Malcolm  <dmalcolm@redhat.com>

	* emit-rtl.h (copy_delay_slot_insn): Strengthen return type and
	param from rtx to rtx_insn *.

	* emit-rtl.c (copy_delay_slot_insn): Likewise.

	* reorg.c (skip_consecutive_labels): Strengthen return type, param
	and local "insn" from rtx to rtx_insn *.
	(unfilled_slots_base): Strengthen type from rtx * to rtx_insn **.
	(unfilled_slots_next): Likewise.
	(function_return_label): Strengthen from rtx to rtx_code_label *.
	(function_simple_return_label): Likewise.
	(first_active_target_insn): Strengthen return type and param from
	rtx to rtx_insn *.
	(find_end_label): Strengthen return type from rtx to
	rtx_code_label *; strengthen locals as appropriate.
	(emit_delay_sequence): Strengthen return type, param "insn" and
	local "seq_insn" from rtx to rtx_insn *.  Strengthen param "list"
	and local "li" from rtx to rtx_insn_list *, using methods of
	rtx_insn_list for clarity and typesafety.
	(add_to_delay_list): Strengthen return type and param "insn" from
	rtx to rtx_insn *.  Strengthen param "delay_list" from rtx to
	rtx_insn_list * and use methods of rtx_insn_list.
	(delete_from_delay_slot): Strengthen return type, param "insn",
	locals "trial", "seq_insn", "prev" from rtx to rtx_insn *.
	Strengthen local "seq" from rtx to rtx_sequence *, and local
	"delay_list" from rtx to rtx_insn_list *, using methods of
	rtx_sequence for clarity and type-safety.
	(delete_scheduled_jump): Add checked cast when invoking
	delete_from_delay_slot.  Strengthen local "trial" from rtx to
	rtx_insn *.
	(optimize_skip): Strengthen return type and local "delay_list"
	from rtx to rtx_insn_list *.  Strengthen local "trial" from rtx to
	rtx_insn *.
	(steal_delay_list_from_target): Strengthen return type, param
	"delay_list" and local "new_delay_list" from rtx to
	rtx_insn_list *.  Strengthen param "seq" from rtx to
	rtx_sequence *.  Strengthen param "pnew_thread" from rtx * to
	rtx_insn **.
	Split out local "temp" into multiple more-tightly scoped locals:
	sometimes an rtx_insn_list *, and once a rtx_insn *.  Use methods
	of rtx_insn_list and rtx_sequence for clarity and typesafety.
	Strengthen locals named "trial" from rtx to rtx_insn *.
	(steal_delay_list_from_fallthrough): Strengthen return type and
	param "delay_list" from rtx to rtx_insn_list *.  Strengthen param
	"seq" from rtx to rtx_sequence *.  Use methods of rtx_sequence.
	Strengthen local "trial" from rtx to rtx_insn *.
	(try_merge_delay_insns): Strength local "merged_insns" from rtx
	to rtx_insn_list * and use its methods.  Strengthen local "pat"
	from rtx to rtx_sequence * and use its methods.  Strengthen locals
	"dtrial" and "new_rtx" from rtx to rtx_insn *.
	(get_label_before): Strengthen return type and local "label" from
	rtx to rtx_insn *.
	(fill_simple_delay_slots): Likewise for locals "insn", "trial",
	"next_trial", "next", prev".  Strengthen local "delay_list" from
	rtx to rtx_insn_list *  Strengthen local "tmp" from rtx * to
	rtx_insn **.
	(follow_jumps): Strengthen return type, param "label" and locals
	"insn", "next", "value", "this_label" from rtx to rtx_insn *.
	(fill_slots_from_thread): Strengthen return type, param
	"delay_list" from rtx to rtx_insn_list *.  Strengthen params
	"insn", "thread", "opposite_thread" and locals "new_thread",
	"trial", "temp", "ninsn" from rtx to rtx_insn *.  Introduce local
	"sequence" from a checked cast to rtx_sequence so that we can call
	steal_delay_list_from_target and steal_delay_list_from_fallthrough
	with an rtx_sequence *.
	(fill_eager_delay_slots): Strengthen locals "insn", "target_label",
	"insn_at_target", "fallthrough_insn" from rtx to rtx_insn *.
	Strengthen local "delay_list" from rtx to rtx_insn_list *.
	(relax_delay_slots): Strengthen param "first" and locals "insn",
	"next", "trial", "delay_insn", "target_label" from rtx to
	rtx_insn *.  Strengthen local "pat" from rtx to rtx_sequence *.
	Introduce a local "trial_seq" for PATTERN (trial) of type
	rtx_sequence *, in both cases using methods of rtx_sequence.
	(dbr_schedule): Strengthen param "first" and locals "insn",
	"next", "epilogue_insn" from rtx to rtx_insn *.

From-SVN: r214684
2014-08-28 18:48:00 +00:00
Sebastian Pop e0c0c32535 check functionality of isl version 0.12
* config/isl.m4 (_ISL_CHECK_CT_PROG): Removed.
	(ISL_CHECK_VERSION): Check for functionality added to ISL 0.12 instead
	of checking for version number.
	* configure: Regenerated.
	* configure.ac (ISL_CHECK_VERSION): Do not use ISL version number.

From-SVN: r214683
2014-08-28 16:43:55 +00:00
Jonathan Wakely 7d594ac83d *: Fix incorrect standard references in comments.
* testsuite/ext/random/*: Fix incorrect standard references in
	comments.

From-SVN: r214681
2014-08-28 16:46:02 +01:00
Richard Biener b1aef01e16 re PR fortran/62283 (basic-block vectorization fails)
2014-08-28  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/62283
	* tree-vect-data-refs.c (vect_enhance_data_refs_alignment):
	Do not peel loops for alignment where the vector loop likely
	doesn't run at least VF times.

	* gfortran.dg/vect/pr62283.f: New testcase.
	* gcc.dg/tree-ssa/cunroll-5.c: Adjust.
	* gcc.dg/vect/costmodel/i386/costmodel-vect-31.c: Likewise.
	* gcc.dg/vect/costmodel/i386/costmodel-vect-33.c: Likewise.
	* gcc.dg/vect/costmodel/x86_64/costmodel-vect-31.c: Likewise.
	* gcc.dg/vect/costmodel/x86_64/costmodel-vect-33.c: Likewise.
	* gcc.dg/vect/vect-33.c: Likewise.

From-SVN: r214678
2014-08-28 13:13:45 +00:00
Bin Cheng f22ae1ecbd tree-ssa-loop-ivopts.c (iv_ca_add_use): Delete parameter important_candidates.
* tree-ssa-loop-ivopts.c (iv_ca_add_use): Delete parameter
	important_candidates.  Consider all important candidates if
	IVS doesn't give any result.  Remove check on ivs->upto.
	(try_add_cand_for): Call iv_ca_add_use only once.

From-SVN: r214674
2014-08-28 08:03:18 +00:00
Yury Gribov 8a2d2bf000 pr62089.c: Fix test on 32-bit platforms.
2014-08-28  Yury Gribov  <y.gribov@samsung.com>

	* c-c++-common/asan/pr62089.c: Fix test on 32-bit platforms.

From-SVN: r214673
2014-08-28 06:43:51 +00:00
Alexander Ivchenko c9b17fa5b5 AVX-512. Add byte/word plus/minus/avg.
gcc/
	(define_mode_iterator VI12_AVX2): Add V64QI and V32HI modes.
	(define_expand "<sse2_avx2>_<plusminus_insn><mode>3<mask_name>"): Add
	masking.
	(define_insn "*<sse2_avx2>_<plusminus_insn><mode>3<mask_name>"): Ditto.
	(define_expand "<sse2_avx2>_uavg<mode>3<mask_name>"): Ditto.
	(define_insn "*<sse2_avx2>_uavg<mode>3<mask_name>"): Ditto.
	(define_insn "*mul<mode>3"): Add EVEX version.

Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com>
Co-Authored-By: Anna Tikhonova <anna.tikhonova@intel.com>
Co-Authored-By: Ilya Tocar <ilya.tocar@intel.com>
Co-Authored-By: Ilya Verbin <ilya.verbin@intel.com>
Co-Authored-By: Kirill Yukhin <kirill.yukhin@intel.com>
Co-Authored-By: Maxim Kuznetsov <maxim.kuznetsov@intel.com>
Co-Authored-By: Michael Zolotukhin <michael.v.zolotukhin@intel.com>

From-SVN: r214672
2014-08-28 06:37:12 +00:00
Alexander Ivchenko 6edf4f24f3 AVX-512. Support 512-bit/masked interleave.
gcc/
	* config/i386/sse.md
	(define_insn "avx512bw_interleave_highv64qi<mask_name>"): New.
	(define_insn "avx2_interleave_highv32qi<mask_name>"): Add masking.
	(define_insn "vec_interleave_highv16qi<mask_name>"): Ditto.
	(define_insn "avx2_interleave_lowv32qi<mask_name>"): Ditto.
	(define_insn "vec_interleave_lowv16qi<mask_name>"): Ditto.
	(define_insn "avx2_interleave_highv16hi<mask_name>"): Ditto.
	(define_insn "vec_interleave_highv8hi<mask_name>"): Ditto.
	(define_insn "avx2_interleave_lowv16hi<mask_name>"): Ditto.
	(define_insn "vec_interleave_lowv8hi<mask_name>"): Ditto.
	(define_insn "avx2_interleave_highv8si<mask_name>"): Ditto.
	(define_insn "vec_interleave_highv4si<mask_name>"): Ditto.
	(define_insn "avx2_interleave_lowv8si<mask_name>"): Ditto.
	(define_insn "vec_interleave_lowv4si<mask_name>"): Ditto.
	(define_insn "vec_interleave_highv16qi<mask_name>"): New.
	(define_insn "avx512bw_interleave_highv32hi<mask_name>"): Ditto.
	(define_insn "<mask_codefor>avx512bw_interleave_lowv32hi<mask_name>"): Ditto.

Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com>
Co-Authored-By: Anna Tikhonova <anna.tikhonova@intel.com>
Co-Authored-By: Ilya Tocar <ilya.tocar@intel.com>
Co-Authored-By: Ilya Verbin <ilya.verbin@intel.com>
Co-Authored-By: Kirill Yukhin <kirill.yukhin@intel.com>
Co-Authored-By: Maxim Kuznetsov <maxim.kuznetsov@intel.com>
Co-Authored-By: Michael Zolotukhin <michael.v.zolotukhin@intel.com>

From-SVN: r214671
2014-08-28 06:35:36 +00:00
Alexander Ivchenko 98ee4d9bb7 AVX-512. Add vps[rl]ldq insn patterns.
gcc/
	* config/i386/sse.md
	(define_mode_iterator VIMAX_AVX2): Add V4TI mode.
	(define_insn "<sse2_avx2>_ashl<mode>3"): Add EVEX version.
	(define_insn "<sse2_avx2>_lshr<mode>3"): Ditto.

Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com>
Co-Authored-By: Anna Tikhonova <anna.tikhonova@intel.com>
Co-Authored-By: Ilya Tocar <ilya.tocar@intel.com>
Co-Authored-By: Ilya Verbin <ilya.verbin@intel.com>
Co-Authored-By: Kirill Yukhin <kirill.yukhin@intel.com>
Co-Authored-By: Maxim Kuznetsov <maxim.kuznetsov@intel.com>
Co-Authored-By: Michael Zolotukhin <michael.v.zolotukhin@intel.com>

From-SVN: r214670
2014-08-28 06:34:06 +00:00
Alexander Ivchenko e7b533a2d4 AVX-512. Add integer max/min.
gcc/
	* config/i386/sse.md
	(define_mode_iterator VI128_256): New.
	(define_insn "<mask_codefor><code><mode>3<mask_name>"): Ditto.

Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com>
Co-Authored-By: Anna Tikhonova <anna.tikhonova@intel.com>
Co-Authored-By: Ilya Tocar <ilya.tocar@intel.com>
Co-Authored-By: Ilya Verbin <ilya.verbin@intel.com>
Co-Authored-By: Kirill Yukhin <kirill.yukhin@intel.com>
Co-Authored-By: Maxim Kuznetsov <maxim.kuznetsov@intel.com>
Co-Authored-By: Michael Zolotukhin <michael.v.zolotukhin@intel.com>

From-SVN: r214669
2014-08-28 06:30:27 +00:00
Alexander Ivchenko dc3b8d27d4 AVX-512. Add vcvtps2[u]qq patterns.
gcc/
	* config/i386/sse.md
	(define_mode_iterator VI8_256_512): New.
	(define_insn "<mask_codefor>avx512dq_cvtps2qq<mode><mask_name><round_name>"):
	Ditto.
	(define_insn "<mask_codefor>avx512dq_cvtps2qqv2di<mask_name>"): Ditto.
	(define_insn "<mask_codefor>avx512dq_cvtps2uqq<mode><mask_name><round_name>"):
	Ditto.
	(define_insn "<mask_codefor>avx512dq_cvtps2uqqv2di<mask_name>"): Ditto.


Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com>
Co-Authored-By: Anna Tikhonova <anna.tikhonova@intel.com>
Co-Authored-By: Ilya Tocar <ilya.tocar@intel.com>
Co-Authored-By: Ilya Verbin <ilya.verbin@intel.com>
Co-Authored-By: Kirill Yukhin <kirill.yukhin@intel.com>
Co-Authored-By: Maxim Kuznetsov <maxim.kuznetsov@intel.com>
Co-Authored-By: Michael Zolotukhin <michael.v.zolotukhin@intel.com>

From-SVN: r214668
2014-08-28 06:28:56 +00:00
Richard Sandiford 82cfcdb632 varasm.c (compute_reloc_for_rtx_1): Take a const_rtx.
gcc/
	* varasm.c (compute_reloc_for_rtx_1): Take a const_rtx.  Remove the
	pointer to the cumulative reloc value and return the value for
	this reloc instead.
	(compute_reloc_for_rtx): Take a const_rtx.  Call
	compute_reloc_for_rtx_1 directly for SYMBOL_REF and LABEL_REF,
	avoiding any recursion.  Use FOR_EACH_SUBRTX rather than
	for_each_rtx for the CONST case.

From-SVN: r214667
2014-08-28 06:25:18 +00:00
Richard Sandiford 750b270a1d varasm.c (mark_constant): Replace this for_each_rtx callback with...
gcc/
	* varasm.c (mark_constant): Replace this for_each_rtx callback with...
	(mark_constants_in_pattern): ...this new function to iterate over
	all the subrtxes.
	(mark_constants): Update accordingly.

From-SVN: r214666
2014-08-28 06:25:14 +00:00
Richard Sandiford 11315a95c7 varasm.c: Include rtl-iter.h.
gcc/
	* varasm.c: Include rtl-iter.h.
	(const_rtx_hash_1): Take a const_rtx rather than an rtx *.
	Remove the pointer to the cumulative hashval_t and just return
	the hash for this rtx instead.  Remove recursive CONST_VECTOR case.
	(const_rtx_hash): Use FOR_EACH_SUBRTX instead of for_each_rtx.
	Accumulate the hashval_ts here instead of const_rtx_hash_1.

From-SVN: r214665
2014-08-28 06:25:10 +00:00
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