bitmap.h (bitmap_and, [...]): Produce void.
* bitmap.h (bitmap_and, bitmap_and_into, bitmap_and_compl, bitmap_and_compl_into, bitmap_ior, bitmap_iot_into, bitmap_ior_compl, bitmap_xor, bitmap_xor_into): Produce void. (bitmap_ior_and_compl_into): Produce bool. (bitmap_union_of_diff): Rename to ... (bitmap_ior_and_compl): ... here. Produce bool. * bitmap.c (bitmap_ior_and_compl_into): Return bool. Use bitmap_operation directly. (bitmap_union_of_diff): Rename to ... (bitmap_ior_and_compl): ... here. Return bool, use bitmap_operation directly. * df.c (df_rd_transfer_function): Use bitmap_ior_and_compl. (df_ru_transfer_function, df_lr_transfer_function): Likewise. * global.c (modify_bb_reg_pav): Likewise. From-SVN: r89982
This commit is contained in:
parent
55994078b6
commit
7ef7b34599
5 changed files with 38 additions and 22 deletions
|
@ -1,5 +1,20 @@
|
|||
2004-11-02 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* bitmap.h (bitmap_and, bitmap_and_into, bitmap_and_compl,
|
||||
bitmap_and_compl_into, bitmap_ior, bitmap_iot_into,
|
||||
bitmap_ior_compl, bitmap_xor, bitmap_xor_into): Produce void.
|
||||
(bitmap_ior_and_compl_into): Produce bool.
|
||||
(bitmap_union_of_diff): Rename to ...
|
||||
(bitmap_ior_and_compl): ... here. Produce bool.
|
||||
* bitmap.c (bitmap_ior_and_compl_into): Return bool. Use
|
||||
bitmap_operation directly.
|
||||
(bitmap_union_of_diff): Rename to ...
|
||||
(bitmap_ior_and_compl): ... here. Return bool, use
|
||||
bitmap_operation directly.
|
||||
* df.c (df_rd_transfer_function): Use bitmap_ior_and_compl.
|
||||
(df_ru_transfer_function, df_lr_transfer_function): Likewise.
|
||||
* global.c (modify_bb_reg_pav): Likewise.
|
||||
|
||||
* bitmap.h (bitmap_equal_p): Return bool.
|
||||
(bitmap_intersect_p, bitmap_intersect_compl_p): Declare.
|
||||
* bitmap.c (bitmap_equal_p): Return bool. Compare directly.
|
||||
|
|
15
gcc/bitmap.c
15
gcc/bitmap.c
|
@ -743,10 +743,9 @@ bitmap_intersect_compl_p (bitmap a, bitmap b)
|
|||
}
|
||||
|
||||
|
||||
/* Or into bitmap TO bitmap FROM1 and'ed with the complement of
|
||||
bitmap FROM2. */
|
||||
/* Produce TO |= FROM1 & ~FROM2. Return true, if TO changed. */
|
||||
|
||||
int
|
||||
bool
|
||||
bitmap_ior_and_compl_into (bitmap to, bitmap from1, bitmap from2)
|
||||
{
|
||||
bitmap_head tmp;
|
||||
|
@ -756,13 +755,15 @@ bitmap_ior_and_compl_into (bitmap to, bitmap from1, bitmap from2)
|
|||
tmp.using_obstack = 0;
|
||||
|
||||
bitmap_and_compl (&tmp, from1, from2);
|
||||
changed = bitmap_ior_into (to, &tmp);
|
||||
changed = bitmap_operation (to, to, &tmp, BITMAP_IOR);
|
||||
bitmap_clear (&tmp);
|
||||
return changed;
|
||||
}
|
||||
|
||||
int
|
||||
bitmap_union_of_diff (bitmap dst, bitmap a, bitmap b, bitmap c)
|
||||
/* Produce DST = A | (B & ~C). Return true if DST != A. */
|
||||
|
||||
bool
|
||||
bitmap_ior_and_compl (bitmap dst, bitmap a, bitmap b, bitmap c)
|
||||
{
|
||||
bitmap_head tmp;
|
||||
int changed;
|
||||
|
@ -771,7 +772,7 @@ bitmap_union_of_diff (bitmap dst, bitmap a, bitmap b, bitmap c)
|
|||
tmp.using_obstack = 0;
|
||||
|
||||
bitmap_and_compl (&tmp, b, c);
|
||||
changed = bitmap_ior (dst, &tmp, a);
|
||||
changed = bitmap_operation (dst, a, &tmp, BITMAP_IOR);
|
||||
bitmap_clear (&tmp);
|
||||
|
||||
return changed;
|
||||
|
|
22
gcc/bitmap.h
22
gcc/bitmap.h
|
@ -100,19 +100,20 @@ extern bool bitmap_intersect_compl_p (bitmap, bitmap);
|
|||
/* Perform an operation on two bitmaps, yielding a third. */
|
||||
extern int bitmap_operation (bitmap, bitmap, bitmap, enum bitmap_bits);
|
||||
|
||||
#define bitmap_and(DST,A,B) bitmap_operation (DST,A,B,BITMAP_AND)
|
||||
#define bitmap_and_into(DST_SRC,B) bitmap_operation (DST_SRC,DST_SRC,B,BITMAP_AND)
|
||||
#define bitmap_and_compl(DST,A,B) bitmap_operation (DST,A,B,BITMAP_AND_COMPL)
|
||||
#define bitmap_and_compl_into(DST_SRC,B) bitmap_operation (DST_SRC,DST_SRC,B,BITMAP_AND_COMPL)
|
||||
#define bitmap_ior(DST,A,B) bitmap_operation (DST,A,B,BITMAP_IOR)
|
||||
#define bitmap_ior_into(DST_SRC,B) bitmap_operation (DST_SRC,DST_SRC,B,BITMAP_IOR)
|
||||
#define bitmap_ior_compl(DST,A,B) bitmap_operation (DST,A,B,BITMAP_IOR_COMPL)
|
||||
#define bitmap_xor(DST,A,B) bitmap_operation (DST,A,B,BITMAP_XOR)
|
||||
#define bitmap_xor_into(DST_SRC,B) bitmap_operation (DST_SRC,DST_SRC,B,BITMAP_XOR)
|
||||
#define bitmap_and(DST,A,B) (void)bitmap_operation (DST,A,B,BITMAP_AND)
|
||||
#define bitmap_and_into(DST_SRC,B) (void)bitmap_operation (DST_SRC,DST_SRC,B,BITMAP_AND)
|
||||
#define bitmap_and_compl(DST,A,B) (void)bitmap_operation (DST,A,B,BITMAP_AND_COMPL)
|
||||
#define bitmap_and_compl_into(DST_SRC,B) (void)bitmap_operation (DST_SRC,DST_SRC,B,BITMAP_AND_COMPL)
|
||||
#define bitmap_ior(DST,A,B) (void)bitmap_operation (DST,A,B,BITMAP_IOR)
|
||||
#define bitmap_ior_into(DST_SRC,B) (void)bitmap_operation (DST_SRC,DST_SRC,B,BITMAP_IOR)
|
||||
#define bitmap_ior_compl(DST,A,B) (void)bitmap_operation (DST,A,Br,BITMAP_IOR_COMPL)
|
||||
#define bitmap_xor(DST,A,B) (void)bitmap_operation (DST,A,B,BITMAP_XOR)
|
||||
#define bitmap_xor_into(DST_SRC,B) (void)bitmap_operation (DST_SRC,DST_SRC,B,BITMAP_XOR)
|
||||
|
||||
/* `or' into one bitmap the `and' of a second bitmap witih the complement
|
||||
of a third. Return nonzero if the bitmap changes. */
|
||||
extern int bitmap_ior_and_compl_into (bitmap, bitmap, bitmap);
|
||||
extern bool bitmap_ior_and_compl_into (bitmap, bitmap, bitmap);
|
||||
extern bool bitmap_ior_and_compl (bitmap, bitmap, bitmap, bitmap);
|
||||
|
||||
/* Clear a single register in a register set. */
|
||||
extern void bitmap_clear_bit (bitmap, int);
|
||||
|
@ -142,7 +143,6 @@ extern void bitmap_release_memory (void);
|
|||
#define bitmap_zero(a) bitmap_clear (a)
|
||||
#define bitmap_a_or_b(a,b,c) bitmap_operation (a, b, c, BITMAP_IOR)
|
||||
#define bitmap_a_and_b(a,b,c) bitmap_operation (a, b, c, BITMAP_AND)
|
||||
extern int bitmap_union_of_diff (bitmap, bitmap, bitmap, bitmap);
|
||||
extern int bitmap_first_set_bit (bitmap);
|
||||
extern int bitmap_last_set_bit (bitmap);
|
||||
|
||||
|
|
6
gcc/df.c
6
gcc/df.c
|
@ -1588,7 +1588,7 @@ df_rd_transfer_function (int bb ATTRIBUTE_UNUSED, int *changed, void *in,
|
|||
void *out, void *gen, void *kill,
|
||||
void *data ATTRIBUTE_UNUSED)
|
||||
{
|
||||
*changed = bitmap_union_of_diff (out, gen, in, kill);
|
||||
*changed = bitmap_ior_and_compl (out, gen, in, kill);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1597,7 +1597,7 @@ df_ru_transfer_function (int bb ATTRIBUTE_UNUSED, int *changed, void *in,
|
|||
void *out, void *gen, void *kill,
|
||||
void *data ATTRIBUTE_UNUSED)
|
||||
{
|
||||
*changed = bitmap_union_of_diff (in, gen, out, kill);
|
||||
*changed = bitmap_ior_and_compl (in, gen, out, kill);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1606,7 +1606,7 @@ df_lr_transfer_function (int bb ATTRIBUTE_UNUSED, int *changed, void *in,
|
|||
void *out, void *use, void *def,
|
||||
void *data ATTRIBUTE_UNUSED)
|
||||
{
|
||||
*changed = bitmap_union_of_diff (in, use, out, def);
|
||||
*changed = bitmap_ior_and_compl (in, use, out, def);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2307,7 +2307,7 @@ modify_bb_reg_pav (basic_block bb, basic_block pred, bool changed_p)
|
|||
bb_pavout = bb_info->pavout;
|
||||
if (pred->index != ENTRY_BLOCK)
|
||||
bitmap_a_or_b (bb_pavin, bb_pavin, BB_INFO (pred)->pavout);
|
||||
changed_p |= bitmap_union_of_diff (bb_pavout, bb_info->avloc,
|
||||
changed_p |= bitmap_ior_and_compl (bb_pavout, bb_info->avloc,
|
||||
bb_pavin, bb_info->killed);
|
||||
return changed_p;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue