diff options
author | Andreas Krebbel <Andreas.Krebbel@de.ibm.com> | 2012-04-24 07:01:52 +0000 |
---|---|---|
committer | Andreas Krebbel <krebbel@gcc.gnu.org> | 2012-04-24 07:01:52 +0000 |
commit | 57ac4c34019b76318bad402a8715992b65dcd969 (patch) | |
tree | 72bb3196b127f80e7d5b368328aa2ae12e943abc /gcc/recog.c | |
parent | d9030ea42a2aa2590f2d440d53e0f656f3b0e5d7 (diff) | |
download | gcc-57ac4c34019b76318bad402a8715992b65dcd969.zip gcc-57ac4c34019b76318bad402a8715992b65dcd969.tar.gz gcc-57ac4c34019b76318bad402a8715992b65dcd969.tar.bz2 |
recog.c (insn_invalid_p): Add IN_GROUP parameter and use validate_change to add clobbers if...
2012-04-24 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* recog.c (insn_invalid_p): Add IN_GROUP parameter and use
validate_change to add clobbers if IN_GROUP is nonzero.
(verify_changes): Call insn_invalid_p with IN_GROUP set to true.
* recog.h (insn_invalid_p): Add IN_GROUP parameter to function
prototype.
* gcse.c (process_insert_insn): Call insn_invalid_p with IN_GROUP
set to false.
* config/s390/s390.c (insn_invalid_p): Likewise.
From-SVN: r186748
Diffstat (limited to 'gcc/recog.c')
-rw-r--r-- | gcc/recog.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/gcc/recog.c b/gcc/recog.c index 8f04179..cb2bfd3 100644 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -309,10 +309,14 @@ canonicalize_change_group (rtx insn, rtx x) /* This subroutine of apply_change_group verifies whether the changes to INSN - were valid; i.e. whether INSN can still be recognized. */ + were valid; i.e. whether INSN can still be recognized. + + If IN_GROUP is true clobbers which have to be added in order to + match the instructions will be added to the current change group. + Otherwise the changes will take effect immediately. */ int -insn_invalid_p (rtx insn) +insn_invalid_p (rtx insn, bool in_group) { rtx pat = PATTERN (insn); int num_clobbers = 0; @@ -344,7 +348,10 @@ insn_invalid_p (rtx insn) newpat = gen_rtx_PARALLEL (VOIDmode, rtvec_alloc (num_clobbers + 1)); XVECEXP (newpat, 0, 0) = pat; add_clobbers (newpat, icode); - PATTERN (insn) = pat = newpat; + if (in_group) + validate_change (insn, &PATTERN (insn), newpat, 1); + else + PATTERN (insn) = pat = newpat; } /* After reload, verify that all constraints are satisfied. */ @@ -413,7 +420,7 @@ verify_changes (int num) } else if (DEBUG_INSN_P (object)) continue; - else if (insn_invalid_p (object)) + else if (insn_invalid_p (object, true)) { rtx pat = PATTERN (object); |