diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-08 21:28:27 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-08 21:28:27 +0000 |
commit | c7a4c804ee577fe5a84652746dae82a50b34bd85 (patch) | |
tree | be8f401f9b48aa6d624266499579b7f40d103455 /gcc/gensupport.h | |
parent | 40efb3382e6fc70e7d1eb0fcac943ff3da183bbf (diff) | |
download | gcc-c7a4c804ee577fe5a84652746dae82a50b34bd85.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135090 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gensupport.h')
-rw-r--r-- | gcc/gensupport.h | 2 |
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) |