}
+/* Dump sub-variables for VAR to FILE. */
+
+void
+dump_subvars_for (FILE *file, tree var)
+{
+ subvar_t sv = get_subvars_for_var (var);
+
+ if (!sv)
+ return;
+
+ fprintf (file, "{ ");
+
+ for (; sv; sv = sv->next)
+ {
+ print_generic_expr (file, sv->var, dump_flags);
+ fprintf (file, " ");
+ }
+
+ fprintf (file, "}");
+}
+
+
+/* Dumb sub-variables for VAR to stderr. */
+
+void
+debug_subvars_for (tree var)
+{
+ dump_subvars_for (stderr, var);
+}
+
+
/* Dump variable VAR and its may-aliases to FILE. */
void
fprintf (file, ", ");
print_generic_expr (file, TREE_TYPE (var), dump_flags);
- if (ann->type_mem_tag)
+ if (ann && ann->type_mem_tag)
{
fprintf (file, ", type memory tag: ");
print_generic_expr (file, ann->type_mem_tag, dump_flags);
}
- if (ann->is_alias_tag)
+ if (ann && ann->is_alias_tag)
fprintf (file, ", is an alias tag");
if (TREE_ADDRESSABLE (var))
if (is_call_clobbered (var))
fprintf (file, ", call clobbered");
- if (ann->default_def)
+ if (default_def (var))
{
fprintf (file, ", default def: ");
- print_generic_expr (file, ann->default_def, dump_flags);
+ print_generic_expr (file, default_def (var), dump_flags);
}
- if (ann->may_aliases)
+ if (may_aliases (var))
{
fprintf (file, ", may aliases: ");
dump_may_aliases_for (file, var);
}
+ if (get_subvars_for_var (var))
+ {
+ fprintf (file, ", sub-vars: ");
+ dump_subvars_for (file, var);
+ }
+
fprintf (file, "\n");
}
}
-/* Collect DFA statistics and store them in the structure pointed by
+/* Collect DFA statistics and store them in the structure pointed to by
DFA_STATS_P. */
static void
/* Lookup UID in the referenced_vars hashtable and return the associated
+ variable or NULL if it is not there. */
+
+tree
+referenced_var_lookup_if_exists (unsigned int uid)
+{
+ struct int_tree_map *h, in;
+ in.uid = uid;
+ h = htab_find_with_hash (referenced_vars, &in, uid);
+ if (h)
+ return h->to;
+ return NULL_TREE;
+}
+
+/* Lookup UID in the referenced_vars hashtable and return the associated
variable. */
tree
optimizers. */
&& !DECL_EXTERNAL (var)
/* It's not necessary to walk the initial value of non-constant
- public variables because it cannot be propagated by the
+ variables because it cannot be propagated by the
optimizers. */
- && (!TREE_PUBLIC (var) || !TREE_CONSTANT (var)))
+ && (TREE_CONSTANT (var) || TREE_READONLY (var)))
walk_tree (&DECL_INITIAL (var), find_vars_r, walk_state, 0);
}
}
int v_may_defs_before, v_may_defs_after;
int v_must_defs_before, v_must_defs_after;
+ if (TREE_CODE (stmt) == PHI_NODE)
+ return;
+
vars_in_vops_to_rename = BITMAP_ALLOC (NULL);
/* Before re-scanning the statement for operands, mark the existing
size, in bits, of REF inside the return value. */
tree
-okay_component_ref_for_subvars (tree ref, HOST_WIDE_INT *poffset,
- HOST_WIDE_INT *psize)
+okay_component_ref_for_subvars (tree ref, unsigned HOST_WIDE_INT *poffset,
+ unsigned HOST_WIDE_INT *psize)
{
tree result = NULL;
HOST_WIDE_INT bitsize;