unsigned int j;
bitmap_iterator bi;
- if (bitmap_bit_p (delta, anything_id))
- {
- flag |= bitmap_set_bit (sol, anything_id);
- goto done;
- }
-
/* For x = *ESCAPED and x = *CALLUSED we want to compute the
reachability set of the rhs var. As a pointer to a sub-field
of a variable can also reach all other fields of the variable
}
}
+ if (bitmap_bit_p (delta, anything_id))
+ {
+ flag |= bitmap_set_bit (sol, anything_id);
+ goto done;
+ }
+
/* For each variable j in delta (Sol(y)), add
an edge in the graph from j to x, and union Sol(j) into Sol(x). */
EXECUTE_IF_SET_IN_BITMAP (delta, 0, j, bi)
t = find (v->id);
tmp = get_varinfo (t)->solution;
- if (set_union_with_increment (tmp, sol, 0))
+ if (add_graph_edge (graph, t, rhs))
{
- get_varinfo (t)->solution = tmp;
- if (t == rhs)
- sol = get_varinfo (rhs)->solution;
- if (!TEST_BIT (changed, t))
+ if (bitmap_ior_into (get_varinfo (t)->solution, sol))
{
- SET_BIT (changed, t);
- changed_count++;
+ if (t == rhs)
+ sol = get_varinfo (rhs)->solution;
+ if (!TEST_BIT (changed, t))
+ {
+ SET_BIT (changed, t);
+ changed_count++;
+ }
}
}
}
happens below, since it will fall into the default case. The only
case we know something about an integer treated like a pointer is
when it is the NULL pointer, and then we just say it points to
- NULL. */
- if (TREE_CODE (t) == INTEGER_CST
+ NULL.
+
+ Do not do that if -fno-delete-null-pointer-checks though, because
+ in that case *NULL does not fail, so it _should_ alias *anything.
+ It is not worth adding a new option or renaming the existing one,
+ since this case is relatively obscure. */
+ if (flag_delete_null_pointer_checks
+ && TREE_CODE (t) == INTEGER_CST
&& integer_zerop (t))
{
temp.var = nothing_id;
{
if (!do_simple_structure_copy (lhs, rhs, MIN (lhssize, rhssize)))
{
- lhs.var = collapse_rest_of_var (lhs.var);
- rhs.var = collapse_rest_of_var (rhs.var);
+ lhs.var = collapse_rest_of_var (get_varinfo_fc (lhs.var)->id);
+ rhs.var = collapse_rest_of_var (get_varinfo_fc (rhs.var)->id);
lhs.offset = 0;
rhs.offset = 0;
lhs.type = SCALAR;
type-based pruning disabled. */
if (vi->is_artificial_var
|| !is_derefed
- || no_tbaa_pruning)
+ || no_tbaa_pruning
+ || vi->no_tbaa_pruning)
bitmap_set_bit (into, DECL_UID (vi->decl));
else
{
{
pi->pt_vars = NULL;
if (pruned > 0
+ && !pi->pt_null
&& pi->is_dereferenced
&& warn_strict_aliasing > 0
&& !SSA_NAME_IS_DEFAULT_DEF (p))
find_func_aliases (phi);
}
- for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); )
- {
- gimple stmt = gsi_stmt (gsi);
-
- find_func_aliases (stmt);
-
- /* The information in GIMPLE_CHANGE_DYNAMIC_TYPE statements
- has now been captured, and we can remove them. */
- if (gimple_code (stmt) == GIMPLE_CHANGE_DYNAMIC_TYPE)
- gsi_remove (&gsi, true);
- else
- gsi_next (&gsi);
- }
+ for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
+ find_func_aliases (gsi_stmt (gsi));
}