summaryrefslogtreecommitdiff
path: root/gcc/ira-lives.c
diff options
context:
space:
mode:
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2011-05-09 12:11:25 +0000
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2011-05-09 12:11:25 +0000
commit34347cd4139d2f91104d3b13090d1ff491b77cf9 (patch)
treed5aea3efc3350bea77719c98422be119161392a7 /gcc/ira-lives.c
parentd0a639c496e4b211574bcf96cc87b03d2efb2260 (diff)
downloadgcc-34347cd4139d2f91104d3b13090d1ff491b77cf9.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173568 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ira-lives.c')
-rw-r--r--gcc/ira-lives.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/gcc/ira-lives.c b/gcc/ira-lives.c
index 8eb9c03190e..d308bb39de2 100644
--- a/gcc/ira-lives.c
+++ b/gcc/ira-lives.c
@@ -726,18 +726,21 @@ mark_hard_reg_early_clobbers (rtx insn, bool live_p)
static enum reg_class
single_reg_class (const char *constraints, rtx op, rtx equiv_const)
{
- int ignore_p;
+ int curr_alt, c;
+ bool ignore_p;
enum reg_class cl, next_cl;
- int c;
cl = NO_REGS;
- for (ignore_p = false;
+ for (ignore_p = false, curr_alt = 0;
(c = *constraints);
constraints += CONSTRAINT_LEN (c, constraints))
- 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)
switch (c)
{
@@ -873,7 +876,7 @@ single_reg_operand_class (int op_num)
void
ira_implicitly_set_insn_hard_regs (HARD_REG_SET *set)
{
- int i, c, regno = 0;
+ int i, curr_alt, c, regno = 0;
bool ignore_p;
enum reg_class cl;
rtx op;
@@ -895,11 +898,16 @@ ira_implicitly_set_insn_hard_regs (HARD_REG_SET *set)
mode = (GET_CODE (op) == SCRATCH
? GET_MODE (op) : PSEUDO_REGNO_MODE (regno));
cl = NO_REGS;
- for (ignore_p = false; (c = *p); p += CONSTRAINT_LEN (c, p))
- if (c == '#')
+ for (ignore_p = false, curr_alt = 0;
+ (c = *p);
+ p += CONSTRAINT_LEN (c, p))
+ 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)
switch (c)
{