diff options
author | Uros Bizjak <uros@gcc.gnu.org> | 2011-05-09 14:11:25 +0200 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2011-05-09 14:11:25 +0200 |
commit | eb1485a68b1413b3db7c2cb67efb378658c4ff37 (patch) | |
tree | d5aea3efc3350bea77719c98422be119161392a7 /gcc/ira-conflicts.c | |
parent | c46d001a91568c9fd19ee74c73d34f87ebd4aef5 (diff) | |
download | gcc-eb1485a68b1413b3db7c2cb67efb378658c4ff37.zip gcc-eb1485a68b1413b3db7c2cb67efb378658c4ff37.tar.gz gcc-eb1485a68b1413b3db7c2cb67efb378658c4ff37.tar.bz2 |
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
Diffstat (limited to 'gcc/ira-conflicts.c')
-rw-r--r-- | gcc/ira-conflicts.c | 13 |
1 files changed, 8 insertions, 5 deletions
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 == ',') { |