diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2014-06-11 16:58:35 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2014-06-11 16:58:35 +0000 |
commit | 777e635f1a6cab5d2c6837b1ea903ed0bcbe87d3 (patch) | |
tree | 923092a0e7d4f3ea66962e54661707bc328d5327 /gcc/ira.c | |
parent | 9e6b7874141cf74a8eb0786d7265296f671feac4 (diff) | |
download | gcc-777e635f1a6cab5d2c6837b1ea903ed0bcbe87d3.zip gcc-777e635f1a6cab5d2c6837b1ea903ed0bcbe87d3.tar.gz gcc-777e635f1a6cab5d2c6837b1ea903ed0bcbe87d3.tar.bz2 |
system.h (REG_CLASS_FROM_CONSTRAINT): Poison.
gcc/
* system.h (REG_CLASS_FROM_CONSTRAINT): Poison.
(REG_CLASS_FOR_CONSTRAINT, EXTRA_CONSTRAINT_STR): Likewise.
(EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT): Likewise.
* genpreds.c (print_type_tree): New function.
(write_tm_preds_h): Remove REG_CLASS_FROM_CONSTRAINT,
REG_CLASS_FOR_CONSTRAINT, EXTRA_MEMORY_CONSTRAINT,
EXTRA_ADDRESS_CONSTRAINT and EXTRA_CONSTRAINT_STR.
Write out enum constraint_type and get_constraint_type.
* lra-constraints.c (satisfies_memory_constraint_p): Take a
constraint_num rather than a constraint string.
(satisfies_address_constraint_p): Likewise.
(reg_class_from_constraints): Avoid old constraint macros.
(process_alt_operands, process_address_1): Likewise.
(curr_insn_transform): Likewise.
* ira-costs.c (record_reg_classes): Likewise.
(record_operand_costs): Likewise.
* ira-lives.c (single_reg_class): Likewise.
(ira_implicitly_set_insn_hard_regs): Likewise.
* ira.c (ira_setup_alts, ira_get_dup_out_num): Likewise.
* postreload.c (reload_cse_simplify_operands): Likewise.
* recog.c (asm_operand_ok, preprocess_constraints): Likewise.
(constrain_operands, peep2_find_free_register): Likewise.
* reload.c (push_secondary_reload, scratch_reload_class): Likewise.
(find_reloads, alternative_allows_const_pool_ref): Likewise.
* reload1.c (maybe_fix_stack_asms): Likewise.
* stmt.c (parse_output_constraint, parse_input_constraint): Likewise.
* targhooks.c (default_secondary_reload): Likewise.
* config/m32c/m32c.c (m32c_matches_constraint_p): Avoid reference
to EXTRA_CONSTRAINT_STR.
* config/sparc/constraints.md (U): Likewise REG_CLASS_FROM_CONSTRAINT.
From-SVN: r211471
Diffstat (limited to 'gcc/ira.c')
-rw-r--r-- | gcc/ira.c | 59 |
1 files changed, 28 insertions, 31 deletions
@@ -1922,24 +1922,29 @@ ira_setup_alts (rtx insn, HARD_REG_SET &alts) break; case 'o': + case 'r': goto op_success; break; default: { - enum reg_class cl; - - cl = (c == 'r' ? GENERAL_REGS : REG_CLASS_FROM_CONSTRAINT (c, p)); - if (cl != NO_REGS) - goto op_success; -#ifdef EXTRA_CONSTRAINT_STR - else if (EXTRA_CONSTRAINT_STR (op, c, p)) - goto op_success; - else if (EXTRA_MEMORY_CONSTRAINT (c, p)) - goto op_success; - else if (EXTRA_ADDRESS_CONSTRAINT (c, p)) - goto op_success; -#endif + enum constraint_num cn = lookup_constraint (p); + switch (get_constraint_type (cn)) + { + case CT_REGISTER: + if (reg_class_for_constraint (cn) != NO_REGS) + goto op_success; + break; + + case CT_ADDRESS: + case CT_MEMORY: + goto op_success; + + case CT_FIXED_FORM: + if (constraint_satisfied_p (op, cn)) + goto op_success; + break; + } break; } } @@ -1972,9 +1977,6 @@ ira_get_dup_out_num (int op_num, HARD_REG_SET &alts) int curr_alt, c, original, dup; bool ignore_p, use_commut_op_p; const char *str; -#ifdef EXTRA_CONSTRAINT_STR - rtx op; -#endif if (op_num < 0 || recog_data.n_alternatives == 0) return -1; @@ -1985,9 +1987,7 @@ ira_get_dup_out_num (int op_num, HARD_REG_SET &alts) use_commut_op_p = false; for (;;) { -#ifdef EXTRA_CONSTRAINT_STR - op = recog_data.operand[op_num]; -#endif + rtx op = recog_data.operand[op_num]; for (curr_alt = 0, ignore_p = !TEST_HARD_REG_BIT (alts, curr_alt), original = -1;;) @@ -2010,6 +2010,9 @@ ira_get_dup_out_num (int op_num, HARD_REG_SET &alts) case 'g': goto fail; case 'r': + if (!targetm.class_likely_spilled_p (GENERAL_REGS)) + goto fail; + break; case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'h': case 'j': case 'k': case 'l': case 'q': case 't': case 'u': @@ -2018,19 +2021,13 @@ ira_get_dup_out_num (int op_num, HARD_REG_SET &alts) case 'Q': case 'R': case 'S': case 'T': case 'U': case 'W': case 'Y': case 'Z': { - enum reg_class cl; - - cl = (c == 'r' - ? GENERAL_REGS : REG_CLASS_FROM_CONSTRAINT (c, str)); - if (cl != NO_REGS) - { - if (! targetm.class_likely_spilled_p (cl)) - goto fail; - } -#ifdef EXTRA_CONSTRAINT_STR - else if (EXTRA_CONSTRAINT_STR (op, c, str)) + enum constraint_num cn = lookup_constraint (str); + enum reg_class cl = reg_class_for_constraint (cn); + if (cl != NO_REGS + && !targetm.class_likely_spilled_p (cl)) + goto fail; + if (constraint_satisfied_p (op, cn)) goto fail; -#endif break; } |