Commit e251e2a2 by Jan Hubicka Committed by Jan Hubicka

gcse.c (try_replace_reg): Use validate_replace_rtx_subexp instead of replace_rtx.

	* gcse.c (try_replace_reg): Use validate_replace_rtx_subexp
	instead of replace_rtx.
	* recog.c (validate_replace_rtx_subexp): New function.
	* recog.h (validate_replace_rtx_subexp): Declare.

From-SVN: r35349
parent e8dc6d50
Sun Jul 30 20:42:21 MET DST 2000 Jan Hubicka <jh@suse.cz>
* gcse.c (try_replace_reg): Use validate_replace_rtx_subexp
instead of replace_rtx.
* recog.c (validate_replace_rtx_subexp): New function.
* recog.h (validate_replace_rtx_subexp): Declare.
Sun Jul 30 20:38:26 MET DST 2000 Jan Hubicka <jh@suse.cz>
* combine.c (simplify_set, make_extraction, make_compound_operation
......
......@@ -3578,8 +3578,10 @@ try_replace_reg (from, to, insn)
{
rtx simplified;
if (!validate_replace_rtx_subexp (from, to, insn, &XEXP (note, 0)))
abort();
src = XEXP (note, 0);
replace_rtx (src, from, to);
/* Try to simplify resulting note. */
simplified = simplify_rtx (src);
......
......@@ -603,6 +603,18 @@ validate_replace_rtx_1 (loc, from, to, object)
}
}
/* Try replacing every occurrence of FROM in subexpression LOC of INSN
with TO. After all changes have been made, validate by seeing
if INSN is still valid. */
int
validate_replace_rtx_subexp (from, to, insn, loc)
rtx from, to, insn, *loc;
{
validate_replace_rtx_1 (loc, from, to, insn);
return apply_change_group ();
}
/* Try replacing every occurrence of FROM in INSN with TO. After all
changes have been made, validate by seeing if INSN is still valid. */
......
......@@ -79,6 +79,7 @@ extern void cancel_changes PARAMS ((int));
extern int constrain_operands PARAMS ((int));
extern int memory_address_p PARAMS ((enum machine_mode, rtx));
extern int strict_memory_address_p PARAMS ((enum machine_mode, rtx));
extern int validate_replace_rtx_subexp PARAMS ((rtx, rtx, rtx, rtx *));
extern int validate_replace_rtx PARAMS ((rtx, rtx, rtx));
extern void validate_replace_rtx_group PARAMS ((rtx, rtx, rtx));
extern int validate_replace_src PARAMS ((rtx, rtx, rtx));
......
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