} *attrs;
/* Structure for chaining the locations. */
-typedef struct location_chain_def
+struct location_chain
{
/* Next element in the chain. */
- struct location_chain_def *next;
+ location_chain *next;
/* The location (REG, MEM or VALUE). */
rtx loc;
/* Initialized? */
enum var_init_status init;
-} *location_chain;
+};
/* A vector of loc_exp_dep holds the active dependencies of a one-part
DV on VALUEs, i.e., the VALUEs expanded so as to form the current
struct variable_part
{
/* Chain of locations of the part. */
- location_chain loc_chain;
+ location_chain *loc_chain;
/* Location which was last emitted to location list. */
rtx cur_loc;
("small variable_def pool", 256, sizeof (variable_def));
/* Alloc pool for struct location_chain_def. */
-static object_allocator<location_chain_def> location_chain_def_pool
- ("location_chain_def pool", 1024);
+static object_allocator<location_chain> location_chain_pool
+ ("location_chain pool", 1024);
/* Alloc pool for struct shared_hash_def. */
static object_allocator<shared_hash_def> shared_hash_def_pool
static void dataflow_set_copy (dataflow_set *, dataflow_set *);
static int variable_union_info_cmp_pos (const void *, const void *);
static void dataflow_set_union (dataflow_set *, dataflow_set *);
-static location_chain find_loc_in_1pdv (rtx, variable, variable_table_type *);
+static location_chain *find_loc_in_1pdv (rtx, variable, variable_table_type *);
static bool canon_value_cmp (rtx, rtx);
static int loc_cmp (rtx, rtx);
static bool variable_part_different_p (variable_part *, variable_part *);
{
int i;
variable var = (variable) elem;
- location_chain node, next;
+ location_chain *node, *next;
gcc_checking_assert (var->refcount > 0);
for (i = 0; i < var->n_var_parts; i++)
{
- location_chain node;
- location_chain *nextp;
+ location_chain *node;
+ location_chain **nextp;
if (i == 0 && var->onepart)
{
nextp = &new_var->var_part[i].loc_chain;
for (node = var->var_part[i].loc_chain; node; node = node->next)
{
- location_chain new_lc;
+ location_chain *new_lc;
- new_lc = new location_chain_def;
+ new_lc = new location_chain;
new_lc->next = NULL;
if (node->init > initialized)
new_lc->init = node->init;
{
for (i = 0; i < var->n_var_parts && ret_val == VAR_INIT_STATUS_UNKNOWN; i++)
{
- location_chain nextp;
+ location_chain *nextp;
for (nextp = var->var_part[i].loc_chain; nextp; nextp = nextp->next)
if (rtx_equal_p (nextp->loc, loc))
{
rtx x;
decl_or_value dv;
variable var;
- location_chain l;
+ location_chain *l;
gcc_checking_assert (GET_CODE (loc) == VALUE);
if (var->onepart == ONEPART_VALUE)
{
- location_chain loc, *locp;
+ location_chain *loc, **locp;
bool changed = false;
rtx cur_loc;
val_reset (dataflow_set *set, decl_or_value dv)
{
variable var = shared_hash_find (set->vars, dv) ;
- location_chain node;
+ location_chain *node;
rtx cval;
if (!var || !var->n_var_parts)
struct variable_union_info
{
/* Node of the location chain. */
- location_chain lc;
+ location_chain *lc;
/* The sum of positions in the input chains. */
int pos;
entries are in canonical order. */
if (src->onepart)
{
- location_chain *nodep, dnode, snode;
+ location_chain **nodep, *dnode, *snode;
gcc_assert (src->n_var_parts == 1
&& dst->n_var_parts == 1);
if (r > 0)
{
- location_chain nnode;
+ location_chain *nnode;
if (shared_var_p (dst, set->vars))
{
goto restart_onepart_unshared;
}
- *nodep = nnode = new location_chain_def;
+ *nodep = nnode = new location_chain;
nnode->loc = snode->loc;
nnode->init = snode->init;
if (!snode->set_src || MEM_P (snode->set_src))
for (k--; k >= 0; k--)
{
- location_chain node, node2;
+ location_chain *node, *node2;
if (i >= 0 && j >= 0
&& VAR_PART_OFFSET (src, i) == VAR_PART_OFFSET (dst, j))
if (dst_l == 1)
{
/* The most common case, much simpler, no qsort is needed. */
- location_chain dstnode = dst->var_part[j].loc_chain;
+ location_chain *dstnode = dst->var_part[j].loc_chain;
dst->var_part[k].loc_chain = dstnode;
VAR_PART_OFFSET (dst, k) = VAR_PART_OFFSET (dst, j);
node2 = dstnode;
&& REGNO (dstnode->loc) == REGNO (node->loc))
|| rtx_equal_p (dstnode->loc, node->loc)))
{
- location_chain new_node;
+ location_chain *new_node;
/* Copy the location from SRC. */
- new_node = new location_chain_def;
+ new_node = new location_chain;
new_node->loc = node->loc;
new_node->init = node->init;
if (!node->set_src || MEM_P (node->set_src))
}
if (jj >= dst_l) /* The location has not been found. */
{
- location_chain new_node;
+ location_chain *new_node;
/* Copy the location from SRC. */
- new_node = new location_chain_def;
+ new_node = new location_chain;
new_node->loc = node->loc;
new_node->init = node->init;
if (!node->set_src || MEM_P (node->set_src))
&& VAR_PART_OFFSET (src, i) > VAR_PART_OFFSET (dst, j))
|| j < 0)
{
- location_chain *nextp;
+ location_chain **nextp;
/* Copy the chain from SRC. */
nextp = &dst->var_part[k].loc_chain;
for (node = src->var_part[i].loc_chain; node; node = node->next)
{
- location_chain new_lc;
+ location_chain *new_lc;
- new_lc = new location_chain_def;
+ new_lc = new location_chain;
new_lc->next = NULL;
new_lc->init = node->init;
if (!node->set_src || MEM_P (node->set_src))
if (flag_var_tracking_uninit)
for (i = 0; i < src->n_var_parts && i < dst->n_var_parts; i++)
{
- location_chain node, node2;
+ location_chain *node, *node2;
for (node = src->var_part[i].loc_chain; node; node = node->next)
for (node2 = dst->var_part[i].loc_chain; node2; node2 = node2->next)
if (rtx_equal_p (node->loc, node2->loc))
any values recursively mentioned in the location lists. VARS must
be in star-canonical form. */
-static location_chain
+static location_chain *
find_loc_in_1pdv (rtx loc, variable var, variable_table_type *vars)
{
- location_chain node;
+ location_chain *node;
enum rtx_code loc_code;
if (!var)
loc_cmp order, and it is maintained as such. */
static void
-insert_into_intersection (location_chain *nodep, rtx loc,
+insert_into_intersection (location_chain **nodep, rtx loc,
enum var_init_status status)
{
- location_chain node;
+ location_chain *node;
int r;
for (node = *nodep; node; nodep = &node->next, node = *nodep)
else if (r > 0)
break;
- node = new location_chain_def;
+ node = new location_chain;
node->loc = loc;
node->set_src = NULL;
DSM->dst. */
static void
-intersect_loc_chains (rtx val, location_chain *dest, struct dfset_merge *dsm,
- location_chain s1node, variable s2var)
+intersect_loc_chains (rtx val, location_chain **dest, struct dfset_merge *dsm,
+ location_chain *s1node, variable s2var)
{
dataflow_set *s1set = dsm->cur;
dataflow_set *s2set = dsm->src;
- location_chain found;
+ location_chain *found;
if (s2var)
{
- location_chain s2node;
+ location_chain *s2node;
gcc_checking_assert (s2var->onepart);
dataflow_set *data ATTRIBUTE_UNUSED)
{
variable var = *slot;
- location_chain node, next;
+ location_chain *node, *next;
#ifdef ENABLE_RTL_CHECKING
int i;
variable var = *slot;
decl_or_value dv = var->dv;
rtx val;
- location_chain node;
+ location_chain *node;
if (!dv_is_value_p (dv))
return 1;
{
variable var = *slot;
decl_or_value dv = var->dv;
- location_chain node;
+ location_chain *node;
decl_or_value cdv;
rtx val, cval;
variable_def **cslot;
{
variable var = *slot;
decl_or_value dv = var->dv;
- location_chain node;
+ location_chain *node;
rtx cval;
decl_or_value cdv;
variable_def **cslot;
variable cvar;
- location_chain cnode;
+ location_chain *cnode;
if (!var->onepart || var->onepart == ONEPART_VALUE)
return 1;
onepart_enum_t onepart = s1var->onepart;
rtx val;
hashval_t dvhash;
- location_chain node, *nodep;
+ location_chain *node, **nodep;
/* If the incoming onepart variable has an empty location list, then
the intersection will be just as empty. For other variables,
nodep = &dvar->var_part[0].loc_chain;
while ((node = *nodep))
{
- location_chain *nextp = &node->next;
+ location_chain **nextp = &node->next;
if (GET_CODE (node->loc) == REG)
{
static void
remove_duplicate_values (variable var)
{
- location_chain node, *nodep;
+ location_chain *node, **nodep;
gcc_assert (var->onepart);
gcc_assert (var->n_var_parts == 1);
{
dataflow_set *set = dfpm->set;
variable var = *slot;
- location_chain node;
+ location_chain *node;
if (!var->onepart || !var->n_var_parts)
return 1;
{
dataflow_set *set = dfpm->set;
variable pvar = *pslot, var;
- location_chain pnode;
+ location_chain *pnode;
decl_or_value dv;
attrs att;
location list of a one-part variable or value VAR, or in that of
any values recursively mentioned in the location lists. */
-static location_chain
+static location_chain *
find_mem_expr_in_1pdv (tree expr, rtx val, variable_table_type *vars)
{
- location_chain node;
+ location_chain *node;
decl_or_value dv;
variable var;
- location_chain where = NULL;
+ location_chain *where = NULL;
if (!val)
return NULL;
if (var->onepart == ONEPART_VDECL || var->onepart == ONEPART_DEXPR)
{
tree decl = dv_as_decl (var->dv);
- location_chain loc, *locp;
+ location_chain *loc, **locp;
bool changed = false;
if (!var->n_var_parts)
rtx old_loc = loc->loc;
if (GET_CODE (old_loc) == VALUE)
{
- location_chain mem_node
+ location_chain *mem_node
= find_mem_expr_in_1pdv (decl, loc->loc,
shared_hash_htab (set->vars));
if (var->onepart == ONEPART_VALUE)
{
- location_chain loc, *locp;
+ location_chain *loc, **locp;
bool changed = false;
rtx cur_loc;
static bool
variable_part_different_p (variable_part *vp1, variable_part *vp2)
{
- location_chain lc1, lc2;
+ location_chain *lc1, *lc2;
for (lc1 = vp1->loc_chain; lc1; lc1 = lc1->next)
{
static bool
onepart_variable_different_p (variable var1, variable var2)
{
- location_chain lc1, lc2;
+ location_chain *lc1, *lc2;
if (var1 == var2)
return false;
tree decl = NULL_TREE; /* The variable being copied around. */
rtx set_src = NULL_RTX; /* The value for "decl" stored in "src". */
variable var;
- location_chain nextp;
+ location_chain *nextp;
int i;
bool found;
dump_var (variable var)
{
int i;
- location_chain node;
+ location_chain *node;
if (dv_is_decl_p (var->dv))
{
enum var_init_status initialized, rtx set_src)
{
int pos;
- location_chain node, next;
- location_chain *nextp;
+ location_chain *node, *next;
+ location_chain **nextp;
variable var;
onepart_enum_t onepart;
}
/* Add the location to the beginning. */
- node = new location_chain_def;
+ node = new location_chain;
node->loc = loc;
node->init = initialized;
node->set_src = set_src;
if (pos >= 0)
{
- location_chain node, next;
+ location_chain *node, *next;
/* Remove the register locations from the dataflow set. */
next = var->var_part[pos].loc_chain;
if (pos >= 0)
{
- location_chain node, next;
- location_chain *nextp;
+ location_chain *node, *next;
+ location_chain **nextp;
bool changed;
rtx cur_loc;
{
struct expand_loc_callback_data *elcd
= (struct expand_loc_callback_data *) data;
- location_chain loc, next;
+ location_chain *loc, *next;
rtx result = NULL;
int first_child, result_first_child, last_child;
bool pending_recursion;
HOST_WIDE_INT offsets[MAX_VAR_PARTS];
rtx loc[MAX_VAR_PARTS];
tree decl;
- location_chain lc;
+ location_chain *lc;
gcc_checking_assert (var->onepart == NOT_ONEPART
|| var->onepart == ONEPART_VDECL);
changed_variables = NULL;
attrs_def_pool.release ();
var_pool.release ();
- location_chain_def_pool.release ();
+ location_chain_pool.release ();
shared_hash_def_pool.release ();
if (MAY_HAVE_DEBUG_INSNS)