summaryrefslogtreecommitdiff
path: root/gcc/global.c
diff options
context:
space:
mode:
authorsteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2004-12-30 09:09:07 +0000
committersteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2004-12-30 09:09:07 +0000
commitf0dee252a421ea3925846036483c7a9f5d357111 (patch)
treea530aedece694ab387659c1709e4d6eb9f20abbb /gcc/global.c
parenta80a7415bd1742843965a44b1f2b14cfa8729b9e (diff)
downloadgcc-f0dee252a421ea3925846036483c7a9f5d357111.tar.gz
* global.c (regclass_intersect): Remove.
(mark_reg_use_for_earlyclobber): Use reg_classes_intersect_p instead. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92729 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/global.c')
-rw-r--r--gcc/global.c26
1 files changed, 5 insertions, 21 deletions
diff --git a/gcc/global.c b/gcc/global.c
index 5779e4ea96a..35fec4a4392 100644
--- a/gcc/global.c
+++ b/gcc/global.c
@@ -309,7 +309,6 @@ static void reg_dies (int, enum machine_mode, struct insn_chain *);
static void allocate_bb_info (void);
static void free_bb_info (void);
static bool check_earlyclobber (rtx);
-static bool regclass_intersect (enum reg_class, enum reg_class);
static void mark_reg_use_for_earlyclobber_1 (rtx *, void *);
static int mark_reg_use_for_earlyclobber (rtx *, void *);
static void calculate_local_reg_bb_info (void);
@@ -2180,22 +2179,6 @@ check_earlyclobber (rtx insn)
return found;
}
-/* The function returns true if register classes C1 and C2 intersect. */
-
-static bool
-regclass_intersect (enum reg_class c1, enum reg_class c2)
-{
- HARD_REG_SET rs, zero;
-
- CLEAR_HARD_REG_SET (zero);
- COPY_HARD_REG_SET(rs, reg_class_contents [c1]);
- AND_HARD_REG_SET (rs, reg_class_contents [c2]);
- GO_IF_HARD_REG_EQUAL (zero, rs, yes);
- return true;
- yes:
- return false;
-}
-
/* The function checks that pseudo-register *X has a class
intersecting with the class of pseudo-register could be early
clobbered in the same insn.
@@ -2218,11 +2201,12 @@ mark_reg_use_for_earlyclobber (rtx *x, void *data ATTRIBUTE_UNUSED)
pref_class = reg_preferred_class (regno);
alt_class = reg_alternate_class (regno);
for (i = VARRAY_ACTIVE_SIZE (earlyclobber_regclass) - 1; i >= 0; i--)
- if (regclass_intersect (VARRAY_INT (earlyclobber_regclass, i),
- pref_class)
+ if (reg_classes_intersect_p (VARRAY_INT (earlyclobber_regclass, i),
+ pref_class)
|| (VARRAY_INT (earlyclobber_regclass, i) != NO_REGS
- && regclass_intersect (VARRAY_INT (earlyclobber_regclass, i),
- alt_class)))
+ && reg_classes_intersect_p (VARRAY_INT (earlyclobber_regclass,
+ i),
+ alt_class)))
{
bitmap_set_bit (bb_info->earlyclobber, regno);
break;