var_ann_t ann;
gcc_assert (t);
- gcc_assert (DECL_P (t));
- gcc_assert (!t->base.ann || t->base.ann->common.type == VAR_ANN);
+ gcc_assert (TREE_CODE (t) == VAR_DECL
+ || TREE_CODE (t) == PARM_DECL
+ || TREE_CODE (t) == RESULT_DECL);
ann = GGC_CNEW (struct var_ann_d);
- ann->common.type = VAR_ANN;
- t->base.ann = (tree_ann_t) ann;
+ *DECL_VAR_ANN_PTR (t) = ann;
return ann;
}
/* Renumber all of the gimple stmt uids. */
-void
+void
renumber_gimple_stmt_uids (void)
{
basic_block bb;
/* Like renumber_gimple_stmt_uids, but only do work on the basic blocks
in BLOCKS, of which there are N_BLOCKS. Also renumbers PHIs. */
-void
+void
renumber_gimple_stmt_uids_in_blocks (basic_block *blocks, int n_blocks)
{
int i;
}
}
-/* Create a new annotation for a tree T. */
-
-tree_ann_common_t
-create_tree_common_ann (tree t)
-{
- tree_ann_common_t ann;
-
- gcc_assert (t);
- gcc_assert (!t->base.ann || t->base.ann->common.type == TREE_ANN_COMMON);
-
- ann = GGC_CNEW (struct tree_ann_common_d);
-
- ann->type = TREE_ANN_COMMON;
- t->base.ann = (tree_ann_t) ann;
-
- return ann;
-}
-
/* Build a temporary. Make sure and register it to be renamed. */
tree
{
tree var;
referenced_var_iterator rvi;
-
+
fprintf (file, "\nReferenced variables in %s: %u\n\n",
get_name (current_function_decl), (unsigned) num_referenced_vars);
-
+
FOR_EACH_REFERENCED_VAR (var, rvi)
{
fprintf (file, "Variable: ");
if (TREE_ADDRESSABLE (var))
fprintf (file, ", is addressable");
-
+
if (is_global_var (var))
fprintf (file, ", is global");
/* Lookup UID in the referenced_vars hashtable and return the associated
variable. */
-tree
+tree
referenced_var_lookup (unsigned int uid)
{
tree h;
return h;
}
-/* Check if TO is in the referenced_vars hash table and insert it if not.
+/* Check if TO is in the referenced_vars hash table and insert it if not.
Return true if it required insertion. */
bool
referenced_var_check_and_insert (tree to)
-{
+{
tree h, *loc;
struct tree_decl_minimal in;
unsigned int uid = DECL_UID (to);
/* Lookup VAR UID in the default_defs hashtable and return the associated
variable. */
-tree
+tree
gimple_default_def (struct function *fn, tree var)
{
struct tree_decl_minimal ind;
void
set_default_def (tree var, tree def)
-{
+{
struct tree_decl_minimal ind;
struct tree_ssa_name in;
void **loc;
bool
add_referenced_var (tree var)
{
- var_ann_t v_ann;
-
- v_ann = get_var_ann (var);
+ get_var_ann (var);
gcc_assert (DECL_P (var));
-
+
/* Insert VAR into the referenced_vars has table if it isn't present. */
if (referenced_var_check_and_insert (var))
{
&& (v_ann = var_ann (var)))
{
ggc_free (v_ann);
- var->base.ann = NULL;
+ *DECL_VAR_ANN_PTR (var) = NULL;
}
gcc_assert (DECL_P (var));
in.uid = uid;