From eb1485a68b1413b3db7c2cb67efb378658c4ff37 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Mon, 9 May 2011 14:11:25 +0200 Subject: re PR rtl-optimization/48927 (Issues with "enable" attribute and IRA register preferences) PR rtl-optimization/48927 * ira-conflicts.c (commutative_constraint_p): Use recog_data.alternative_enabled_p to disable alternatives where "enabled" attribute is false. (get_dup_num): Ditto. * ira-lives.c (single_reg_class): Ditto. (ira_implicitly_set_insn_hard_regs): Ditto. From-SVN: r173568 --- gcc/ira-conflicts.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'gcc/ira-conflicts.c') diff --git a/gcc/ira-conflicts.c b/gcc/ira-conflicts.c index 6937114..be00283 100644 --- a/gcc/ira-conflicts.c +++ b/gcc/ira-conflicts.c @@ -213,19 +213,22 @@ allocnos_conflict_for_copy_p (ira_allocno_t a1, ira_allocno_t a2) static bool commutative_constraint_p (const char *str) { + int curr_alt, c; bool ignore_p; - int c; - for (ignore_p = false;;) + for (ignore_p = false, curr_alt = 0;;) { c = *str; if (c == '\0') break; str += CONSTRAINT_LEN (c, str); - if (c == '#') + if (c == '#' || !recog_data.alternative_enabled_p[curr_alt]) ignore_p = true; else if (c == ',') - ignore_p = false; + { + curr_alt++; + ignore_p = false; + } else if (! ignore_p) { /* Usually `%' is the first constraint character but the @@ -270,7 +273,7 @@ get_dup_num (int op_num, bool use_commut_op_p) c = *str; if (c == '\0') break; - if (c == '#') + if (c == '#' || !recog_data.alternative_enabled_p[curr_alt]) ignore_p = true; else if (c == ',') { -- cgit v1.1