aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>1998-08-22 17:21:23 -0600
committerJeff Law <law@gcc.gnu.org>1998-08-22 17:21:23 -0600
commitedfac33e828bec837550da110999793dd436a551 (patch)
tree70f312d3059257dfbf517487941c65b16c1624aa /gcc
parent4cd864b2eb0b39981189653ebffcf3022531cdb8 (diff)
downloadgcc-edfac33e828bec837550da110999793dd436a551.zip
gcc-edfac33e828bec837550da110999793dd436a551.tar.gz
gcc-edfac33e828bec837550da110999793dd436a551.tar.bz2
recog.c (validate_replace_rtx_group): New function.
� * recog.c (validate_replace_rtx_group): New function. * recog.h (validate_replace_rtx_group): Declare it. * regmove.c (optimize_reg_copy_3): If any substitution fails, then undo the entire group of substitutions. From-SVN: r21909
Diffstat (limited to 'gcc')
-rw-r--r--gcc/recog.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/recog.c b/gcc/recog.c
index dd73a46..d472df0 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -550,6 +550,16 @@ validate_replace_rtx (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. */
+
+void
+validate_replace_rtx_group (from, to, insn)
+ rtx from, to, insn;
+{
+ validate_replace_rtx_1 (&PATTERN (insn), from, to, insn);
+}
+
/* 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. */