Commit b2d57793 by Daniel Berlin Committed by Daniel Berlin

[multiple changes]

2001-07-27  Daniel Berlin  <dan@cgsoftware.com>

	* regclass.c (reg_scan_mark_refs): Increment REG_N_REFS when we
	increment REG_N_SETS.

2001-07-26  Daniel Berlin  <dan@cgsoftware.com>

	* sbitmap.h: New prototype for sbitmap_a_xor_b.

	* sbitmap.c (sbitmap_a_xor_b): New function.
	#ifdef the basic block stuff on the define IN_GCC.

From-SVN: r44460
parent 6d18adbc
2001-07-27 Daniel Berlin <dan@cgsoftware.com>
* regclass.c (reg_scan_mark_refs): Increment REG_N_REFS when we
increment REG_N_SETS.
2001-07-26 Daniel Berlin <dan@cgsoftware.com>
* sbitmap.h: New prototype for sbitmap_a_xor_b.
* sbitmap.c (sbitmap_a_xor_b): New function.
ifdef the basic block stuff on IN_GCC.
2001-07-29 Neil Booth <neil@cat.daikokuya.demon.co.uk> 2001-07-29 Neil Booth <neil@cat.daikokuya.demon.co.uk>
* cppexp.c (parse_defined): Always record the macro name. * cppexp.c (parse_defined): Always record the macro name.
......
...@@ -2427,7 +2427,10 @@ reg_scan_mark_refs (x, insn, note_flag, min_regno) ...@@ -2427,7 +2427,10 @@ reg_scan_mark_refs (x, insn, note_flag, min_regno)
if (GET_CODE (dest) == REG if (GET_CODE (dest) == REG
&& REGNO (dest) >= min_regno) && REGNO (dest) >= min_regno)
REG_N_SETS (REGNO (dest))++; {
REG_N_SETS (REGNO (dest))++;
REG_N_REFS (REGNO (dest))++;
}
/* If this is setting a pseudo from another pseudo or the sum of a /* If this is setting a pseudo from another pseudo or the sum of a
pseudo and a constant integer and the other pseudo is known to be pseudo and a constant integer and the other pseudo is known to be
......
...@@ -99,6 +99,13 @@ sbitmap_copy (dst, src) ...@@ -99,6 +99,13 @@ sbitmap_copy (dst, src)
memcpy (dst->elms, src->elms, sizeof (SBITMAP_ELT_TYPE) * dst->size); memcpy (dst->elms, src->elms, sizeof (SBITMAP_ELT_TYPE) * dst->size);
} }
/* Determine if a == b. */
int
sbitmap_equal (a, b)
sbitmap a, b;
{
return !memcmp (a->elms, b->elms, sizeof (SBITMAP_ELT_TYPE) * a->size);
}
/* Zero all elements in a bitmap. */ /* Zero all elements in a bitmap. */
void void
...@@ -230,6 +237,31 @@ sbitmap_a_and_b (dst, a, b) ...@@ -230,6 +237,31 @@ sbitmap_a_and_b (dst, a, b)
return changed; return changed;
} }
/* Set DST to be (A xor B)).
Return non-zero if any change is made. */
int
sbitmap_a_xor_b (dst, a, b)
sbitmap dst, a, b;
{
unsigned int i;
sbitmap_ptr dstp, ap, bp;
int changed = 0;
for (dstp = dst->elms, ap = a->elms, bp = b->elms, i = 0; i < dst->size;
i++, dstp++)
{
SBITMAP_ELT_TYPE tmp = *ap++ ^ *bp++;
if (*dstp != tmp)
{
changed = 1;
*dstp = tmp;
}
}
return changed;
}
/* Set DST to be (A or B)). /* Set DST to be (A or B)).
Return non-zero if any change is made. */ Return non-zero if any change is made. */
...@@ -324,6 +356,7 @@ sbitmap_a_and_b_or_c (dst, a, b, c) ...@@ -324,6 +356,7 @@ sbitmap_a_and_b_or_c (dst, a, b, c)
return changed; return changed;
} }
#ifdef IN_GCC
/* Set the bitmap DST to the intersection of SRC of successors of /* Set the bitmap DST to the intersection of SRC of successors of
block number BB, using the new flow graph structures. */ block number BB, using the new flow graph structures. */
...@@ -483,6 +516,7 @@ sbitmap_union_of_preds (dst, src, bb) ...@@ -483,6 +516,7 @@ sbitmap_union_of_preds (dst, src, bb)
*r++ |= *p++; *r++ |= *p++;
} }
} }
#endif
/* Return number of first bit set in the bitmap, -1 if none. */ /* Return number of first bit set in the bitmap, -1 if none. */
......
...@@ -97,6 +97,7 @@ extern void dump_sbitmap_vector PARAMS ((FILE *, const char *, ...@@ -97,6 +97,7 @@ extern void dump_sbitmap_vector PARAMS ((FILE *, const char *,
extern sbitmap sbitmap_alloc PARAMS ((unsigned int)); extern sbitmap sbitmap_alloc PARAMS ((unsigned int));
extern sbitmap *sbitmap_vector_alloc PARAMS ((unsigned int, unsigned int)); extern sbitmap *sbitmap_vector_alloc PARAMS ((unsigned int, unsigned int));
extern void sbitmap_copy PARAMS ((sbitmap, sbitmap)); extern void sbitmap_copy PARAMS ((sbitmap, sbitmap));
extern int sbitmap_equal PARAMS ((sbitmap, sbitmap));
extern void sbitmap_zero PARAMS ((sbitmap)); extern void sbitmap_zero PARAMS ((sbitmap));
extern void sbitmap_ones PARAMS ((sbitmap)); extern void sbitmap_ones PARAMS ((sbitmap));
extern void sbitmap_vector_zero PARAMS ((sbitmap *, unsigned int)); extern void sbitmap_vector_zero PARAMS ((sbitmap *, unsigned int));
...@@ -112,6 +113,7 @@ extern int sbitmap_a_and_b_or_c PARAMS ((sbitmap, sbitmap, sbitmap, ...@@ -112,6 +113,7 @@ extern int sbitmap_a_and_b_or_c PARAMS ((sbitmap, sbitmap, sbitmap,
sbitmap)); sbitmap));
extern int sbitmap_a_and_b PARAMS ((sbitmap, sbitmap, sbitmap)); extern int sbitmap_a_and_b PARAMS ((sbitmap, sbitmap, sbitmap));
extern int sbitmap_a_or_b PARAMS ((sbitmap, sbitmap, sbitmap)); extern int sbitmap_a_or_b PARAMS ((sbitmap, sbitmap, sbitmap));
extern int sbitmap_a_xor_b PARAMS ((sbitmap, sbitmap, sbitmap));
extern int sbitmap_a_subset_b_p PARAMS ((sbitmap, sbitmap)); extern int sbitmap_a_subset_b_p PARAMS ((sbitmap, sbitmap));
extern int sbitmap_first_set_bit PARAMS ((sbitmap)); extern int sbitmap_first_set_bit PARAMS ((sbitmap));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment