summaryrefslogtreecommitdiff
path: root/gcc/recog.h
diff options
context:
space:
mode:
authorkrebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4>2008-05-27 11:46:45 +0000
committerkrebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4>2008-05-27 11:46:45 +0000
commit39a1a66f5e30580edaa3550668222db2ef09e543 (patch)
tree8b144af648d4119d5962a025331d5ae887135564 /gcc/recog.h
parente9ff93b1e1540dfd1f609a92dfa66c27c673abfa (diff)
downloadgcc-39a1a66f5e30580edaa3550668222db2ef09e543.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@136012 138bc75d-0d04-0410-961f-82ee72b054a4
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;
};