GCC Middle and Back End API Reference
sbitmap.c File Reference

Typedefs

typedef SBITMAP_ELT_TYPE * sbitmap_ptr
typedef const SBITMAP_ELT_TYPE * const_sbitmap_ptr

Functions

static unsigned long sbitmap_elt_popcount (SBITMAP_ELT_TYPE)
static unsigned int sbitmap_size_bytes (const_sbitmap map)
static void sbitmap_verify_popcount ()
sbitmap sbitmap_alloc ()
sbitmap sbitmap_alloc_with_popcount ()
sbitmap sbitmap_resize ()
sbitmap sbitmap_realloc ()
sbitmapsbitmap_vector_alloc ()
void bitmap_copy ()
int bitmap_equal_p ()
bool bitmap_empty_p ()
void bitmap_clear ()
void bitmap_ones ()
void bitmap_vector_clear ()
void bitmap_vector_ones ()
bool bitmap_ior_and_compl ()
void bitmap_not ()
void bitmap_and_compl ()
bool bitmap_intersect_p ()
bool bitmap_and ()
bool bitmap_xor ()
bool bitmap_ior ()
bool bitmap_subset_p ()
bool bitmap_or_and ()
bool bitmap_and_or ()
int bitmap_first_set_bit ()
int bitmap_last_set_bit ()
void dump_bitmap ()
DEBUG_FUNCTION void debug_raw ()
void dump_bitmap_file ()
DEBUG_FUNCTION void debug_bitmap ()
DEBUG_FUNCTION void debug ()
void dump_bitmap_vector (FILE *file, const char *title, const char *subtitle, sbitmap *bmaps, int n_maps)
static unsigned long sbitmap_elt_popcount ()

Variables

static const unsigned char popcount_table []

Typedef Documentation

typedef const SBITMAP_ELT_TYPE* const_sbitmap_ptr
typedef SBITMAP_ELT_TYPE* sbitmap_ptr

Function Documentation

bool bitmap_and ( )
Set DST to be (A and B).
   Return nonzero if any change is made.   

References changed, simple_bitmap_def::elms, simple_bitmap_def::popcount, sbitmap_verify_popcount(), and simple_bitmap_def::size.

void bitmap_and_compl ( )
Set the bits in DST to be the difference between the bits
   in A and the bits in B. i.e. dst = a & (~b).   

References simple_bitmap_def::elms, simple_bitmap_def::popcount, and simple_bitmap_def::size.

bool bitmap_and_or ( )
Set DST to be (A and (B or C)).
   Return nonzero if any change is made.   

References changed, simple_bitmap_def::elms, simple_bitmap_def::popcount, and simple_bitmap_def::size.

Referenced by compute_earliest(), and compute_farthest().

void bitmap_clear ( )
void bitmap_copy ( )
bool bitmap_empty_p ( )
Return true if the bitmap is empty.   

References simple_bitmap_def::elms, and simple_bitmap_def::size.

int bitmap_equal_p ( )
Determine if a == b.   

References simple_bitmap_def::elms, and simple_bitmap_def::size.

int bitmap_first_set_bit ( )
Return number of first bit set in the bitmap, -1 if none.   
bool bitmap_intersect_p ( )
Return true if there are any bits set in A are also set in B.
   Return false otherwise.   

References simple_bitmap_def::elms, and simple_bitmap_def::size.

bool bitmap_ior ( )
Set DST to be (A or B)).
   Return nonzero if any change is made.   

References changed, simple_bitmap_def::elms, simple_bitmap_def::popcount, sbitmap_verify_popcount(), and simple_bitmap_def::size.

bool bitmap_ior_and_compl ( )
Set DST to be A union (B - C).
   DST = A | (B & ~C).
   Returns true if any change is made.   

References changed, simple_bitmap_def::elms, simple_bitmap_def::popcount, and simple_bitmap_def::size.

int bitmap_last_set_bit ( )
Return number of last bit set in the bitmap, -1 if none.   

References simple_bitmap_def::elms, and simple_bitmap_def::size.

void bitmap_not ( )
bool bitmap_or_and ( )
Set DST to be (A or (B and C)).
   Return nonzero if any change is made.   

References changed, simple_bitmap_def::elms, simple_bitmap_def::popcount, and simple_bitmap_def::size.

Referenced by compute_antinout_edge(), compute_code_hoist_vbeinout(), and link_btr_uses().

bool bitmap_subset_p ( )
Return nonzero if A is a subset of B.   

References simple_bitmap_def::elms, and simple_bitmap_def::size.

void bitmap_vector_ones ( )
bool bitmap_xor ( )
Set DST to be (A xor B)).
   Return nonzero if any change is made.   

References changed, simple_bitmap_def::elms, simple_bitmap_def::popcount, sbitmap_verify_popcount(), and simple_bitmap_def::size.

DEBUG_FUNCTION void debug ( )

References dump_bitmap_file().

DEBUG_FUNCTION void debug_bitmap ( )

References dump_bitmap_file().

DEBUG_FUNCTION void debug_raw ( )

References dump_bitmap().

void dump_bitmap_vector ( FILE *  file,
const char *  title,
const char *  subtitle,
sbitmap bmaps,
int  n_maps 
)
sbitmap sbitmap_alloc ( )
Bitmap manipulation routines.   
Allocate a simple bitmap of N_ELMS bits.   

References simple_bitmap_def::n_bits, simple_bitmap_def::popcount, and simple_bitmap_def::size.

Referenced by blocks_in_phiopt_order(), break_superblocks(), build_pred_graph(), build_scop_bbs(), check_nodes_order(), check_sccs(), compute_antic(), compute_earliest(), compute_farthest(), compute_out(), compute_trg_info(), copyprop_hardreg_forward(), create_ddg_all_sccs(), create_scc(), cse_main(), decompose_multiword_subregs(), df_worklist_dataflow(), dfs_enumerate_from(), draw_cfg_nodes_no_loops(), dse_step3(), eh_region_outermost(), expand_call(), fill_always_executed_in(), find_assert_locations(), find_nodes_on_paths(), fix_bb_placements(), flow_dfs_compute_reverse_init(), get_sched_window(), gimple_expand_cfg(), haifa_find_rgns(), init_alias_analysis(), init_dce(), init_live_subregs(), init_scc_info(), init_seqno(), init_topo_info(), init_update_ssa(), inverted_post_order_compute(), link_btr_uses(), live_worklist(), longest_simple_path(), lra(), make_edges(), mark_dfs_back_edges(), mark_reachable_handlers(), multiplier_allowed_in_address_p(), new_elim_graph(), optimize_sc(), order_nodes_in_scc(), order_nodes_of_sccs(), peel_loop_completely(), peel_loop_simple(), perform_tree_ssa_dce(), post_order_compute(), pre_and_rev_post_order_compute(), prune_expressions(), prune_insertions_deletions(), reachable_at_most_once(), reload(), remove_path(), remove_reachable_equiv_notes(), remove_some_program_points_and_update_live_ranges(), rewrite_into_ssa(), sbitmap_alloc_with_popcount(), sched_rgn_compute_dependencies(), schedule_reg_moves(), should_hoist_expr_to_dom(), sms_schedule_by_order(), split_all_insns(), split_edges(), ssa_prop_init(), tail_duplicate(), thread_prologue_and_epilogue_insns(), tree_dce_init(), tree_transform_and_unroll_loop(), try_unroll_loop_completely(), undistribute_ops_list(), unroll_loop_constant_iterations(), unroll_loop_runtime_iterations(), unroll_loop_stupid(), update_dominators_in_loop(), update_ssa(), vect_supported_load_permutation_p(), verify_loop_structure(), and vt_find_locations().

sbitmap sbitmap_alloc_with_popcount ( )
Allocate a simple bitmap of N_ELMS bits, and a popcount array.   

References simple_bitmap_def::popcount, sbitmap_alloc(), and simple_bitmap_def::size.

static unsigned long sbitmap_elt_popcount ( SBITMAP_ELT_TYPE  )
static
static unsigned long sbitmap_elt_popcount ( )
static
Count the bits in an SBITMAP element A.   
sbitmap sbitmap_realloc ( )
Re-allocate a simple bitmap of N_ELMS bits. New storage is uninitialized.   

References simple_bitmap_def::n_bits, sbitmap_size_bytes(), and simple_bitmap_def::size.

sbitmap sbitmap_resize ( )
Resize a simple bitmap BMAP to N_ELMS bits.  If increasing the
   size of BMAP, clear the new bits to zero if the DEF argument
   is zero, and set them to one otherwise.   

References simple_bitmap_def::elms, memset(), simple_bitmap_def::n_bits, simple_bitmap_def::popcount, sbitmap_size_bytes(), and simple_bitmap_def::size.

Referenced by add_new_name_mapping(), dfs_enumerate_from(), lra_push_insn_1(), and mark_bb_seen().

static unsigned int sbitmap_size_bytes ( const_sbitmap  map)
inlinestatic
Return the size in bytes of a bitmap MAP.   

References simple_bitmap_def::size.

Referenced by bitmap_clear(), bitmap_ones(), sbitmap_realloc(), and sbitmap_resize().

static void sbitmap_verify_popcount ( )
static
This macro controls debugging that is as expensive as the
   operations it verifies.   
#define BITMAP_DEBUGGING   
Verify the population count of sbitmap A matches the cached value,
   if there is a cached value.  

References simple_bitmap_def::elms, simple_bitmap_def::popcount, and simple_bitmap_def::size.

Referenced by bitmap_and(), bitmap_ior(), and bitmap_xor().


Variable Documentation

const unsigned char popcount_table[]
static
Initial value:
{
0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,
1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,
1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,
2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,
1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,
2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,
2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,
3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,4,5,5,6,5,6,6,7,5,6,6,7,6,7,7,8,
}
Table of number of set bits in a character, indexed by value of char.