summaryrefslogtreecommitdiff
path: root/gcc/gensupport.h
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@nildram.co.uk>2008-05-08 21:28:27 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2008-05-08 21:28:27 +0000
commite663da80d4c288b804a1ae2e04544b7e668080ce (patch)
treebe8f401f9b48aa6d624266499579b7f40d103455 /gcc/gensupport.h
parent977502ff8431f42bc84b71dd5814658439610c7b (diff)
gensupport.h (pred_data): Add a "num_codes" field.
gcc/ * gensupport.h (pred_data): Add a "num_codes" field. (add_predicate_code): Declare. * gensupport.c (add_predicate_code): New function. (std_pred_table): Add an "allows_const_p" field. (std_preds): Set this field for predicates that allow RTX_CONST_OBJs. Remove the (incomplete) list of such codes from the codes field. (init_predicate_table): Use add_predicate_code. Add all RTX_CONST_OBJs if allows_const_p is true. * genrecog.c (process_define_predicate): Use add_predicate_code. From-SVN: r135090
Diffstat (limited to 'gcc/gensupport.h')
-rw-r--r--gcc/gensupport.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/gensupport.h b/gcc/gensupport.h
index f604bd0be0e..effd4a4b397 100644
--- a/gcc/gensupport.h
+++ b/gcc/gensupport.h
@@ -76,6 +76,7 @@ struct pred_data
/* data used primarily by genrecog.c */
enum rtx_code singleton; /* if pred takes only one code, that code */
+ int num_codes; /* number of codes accepted */
bool allows_non_lvalue; /* if pred allows non-lvalue expressions */
bool allows_non_const; /* if pred allows non-const expressions */
bool codes[NUM_RTX_CODE]; /* set of codes accepted */
@@ -83,6 +84,7 @@ struct pred_data
extern struct pred_data *first_predicate;
extern struct pred_data *lookup_predicate (const char *);
+extern void add_predicate_code (struct pred_data *, enum rtx_code);
extern void add_predicate (struct pred_data *);
#define FOR_ALL_PREDICATES(p) for (p = first_predicate; p; p = p->next)