return mask >> (HOST_BITS_PER_WIDE_INT - n);
}
-typedef struct store_info *store_info_t;
static object_allocator<store_info> cse_store_info_pool ("cse_store_info_pool",
100);
But it could also contain clobbers. Insns that contain more than
one mem set are not deletable, but each of those mems are here in
order to provide info to delete other insns. */
- store_info_t store_rec;
+ store_info *store_rec;
/* The linked list of mem uses in this insn. Only the reads from
rtx bases are listed here. The reads to cselib bases are
int *offset_map_n, *offset_map_p;
int offset_map_size_n, offset_map_size_p;
};
-typedef struct group_info *group_info_t;
-typedef const struct group_info *const_group_info_t;
static object_allocator<group_info> group_info_pool
("rtx_group_info_pool", 100);
static int rtx_group_next_id;
-static vec<group_info_t> rtx_group_vec;
+static vec<group_info *> rtx_group_vec;
/* This structure holds the set of changes that are being deferred
struct deferred_change *next;
};
-typedef struct deferred_change *deferred_change_t;
-
static object_allocator<deferred_change> deferred_change_pool
("deferred_change_pool", 10);
-static deferred_change_t deferred_change_list = NULL;
+static deferred_change *deferred_change_list = NULL;
/* The group that holds all of the clear_alias_sets. */
-static group_info_t clear_alias_group;
+static group_info *clear_alias_group;
/* The modes of the clear_alias_sets. */
static htab_t clear_alias_mode_table;
/* Get the GROUP for BASE. Add a new group if it is not there. */
-static group_info_t
+static group_info *
get_group_info (rtx base)
{
struct group_info tmp_gi;
- group_info_t gi;
+ group_info *gi;
group_info **slot;
if (base)
if necessary. */
tmp_gi.rtx_base = base;
slot = rtx_group_table->find_slot (&tmp_gi, INSERT);
- gi = (group_info_t) *slot;
+ gi = *slot;
}
else
{
static void
free_store_info (insn_info_t insn_info)
{
- store_info_t store_info = insn_info->store_rec;
- while (store_info)
+ store_info *cur = insn_info->store_rec;
+ while (cur)
{
- store_info_t next = store_info->next;
- if (store_info->is_large)
- BITMAP_FREE (store_info->positions_needed.large.bmap);
- if (store_info->cse_base)
- cse_store_info_pool.remove (store_info);
+ store_info *next = cur->next;
+ if (cur->is_large)
+ BITMAP_FREE (cur->positions_needed.large.bmap);
+ if (cur->cse_base)
+ cse_store_info_pool.remove (cur);
else
- rtx_store_info_pool.remove (store_info);
- store_info = next;
+ rtx_store_info_pool.remove (cur);
+ cur = next;
}
insn_info->cannot_delete = true;
OFFSET and WIDTH. */
static void
-set_usage_bits (group_info_t group, HOST_WIDE_INT offset, HOST_WIDE_INT width,
+set_usage_bits (group_info *group, HOST_WIDE_INT offset, HOST_WIDE_INT width,
tree expr)
{
HOST_WIDE_INT i;
if (ADDR_SPACE_GENERIC_P (MEM_ADDR_SPACE (mem))
&& const_or_frame_p (address))
{
- group_info_t group = get_group_info (address);
+ group_info *group = get_group_info (address);
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, " gid=%d offset=%d \n",
while (ptr)
{
- store_info_t store_info = ptr->store_rec;
+ store_info *store_info = ptr->store_rec;
/* Skip the clobbers. */
while (!store_info->is_set)
store_info = store_info->next;
/* Mark byte POS bytes from the beginning of store S_INFO as unneeded. */
static inline void
-set_position_unneeded (store_info_t s_info, int pos)
+set_position_unneeded (store_info *s_info, int pos)
{
if (__builtin_expect (s_info->is_large, false))
{
/* Mark the whole store S_INFO as unneeded. */
static inline void
-set_all_positions_unneeded (store_info_t s_info)
+set_all_positions_unneeded (store_info *s_info)
{
if (__builtin_expect (s_info->is_large, false))
{
/* Return TRUE if any bytes from S_INFO store are needed. */
static inline bool
-any_positions_needed_p (store_info_t s_info)
+any_positions_needed_p (store_info *s_info)
{
if (__builtin_expect (s_info->is_large, false))
return (s_info->positions_needed.large.count
store are needed. */
static inline bool
-all_positions_needed_p (store_info_t s_info, int start, int width)
+all_positions_needed_p (store_info *s_info, int start, int width)
{
if (__builtin_expect (s_info->is_large, false))
{
}
-static rtx get_stored_val (store_info_t, machine_mode, HOST_WIDE_INT,
+static rtx get_stored_val (store_info *, machine_mode, HOST_WIDE_INT,
HOST_WIDE_INT, basic_block, bool);
HOST_WIDE_INT width = 0;
alias_set_type spill_alias_set;
insn_info_t insn_info = bb_info->last_insn;
- store_info_t store_info = NULL;
+ store_info *store_info = NULL;
int group_id;
cselib_val *base = NULL;
insn_info_t ptr, last, redundant_reason;
/* In the restrictive case where the base is a constant or the
frame pointer we can do global analysis. */
- group_info_t group
+ group_info *group
= rtx_group_vec[group_id];
tree expr = MEM_EXPR (mem);
mem_addr = base->val_rtx;
else
{
- group_info_t group
+ group_info *group
= rtx_group_vec[group_id];
mem_addr = group->canon_base_addr;
}
while (ptr)
{
insn_info_t next = ptr->next_local_store;
- store_info_t s_info = ptr->store_rec;
+ struct store_info *s_info = ptr->store_rec;
bool del = true;
/* Skip the clobbers. We delete the active insn if this insn
static rtx
find_shift_sequence (int access_size,
- store_info_t store_info,
+ store_info *store_info,
machine_mode read_mode,
int shift, bool speed, bool require_cst)
{
if not successful. If REQUIRE_CST is true, return always constant. */
static rtx
-get_stored_val (store_info_t store_info, machine_mode read_mode,
+get_stored_val (store_info *store_info, machine_mode read_mode,
HOST_WIDE_INT read_begin, HOST_WIDE_INT read_end,
basic_block bb, bool require_cst)
{
went ok. */
static bool
-replace_read (store_info_t store_info, insn_info_t store_insn,
+replace_read (store_info *store_info, insn_info_t store_insn,
read_info_t read_info, insn_info_t read_insn, rtx *loc,
bitmap regs_live)
{
if (validate_change (read_insn->insn, loc, read_reg, 0))
{
- deferred_change_t change = deferred_change_pool.allocate ();
+ deferred_change *change = deferred_change_pool.allocate ();
/* Insert this right before the store insn where it will be safe
from later insns that might change it before the read. */
mem_addr = base->val_rtx;
else
{
- group_info_t group
+ group_info *group
= rtx_group_vec[group_id];
mem_addr = group->canon_base_addr;
}
while (i_ptr)
{
- store_info_t store_info = i_ptr->store_rec;
+ store_info *store_info = i_ptr->store_rec;
/* Skip the clobbers. */
while (!store_info->is_set)
while (i_ptr)
{
bool remove = false;
- store_info_t store_info = i_ptr->store_rec;
+ store_info *store_info = i_ptr->store_rec;
/* Skip the clobbers. */
while (!store_info->is_set)
while (i_ptr)
{
bool remove = false;
- store_info_t store_info = i_ptr->store_rec;
+ store_info *store_info = i_ptr->store_rec;
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, " processing cselib load against insn %d\n",
/* If the frame is read, the frame related stores are killed. */
else if (insn_info->frame_read)
{
- store_info_t store_info = i_ptr->store_rec;
+ store_info *store_info = i_ptr->store_rec;
/* Skip the clobbers. */
while (!store_info->is_set)
while (insn_info)
{
- store_info_t store_info = insn_info->store_rec;
+ store_info *store_info = insn_info->store_rec;
bool del = false;
/* If ANY of the store_infos match the cselib group that is
insn_info_t i_ptr = active_local_stores;
while (i_ptr)
{
- store_info_t store_info = i_ptr->store_rec;
+ store_info *store_info = i_ptr->store_rec;
/* Skip the clobbers. */
while (!store_info->is_set)
else
if (store_info->group_id >= 0)
{
- group_info_t group
+ group_info *group
= rtx_group_vec[store_info->group_id];
if (group->frame_related && !i_ptr->cannot_delete)
delete_dead_store_insn (i_ptr);
replace_read. Cselib is finished with this block. */
while (deferred_change_list)
{
- deferred_change_t next = deferred_change_list->next;
+ deferred_change *next = deferred_change_list->next;
/* There is no reason to validate this change. That was
done earlier. */
{
if (ptr->contains_cselib_groups)
{
- store_info_t s_info = ptr->store_rec;
+ store_info *s_info = ptr->store_rec;
while (s_info && !s_info->is_set)
s_info = s_info->next;
if (s_info
}
else
{
- store_info_t s_info;
+ store_info *s_info;
/* Free at least positions_needed bitmaps. */
for (s_info = ptr->store_rec; s_info; s_info = s_info->next)
dse_step2_init (void)
{
unsigned int i;
- group_info_t group;
+ group_info *group;
FOR_EACH_VEC_ELT (rtx_group_vec, i, group)
{
dse_step2_nospill (void)
{
unsigned int i;
- group_info_t group;
+ group_info *group;
/* Position 0 is unused because 0 is used in the maps to mean
unused. */
current_position = 1;
there, return 0. */
static int
-get_bitmap_index (group_info_t group_info, HOST_WIDE_INT offset)
+get_bitmap_index (group_info *group_info, HOST_WIDE_INT offset)
{
if (offset < 0)
{
may be NULL. */
static void
-scan_stores_nospill (store_info_t store_info, bitmap gen, bitmap kill)
+scan_stores_nospill (store_info *store_info, bitmap gen, bitmap kill)
{
while (store_info)
{
HOST_WIDE_INT i;
- group_info_t group_info
+ group_info *group_info
= rtx_group_vec[store_info->group_id];
if (group_info->process_globally)
for (i = store_info->begin; i < store_info->end; i++)
may be NULL. */
static void
-scan_stores_spill (store_info_t store_info, bitmap gen, bitmap kill)
+scan_stores_spill (store_info *store_info, bitmap gen, bitmap kill)
{
while (store_info)
{
{
read_info_t read_info = insn_info->read_rec;
int i;
- group_info_t group;
+ group_info *group;
/* If this insn reads the frame, kill all the frame related stores. */
if (insn_info->frame_read)
if (stores_off_frame_dead_at_return)
{
unsigned int i;
- group_info_t group;
+ group_info *group;
FOR_EACH_VEC_ELT (rtx_group_vec, i, group)
{
if (!all_ones)
{
unsigned int j;
- group_info_t group;
+ group_info *group;
all_ones = BITMAP_ALLOC (&dse_bitmap_obstack);
FOR_EACH_VEC_ELT (rtx_group_vec, j, group)
&& (!insn_info->cannot_delete)
&& (!bitmap_empty_p (v)))
{
- store_info_t store_info = insn_info->store_rec;
+ store_info *store_info = insn_info->store_rec;
/* Try to delete the current insn. */
deleted = true;
else
{
HOST_WIDE_INT i;
- group_info_t group_info
+ group_info *group_info
= rtx_group_vec[store_info->group_id];
for (i = store_info->begin; i < store_info->end; i++)
&& INSN_P (insn_info->insn)
&& !insn_info->cannot_delete)
{
- store_info_t s_info = insn_info->store_rec;
+ store_info *s_info = insn_info->store_rec;
while (s_info && !s_info->is_set)
s_info = s_info->next;