summaryrefslogtreecommitdiff
path: root/gcc/gcse.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2002-07-23 14:08:10 +0200
committerGerald Pfeifer <gerald@gcc.gnu.org>2002-07-23 12:08:10 +0000
commit2b773ee2c1954b982aac0ee71fd6e5ae148e4691 (patch)
tree6ad4354996bd2595d502fa3e71a030e6cfb95ec4 /gcc/gcse.c
parenta0dc500c860478e0917fd98ad618ec65482fe395 (diff)
downloadgcc-2b773ee2c1954b982aac0ee71fd6e5ae148e4691.tar.gz
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/gcse.c')
-rw-r--r--gcc/gcse.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/gcse.c b/gcc/gcse.c
index 37fa2d610a1..620b98636be 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -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)))
{