diff options
author | Bernd Schmidt <bernd.schmidt@codesourcery.com> | 2010-04-16 09:32:21 +0000 |
---|---|---|
committer | Bernd Schmidt <bernds@gcc.gnu.org> | 2010-04-16 09:32:21 +0000 |
commit | 6ddfdb0f7e310a026479c484e32d020b1cbeedf8 (patch) | |
tree | e2e650590b499c11d4614b72675674b86849b851 /gcc | |
parent | 5312b0660e6f24145896e84382d184c16c884bf1 (diff) | |
download | gcc-6ddfdb0f7e310a026479c484e32d020b1cbeedf8.zip gcc-6ddfdb0f7e310a026479c484e32d020b1cbeedf8.tar.gz gcc-6ddfdb0f7e310a026479c484e32d020b1cbeedf8.tar.bz2 |
recog.h (struct recog_data): New field is_operator.
* recog.h (struct recog_data): New field is_operator.
(struct insn_operand_data): New field is_operator.
* recog.c (extract_insn): Set recog_data.is_operator.
* genoutput.c (output_operand_data): Emit code to set the
is_operator field.
* reload.c (find_reloads): Use it rather than testing for an
empty constraint string.
From-SVN: r158403
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/genoutput.c | 2 | ||||
-rw-r--r-- | gcc/recog.c | 2 | ||||
-rw-r--r-- | gcc/recog.h | 5 | ||||
-rw-r--r-- | gcc/reload.c | 2 |
5 files changed, 20 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7f4c633..79f4c59 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2010-04-16 Bernd Schmidt <bernd.schmidt@codesourcery.com> + + * recog.h (struct recog_data): New field is_operator. + (struct insn_operand_data): New field is_operator. + * recog.c (extract_insn): Set recog_data.is_operator. + * genoutput.c (output_operand_data): Emit code to set the + is_operator field. + * reload.c (find_reloads): Use it rather than testing for an + empty constraint string. + 2010-04-16 Jakub Jelinek <jakub@redhat.com> * alias.c (memrefs_conflict_p): If x and y are the same VALUE, diff --git a/gcc/genoutput.c b/gcc/genoutput.c index e651cb4..b0be21c 100644 --- a/gcc/genoutput.c +++ b/gcc/genoutput.c @@ -266,6 +266,8 @@ output_operand_data (void) printf (" %d,\n", d->strict_low); + printf (" %d,\n", d->constraint == NULL ? 1 : 0); + printf (" %d\n", d->eliminable); printf(" },\n"); diff --git a/gcc/recog.c b/gcc/recog.c index 254e83a..0dea35f 100644 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -2082,6 +2082,7 @@ extract_insn (rtx insn) recog_data.operand_loc, recog_data.constraints, recog_data.operand_mode, NULL); + memset (recog_data.is_operator, 0, sizeof recog_data.is_operator); if (noperands > 0) { const char *p = recog_data.constraints[0]; @@ -2111,6 +2112,7 @@ extract_insn (rtx insn) for (i = 0; i < noperands; i++) { recog_data.constraints[i] = insn_data[icode].operand[i].constraint; + recog_data.is_operator[i] = insn_data[icode].operand[i].is_operator; recog_data.operand_mode[i] = insn_data[icode].operand[i].mode; /* VOIDmode match_operands gets mode from their real operand. */ if (recog_data.operand_mode[i] == VOIDmode) diff --git a/gcc/recog.h b/gcc/recog.h index 3354a66..3daac62 100644 --- a/gcc/recog.h +++ b/gcc/recog.h @@ -194,6 +194,9 @@ struct recog_data /* Gives the constraint string for operand N. */ const char *constraints[MAX_RECOG_OPERANDS]; + /* Nonzero if operand N is a match_operator or a match_parallel. */ + char is_operator[MAX_RECOG_OPERANDS]; + /* Gives the mode of operand N. */ enum machine_mode operand_mode[MAX_RECOG_OPERANDS]; @@ -260,6 +263,8 @@ struct insn_operand_data const char strict_low; + const char is_operator; + const char eliminable; }; diff --git a/gcc/reload.c b/gcc/reload.c index 4601b4a..2406b6b 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -3631,7 +3631,7 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known, || modified[j] != RELOAD_WRITE) && j != i /* Ignore things like match_operator operands. */ - && *recog_data.constraints[j] != 0 + && !recog_data.is_operator[j] /* Don't count an input operand that is constrained to match the early clobber operand. */ && ! (this_alternative_matches[j] == i |