summaryrefslogtreecommitdiff
path: root/gcc/recog.h
diff options
context:
space:
mode:
authorAndreas Krebbel <krebbel1@de.ibm.com>2008-05-27 11:46:45 +0000
committerAndreas Krebbel <krebbel@gcc.gnu.org>2008-05-27 11:46:45 +0000
commit7ac28727fb6149d6e9301e501a94080cb80be27a (patch)
tree8b144af648d4119d5962a025331d5ae887135564 /gcc/recog.h
parenta4edaf835918f2dd4a2c36659b3639438a0d1a38 (diff)
downloadgcc-7ac28727fb6149d6e9301e501a94080cb80be27a.tar.gz
reload.c: (find_reloads): Skip alternatives according to the "enabled" attribute.
2008-05-27 Andreas Krebbel <krebbel1@de.ibm.com> * reload.c: (find_reloads): Skip alternatives according to the "enabled" attribute. Constify the constraint variable. * recog.c (get_attr_enabled): Add default implementation. (extract_insn): Set the alternative_enabled_p array in the recog_data struct. (preprocess_constraints, constrain_operands): Skip alternatives according to the "enabled" attribute * recog.h (struct recog_data): New field alternative_enabled_p. (skip_alternative): New inline function. * regclass.c: (record_operand_costs): Check the "enabled" attribute. (record_reg_classes): Skip alternative according to the "enabled" attribute. * doc/md.texi: Add documention for the "enabled" attribute. From-SVN: r136012
Diffstat (limited to 'gcc/recog.h')
-rw-r--r--gcc/recog.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/recog.h b/gcc/recog.h
index a7e22e6e349..6a2a2caf1da 100644
--- a/gcc/recog.h
+++ b/gcc/recog.h
@@ -143,6 +143,19 @@ recog_memoized (rtx insn)
}
#endif
+/* Skip chars until the next ',' or the end of the string. This is
+ useful to skip alternatives in a constraint string. */
+static inline const char *
+skip_alternative (const char *p)
+{
+ const char *r = p;
+ while (*r != '\0' && *r != ',')
+ r++;
+ if (*r == ',')
+ r++;
+ return r;
+}
+
/* Nonzero means volatile operands are recognized. */
extern int volatile_ok;
@@ -202,6 +215,12 @@ struct recog_data
/* The number of alternatives in the constraints for the insn. */
char n_alternatives;
+ /* Specifies whether an insn alternative is enabled using the
+ `enabled' attribute in the insn pattern definition. For back
+ ends not using the `enabled' attribute the array fields are
+ always set to `true' in expand_insn. */
+ bool alternative_enabled_p [MAX_RECOG_ALTERNATIVES];
+
/* In case we are caching, hold insn data was generated for. */
rtx insn;
};