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/genrecog.c | |
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/genrecog.c')
-rw-r--r-- | gcc/genrecog.c | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/gcc/genrecog.c b/gcc/genrecog.c index 8564b5cc1f1..43afa7f449c 100644 --- a/gcc/genrecog.c +++ b/gcc/genrecog.c @@ -368,7 +368,6 @@ process_define_predicate (rtx desc) { struct pred_data *pred = xcalloc (sizeof (struct pred_data), 1); char codes[NUM_RTX_CODE]; - bool seen_one = false; int i; pred->name = XSTR (desc, 0); @@ -379,26 +378,8 @@ process_define_predicate (rtx desc) for (i = 0; i < NUM_RTX_CODE; i++) if (codes[i] != N) - { - pred->codes[i] = true; - if (GET_RTX_CLASS (i) != RTX_CONST_OBJ) - pred->allows_non_const = true; - if (i != REG - && i != SUBREG - && i != MEM - && i != CONCAT - && i != PARALLEL - && i != STRICT_LOW_PART) - pred->allows_non_lvalue = true; - - if (seen_one) - pred->singleton = UNKNOWN; - else - { - pred->singleton = i; - seen_one = true; - } - } + add_predicate_code (pred, i); + add_predicate (pred); } #undef I |