Commit fa7af581 by David Malcolm Committed by David Malcolm

final.c: Use rtx_insn (also touches output.c and config/arc/arc.c)

gcc/
	* output.h (final_scan_insn): Strengthen return type from rtx to
	rtx_insn *.
	(final_forward_branch_p): Likewise for param.
	(current_output_insn): Likewise for this global.

	* final.c (rtx debug_insn): Likewise for this variable.
	(current_output_insn): Likewise.
	(get_attr_length_1): Rename param "insn" to "uncast_insn",
	adding "insn" back in as an rtx_insn * with a checked cast, so
	that macro ADJUST_INSN_LENGTH can be passed an rtx_insn * as the
	first param.
	(compute_alignments): Strengthen local "label" from rtx to
	rtx_insn *.
	(shorten_branches): Rename param from "first" to "uncast_first",
	introducing a new local rtx_insn * "first" using a checked cast to
	effectively strengthen "first" from rtx to rtx_insn * without
	affecting the type signature.  Strengthen locals "insn", "seq",
	"next", "label" from rtx to rtx_insn *.
	(change_scope): Strengthen param "orig_insn" and local "insn" from
	rtx to rtx_insn *.
	(final_start_function): Rename param from "first" to "uncast_first",
	introducing a new local rtx_insn * "first" using a checked cast to
	effectively strengthen "first" from rtx to rtx_insn * without
	affecting the type signature.  Strengthen local "insn" from rtx to
	rtx_insn *.
	(dump_basic_block_info): Strengthen param "insn" from rtx to
	rtx_insn *.
	(final): Rename param from "first" to "uncast_first",
	introducing a new local rtx_insn * "first" using a checked cast to
	effectively strengthen "first" from rtx to rtx_insn * without
	affecting the type signature.  Strengthen locals "insn", "next"
	from rtx to rtx_insn *.
	(output_alternate_entry_point): Strengthen param "insn" from rtx to
	rtx_insn *.
	(call_from_call_insn): Strengthen param "insn" from rtx to
	rtx_call_insn *.
	(final_scan_insn): Rename param from "insn" to "uncast_insn",
	introducing a new local rtx_insn * "insn" using a checked cast to
	effectively strengthen "insn" from rtx to rtx_insn * without
	affecting the type signature.  Strengthen return type and locals
	"next", "note", "prev", "new_rtx" from rtx to rtx_insn *.  Remove
	now-redundant checked cast to rtx_insn * from both invocations of
	debug_hooks->var_location.  Convert CALL_P into a dyn_cast,
	introducing a local "call_insn" for use when invoking
	call_from_call_insn.
	(notice_source_line): Strengthen param "insn" from rtx to
	rtx_insn *.
	(leaf_function_p): Likewise for local "insn".
	(final_forward_branch_p): Likewise.
	(leaf_renumber_regs): Likewise for param "first".
	(rest_of_clean_state): Likewise for locals "insn" and "next".
	(self_recursive_call_p): Likewise for param "insn".
	(collect_fn_hard_reg_usage): Likewise for local "insn".
	(get_call_fndecl): Likewise for param "insn".
	(get_call_cgraph_rtl_info): Likewise.
	(get_call_reg_set_usage): Rename param from "insn" to "uncast_insn",
	introducing a new local rtx_insn * "insn" using a checked cast to
	effectively strengthen "insn" from rtx to rtx_insn * without
	affecting the type signature.

	* config/arc/arc.c (arc_final_prescan_insn): For now, add checked
	cast when assigning from param "insn" to current_output_insn.
	(arc_pad_return): Strengthen local "insn" from rtx to rtx_insn *
	so that we can assign it back to current_output_insn.

From-SVN: r214326
parent 836fca28
2014-08-22 David Malcolm <dmalcolm@redhat.com>
* output.h (final_scan_insn): Strengthen return type from rtx to
rtx_insn *.
(final_forward_branch_p): Likewise for param.
(current_output_insn): Likewise for this global.
* final.c (rtx debug_insn): Likewise for this variable.
(current_output_insn): Likewise.
(get_attr_length_1): Rename param "insn" to "uncast_insn",
adding "insn" back in as an rtx_insn * with a checked cast, so
that macro ADJUST_INSN_LENGTH can be passed an rtx_insn * as the
first param.
(compute_alignments): Strengthen local "label" from rtx to
rtx_insn *.
(shorten_branches): Rename param from "first" to "uncast_first",
introducing a new local rtx_insn * "first" using a checked cast to
effectively strengthen "first" from rtx to rtx_insn * without
affecting the type signature. Strengthen locals "insn", "seq",
"next", "label" from rtx to rtx_insn *.
(change_scope): Strengthen param "orig_insn" and local "insn" from
rtx to rtx_insn *.
(final_start_function): Rename param from "first" to "uncast_first",
introducing a new local rtx_insn * "first" using a checked cast to
effectively strengthen "first" from rtx to rtx_insn * without
affecting the type signature. Strengthen local "insn" from rtx to
rtx_insn *.
(dump_basic_block_info): Strengthen param "insn" from rtx to
rtx_insn *.
(final): Rename param from "first" to "uncast_first",
introducing a new local rtx_insn * "first" using a checked cast to
effectively strengthen "first" from rtx to rtx_insn * without
affecting the type signature. Strengthen locals "insn", "next"
from rtx to rtx_insn *.
(output_alternate_entry_point): Strengthen param "insn" from rtx to
rtx_insn *.
(call_from_call_insn): Strengthen param "insn" from rtx to
rtx_call_insn *.
(final_scan_insn): Rename param from "insn" to "uncast_insn",
introducing a new local rtx_insn * "insn" using a checked cast to
effectively strengthen "insn" from rtx to rtx_insn * without
affecting the type signature. Strengthen return type and locals
"next", "note", "prev", "new_rtx" from rtx to rtx_insn *. Remove
now-redundant checked cast to rtx_insn * from both invocations of
debug_hooks->var_location. Convert CALL_P into a dyn_cast,
introducing a local "call_insn" for use when invoking
call_from_call_insn.
(notice_source_line): Strengthen param "insn" from rtx to
rtx_insn *.
(leaf_function_p): Likewise for local "insn".
(final_forward_branch_p): Likewise.
(leaf_renumber_regs): Likewise for param "first".
(rest_of_clean_state): Likewise for locals "insn" and "next".
(self_recursive_call_p): Likewise for param "insn".
(collect_fn_hard_reg_usage): Likewise for local "insn".
(get_call_fndecl): Likewise for param "insn".
(get_call_cgraph_rtl_info): Likewise.
(get_call_reg_set_usage): Rename param from "insn" to "uncast_insn",
introducing a new local rtx_insn * "insn" using a checked cast to
effectively strengthen "insn" from rtx to rtx_insn * without
affecting the type signature.
* config/arc/arc.c (arc_final_prescan_insn): For now, add checked
cast when assigning from param "insn" to current_output_insn.
(arc_pad_return): Strengthen local "insn" from rtx to rtx_insn *
so that we can assign it back to current_output_insn.
2014-08-20 Pitchumani Sivanupandi <pitchumani.s@atmel.com>
* config/avr/avr-mcus.def: Remove atmega26hvg, atmega64rfa2,
......
......@@ -3943,7 +3943,7 @@ arc_final_prescan_insn (rtx insn, rtx *opvec ATTRIBUTE_UNUSED,
current_output_insn =
emit_insn_before (gen_nop (), NEXT_INSN (PREV_INSN (insn)));
final_scan_insn (current_output_insn, asm_out_file, optimize, 1, NULL);
current_output_insn = insn;
current_output_insn = as_a <rtx_insn *> (insn);
}
/* Restore extraction data which might have been clobbered by arc_hazard. */
extract_constrain_insn_cached (insn);
......@@ -8651,7 +8651,7 @@ arc_branch_size_unknown_p (void)
void
arc_pad_return (void)
{
rtx insn = current_output_insn;
rtx_insn *insn = current_output_insn;
rtx prev = prev_active_insn (insn);
int want_long;
......
......@@ -70,7 +70,7 @@ extern void final (rtx, FILE *, int);
/* The final scan for one insn, INSN. Args are same as in `final', except
that INSN is the insn being scanned. Value returned is the next insn to
be scanned. */
extern rtx final_scan_insn (rtx, FILE *, int, int, int *);
extern rtx_insn *final_scan_insn (rtx, FILE *, int, int, int *);
/* Replace a SUBREG with a REG or a MEM, based on the thing it is a
subreg of. */
......@@ -136,7 +136,7 @@ extern int leaf_function_p (void);
/* Return 1 if branch is a forward branch.
Uses insn_shuid array, so it works only in the final pass. May be used by
output templates to add branch prediction hints, for example. */
extern int final_forward_branch_p (rtx);
extern int final_forward_branch_p (rtx_insn *);
/* Return 1 if this function uses only the registers that can be
safely renumbered. */
......@@ -321,7 +321,7 @@ extern const char *weak_global_object_name;
extern rtx current_insn_predicate;
/* Last insn processed by final_scan_insn. */
extern rtx current_output_insn;
extern rtx_insn *current_output_insn;
/* Nonzero while outputting an `asm' with operands.
This means that inconsistencies are the user's fault, so don't die.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment