diff options
author | Andreas Krebbel <krebbel1@de.ibm.com> | 2008-05-27 11:46:45 +0000 |
---|---|---|
committer | Andreas Krebbel <krebbel@gcc.gnu.org> | 2008-05-27 11:46:45 +0000 |
commit | 7ac28727fb6149d6e9301e501a94080cb80be27a (patch) | |
tree | 8b144af648d4119d5962a025331d5ae887135564 /gcc/regclass.c | |
parent | a4edaf835918f2dd4a2c36659b3639438a0d1a38 (diff) | |
download | gcc-7ac28727fb6149d6e9301e501a94080cb80be27a.zip gcc-7ac28727fb6149d6e9301e501a94080cb80be27a.tar.gz gcc-7ac28727fb6149d6e9301e501a94080cb80be27a.tar.bz2 |
reload.c: (find_reloads): Skip alternatives according to the "enabled" attribute.
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.
From-SVN: r136012
Diffstat (limited to 'gcc/regclass.c')
-rw-r--r-- | gcc/regclass.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/regclass.c b/gcc/regclass.c index 1194c5c..8b9e86b 100644 --- a/gcc/regclass.c +++ b/gcc/regclass.c @@ -1143,8 +1143,9 @@ record_operand_costs (rtx insn, struct costs *op_costs, record_address_regs (GET_MODE (recog_data.operand[i]), XEXP (recog_data.operand[i], 0), 0, MEM, SCRATCH, frequency * 2); - else if (constraints[i][0] == 'p' - || EXTRA_ADDRESS_CONSTRAINT (constraints[i][0], constraints[i])) + else if (recog_data.alternative_enabled_p[0] + && (constraints[i][0] == 'p' + || EXTRA_ADDRESS_CONSTRAINT (constraints[i][0], constraints[i]))) record_address_regs (VOIDmode, recog_data.operand[i], 0, ADDRESS, SCRATCH, frequency * 2); } @@ -1932,6 +1933,9 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops, if (alt_fail) continue; + if (!recog_data.alternative_enabled_p[alt]) + continue; + /* Finally, update the costs with the information we've calculated about this alternative. */ |