gcse.c (try_replace_reg): Use num_changes_pending.
2002-07-23 Jan Hubicka <jh@suse.cz> * gcse.c (try_replace_reg): Use num_changes_pending. * recog.c (num_changes_pending): New function. (validate_replace_src): Use validate_repalce_src_group. (validate_replace_src_group): New. * recog.h (validate_repalce_src_group): New. (num_changes_pending): Likewise. From-SVN: r55677
This commit is contained in:
parent
a0dc500c86
commit
2b773ee2c1
4 changed files with 33 additions and 8 deletions
|
@ -1,3 +1,12 @@
|
|||
2002-07-23 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
* gcse.c (try_replace_reg): Use num_changes_pending.
|
||||
* recog.c (num_changes_pending): New function.
|
||||
(validate_replace_src): Use validate_repalce_src_group.
|
||||
(validate_replace_src_group): New.
|
||||
* recog.h (validate_repalce_src_group): New.
|
||||
(num_changes_pending): Likewise.
|
||||
|
||||
Tue Jul 23 12:16:58 2002 J"orn Rennecke <joern.rennecke@superh.com>
|
||||
|
||||
* calls.c (emit_library_call_value_1): If
|
||||
|
|
|
@ -3977,10 +3977,9 @@ try_replace_reg (from, to, insn)
|
|||
int success = 0;
|
||||
rtx set = single_set (insn);
|
||||
|
||||
if (reg_mentioned_p (from, PATTERN (insn)))
|
||||
{
|
||||
success = validate_replace_src (from, to, insn);
|
||||
}
|
||||
validate_replace_src_group (from, to, insn);
|
||||
if (num_changes_pending () && apply_change_group ())
|
||||
success = 1;
|
||||
|
||||
if (!success && set && reg_mentioned_p (from, SET_SRC (set)))
|
||||
{
|
||||
|
|
23
gcc/recog.c
23
gcc/recog.c
|
@ -308,6 +308,13 @@ insn_invalid_p (insn)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Return number of changes made and not validated yet. */
|
||||
int
|
||||
num_changes_pending ()
|
||||
{
|
||||
return num_changes;
|
||||
}
|
||||
|
||||
/* Apply a group of changes previously issued with `validate_change'.
|
||||
Return 1 if all changes are valid, zero otherwise. */
|
||||
|
||||
|
@ -671,11 +678,10 @@ validate_replace_src_1 (x, data)
|
|||
}
|
||||
|
||||
/* Try replacing every occurrence of FROM in INSN with TO, avoiding
|
||||
SET_DESTs. After all changes have been made, validate by seeing if
|
||||
INSN is still valid. */
|
||||
SET_DESTs. */
|
||||
|
||||
int
|
||||
validate_replace_src (from, to, insn)
|
||||
void
|
||||
validate_replace_src_group (from, to, insn)
|
||||
rtx from, to, insn;
|
||||
{
|
||||
struct validate_replace_src_data d;
|
||||
|
@ -684,6 +690,15 @@ validate_replace_src (from, to, insn)
|
|||
d.to = to;
|
||||
d.insn = insn;
|
||||
note_uses (&PATTERN (insn), validate_replace_src_1, &d);
|
||||
}
|
||||
|
||||
/* Same as validate_repalace_src_group, but validate by seeing if
|
||||
INSN is still valid. */
|
||||
int
|
||||
validate_replace_src (from, to, insn)
|
||||
rtx from, to, insn;
|
||||
{
|
||||
validate_replace_src_group (from, to, insn);
|
||||
return apply_change_group ();
|
||||
}
|
||||
|
||||
|
|
|
@ -89,6 +89,8 @@ 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));
|
||||
extern void validate_replace_src_group PARAMS ((rtx, rtx, rtx));
|
||||
extern int num_changes_pending PARAMS ((void));
|
||||
#ifdef HAVE_cc0
|
||||
extern int next_insn_tests_no_inequality PARAMS ((rtx));
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue