aboutsummaryrefslogtreecommitdiff
path: root/gcc/regclass.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/regclass.c')
-rw-r--r--gcc/regclass.c86
1 files changed, 30 insertions, 56 deletions
diff --git a/gcc/regclass.c b/gcc/regclass.c
index 60af8ac..1067f93 100644
--- a/gcc/regclass.c
+++ b/gcc/regclass.c
@@ -338,20 +338,11 @@ init_reg_sets_1 (void)
COPY_HARD_REG_SET (c, reg_class_contents[i]);
IOR_HARD_REG_SET (c, reg_class_contents[j]);
for (k = 0; k < N_REG_CLASSES; k++)
- {
- GO_IF_HARD_REG_SUBSET (reg_class_contents[k], c,
- subclass1);
- continue;
-
- subclass1:
- /* Keep the largest subclass. */ /* SPEE 900308 */
- GO_IF_HARD_REG_SUBSET (reg_class_contents[k],
- reg_class_contents[(int) reg_class_subunion[i][j]],
- subclass2);
+ if (hard_reg_set_subset_p (reg_class_contents[k], c)
+ && !hard_reg_set_subset_p (reg_class_contents[k],
+ reg_class_contents
+ [(int) reg_class_subunion[i][j]]))
reg_class_subunion[i][j] = (enum reg_class) k;
- subclass2:
- ;
- }
}
}
@@ -369,9 +360,9 @@ init_reg_sets_1 (void)
COPY_HARD_REG_SET (c, reg_class_contents[i]);
IOR_HARD_REG_SET (c, reg_class_contents[j]);
for (k = 0; k < N_REG_CLASSES; k++)
- GO_IF_HARD_REG_SUBSET (c, reg_class_contents[k], superclass);
+ if (hard_reg_set_subset_p (c, reg_class_contents[k]))
+ break;
- superclass:
reg_class_superunion[i][j] = (enum reg_class) k;
}
}
@@ -394,23 +385,21 @@ init_reg_sets_1 (void)
continue;
for (j = i + 1; j < N_REG_CLASSES; j++)
- {
- enum reg_class *p;
-
- GO_IF_HARD_REG_SUBSET (reg_class_contents[i], reg_class_contents[j],
- subclass);
- continue;
- subclass:
- /* Reg class I is a subclass of J.
- Add J to the table of superclasses of I. */
- p = &reg_class_superclasses[i][0];
- while (*p != LIM_REG_CLASSES) p++;
- *p = (enum reg_class) j;
- /* Add I to the table of superclasses of J. */
- p = &reg_class_subclasses[j][0];
- while (*p != LIM_REG_CLASSES) p++;
- *p = (enum reg_class) i;
- }
+ if (hard_reg_set_subset_p (reg_class_contents[i],
+ reg_class_contents[j]))
+ {
+ /* Reg class I is a subclass of J.
+ Add J to the table of superclasses of I. */
+ enum reg_class *p;
+
+ p = &reg_class_superclasses[i][0];
+ while (*p != LIM_REG_CLASSES) p++;
+ *p = (enum reg_class) j;
+ /* Add I to the table of superclasses of J. */
+ p = &reg_class_subclasses[j][0];
+ while (*p != LIM_REG_CLASSES) p++;
+ *p = (enum reg_class) i;
+ }
}
/* Initialize "constant" tables. */
@@ -2502,15 +2491,10 @@ reg_scan_mark_refs (rtx x, rtx insn, int note_flag, unsigned int min_regno)
int
reg_class_subset_p (enum reg_class c1, enum reg_class c2)
{
- if (c1 == c2) return 1;
-
- if (c2 == ALL_REGS)
- win:
- return 1;
- GO_IF_HARD_REG_SUBSET (reg_class_contents[(int) c1],
- reg_class_contents[(int) c2],
- win);
- return 0;
+ return (c1 == c2
+ || c2 == ALL_REGS
+ || hard_reg_set_subset_p (reg_class_contents[(int) c1],
+ reg_class_contents[(int) c2]));
}
/* Return nonzero if there is a register that is in both C1 and C2. */
@@ -2518,21 +2502,11 @@ reg_class_subset_p (enum reg_class c1, enum reg_class c2)
int
reg_classes_intersect_p (enum reg_class c1, enum reg_class c2)
{
- HARD_REG_SET c;
-
- if (c1 == c2) return 1;
-
- if (c1 == ALL_REGS || c2 == ALL_REGS)
- return 1;
-
- COPY_HARD_REG_SET (c, reg_class_contents[(int) c1]);
- AND_HARD_REG_SET (c, reg_class_contents[(int) c2]);
-
- GO_IF_HARD_REG_SUBSET (c, reg_class_contents[(int) NO_REGS], lose);
- return 1;
-
- lose:
- return 0;
+ return (c1 == c2
+ || c1 == ALL_REGS
+ || c2 == ALL_REGS
+ || hard_reg_set_intersect_p (reg_class_contents[(int) c1],
+ reg_class_contents[(int) c2]));
}
#ifdef CANNOT_CHANGE_MODE_CLASS