diff options
author | Jan Hubicka <jh@suse.cz> | 2002-07-23 14:08:10 +0200 |
---|---|---|
committer | Gerald Pfeifer <gerald@gcc.gnu.org> | 2002-07-23 12:08:10 +0000 |
commit | 2b773ee2c1954b982aac0ee71fd6e5ae148e4691 (patch) | |
tree | 6ad4354996bd2595d502fa3e71a030e6cfb95ec4 /gcc/recog.c | |
parent | a0dc500c860478e0917fd98ad618ec65482fe395 (diff) | |
download | gcc-2b773ee2c1954b982aac0ee71fd6e5ae148e4691.zip gcc-2b773ee2c1954b982aac0ee71fd6e5ae148e4691.tar.gz gcc-2b773ee2c1954b982aac0ee71fd6e5ae148e4691.tar.bz2 |
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
Diffstat (limited to 'gcc/recog.c')
-rw-r--r-- | gcc/recog.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/gcc/recog.c b/gcc/recog.c index 5b5d3dc..3769249 100644 --- a/gcc/recog.c +++ b/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 (); } |