]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
recog.h (struct recog_data): New field is_operator.
authorBernd Schmidt <bernd.schmidt@codesourcery.com>
Fri, 16 Apr 2010 09:32:21 +0000 (09:32 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Fri, 16 Apr 2010 09:32:21 +0000 (09:32 +0000)
* 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

gcc/ChangeLog
gcc/genoutput.c
gcc/recog.c
gcc/recog.h
gcc/reload.c

index 7f4c6333a98dfb5f9e8e7ad04802faed7f269014..79f4c59bcabfea138f96805013ae323729e25dc7 100644 (file)
@@ -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,
index e651cb4d8788ebf5873dc8cf80a7914180100b0a..b0be21c476b8462adf66d9cb77ab8616d433e538 100644 (file)
@@ -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");
index 254e83a9769d3f73fb5afeacb480c18411270a40..0dea35fb3d7eaa36967e3fae65371d394b1909bd 100644 (file)
@@ -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)
index 3354a66496a4508d5fcddc3517b40240f0c67fae..3daac6225c2e953fd5717084182602a7140b644b 100644 (file)
@@ -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;
 };
 
index 4601b4aeacd672fc09e80c410626c449b3a66484..2406b6bc5503fb9512d74ca7729ae2cdd5c46d52 100644 (file)
@@ -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