This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 075/236] final.c: Use rtx_insn (also touches output.c and config/arc/arc.c)


On 08/06/14 11:20, David Malcolm wrote:
In particular, after this patch, the first param passed to the
FINAL_PRESCAN_INSN macro is strengthened from rtx to rtx_insn *.

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".
	(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.
OK. I didn't check all the uncast_XXX thingies, but at least some of them go away in later patches. Presumably you verified the uncast_XXX thingies all go away in the end :-)

Patches #76-#91 are OK as well.

jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]