diff options
author | Richard Sandiford <rsandifo@nildram.co.uk> | 2008-05-08 21:28:27 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2008-05-08 21:28:27 +0000 |
commit | e663da80d4c288b804a1ae2e04544b7e668080ce (patch) | |
tree | be8f401f9b48aa6d624266499579b7f40d103455 /gcc/genrecog.c | |
parent | 977502ff8431f42bc84b71dd5814658439610c7b (diff) | |
download | gcc-e663da80d4c288b804a1ae2e04544b7e668080ce.tar.gz |
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/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 |