0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_dump_func | TODO_rename_vars
- | TODO_ggc_collect | TODO_verify_ssa /* todo_flags_finish */
+ | TODO_ggc_collect | TODO_verify_ssa, /* todo_flags_finish */
+ 0 /* letter */
};
num_tag_refs = VARRAY_UINT (ai->num_references, tag_ann->uid);
num_var_refs = VARRAY_UINT (ai->num_references, v_ann->uid);
+ /* If TAG is call clobbered, so is VAR. */
+ if (is_call_clobbered (tag))
+ mark_call_clobbered (var);
+
/* Add VAR to TAG's may-aliases set. */
add_may_alias (tag, var);
sbitmap_a_and_b (res, tag1_aliases, tag2_aliases);
if (sbitmap_first_set_bit (res) >= 0)
{
+ size_t k;
+
tree tag2 = var_ann (ai->pointers[j]->var)->type_mem_tag;
+ if (!is_call_clobbered (tag1) && is_call_clobbered (tag2))
+ {
+ mark_call_clobbered (tag1);
+ EXECUTE_IF_SET_IN_SBITMAP (tag1_aliases, 0, k,
+ {
+ tree var = referenced_var (k);
+ mark_call_clobbered (var);
+ });
+ }
+ else if (is_call_clobbered (tag1) && !is_call_clobbered (tag2))
+ {
+ mark_call_clobbered (tag2);
+ EXECUTE_IF_SET_IN_SBITMAP (tag2_aliases, 0, k,
+ {
+ tree var = referenced_var (k);
+ mark_call_clobbered (var);
+ });
+ }
+
sbitmap_a_or_b (tag1_aliases, tag1_aliases, tag2_aliases);
/* TAG2 does not need its aliases anymore. */
if (alias == VARRAY_TREE (v_ann->may_aliases, i))
return;
- /* If VAR is a call-clobbered variable, so is its new ALIAS.
- FIXME, call-clobbering should only depend on whether an address
- escapes. It should be independent of aliasing. */
- if (is_call_clobbered (var))
- mark_call_clobbered (alias);
-
- /* Likewise. If ALIAS is call-clobbered, so is VAR. */
- else if (is_call_clobbered (alias))
- mark_call_clobbered (var);
-
VARRAY_PUSH_TREE (v_ann->may_aliases, alias);
a_ann->is_alias_tag = 1;
}
{
var_ann_t v_ann = var_ann (var);
VARRAY_TREE (v_ann->may_aliases, i) = new_alias;
-
- /* If VAR is a call-clobbered variable, so is NEW_ALIAS.
- FIXME, call-clobbering should only depend on whether an address
- escapes. It should be independent of aliasing. */
- if (is_call_clobbered (var))
- mark_call_clobbered (new_alias);
-
- /* Likewise. If NEW_ALIAS is call-clobbered, so is VAR. */
- else if (is_call_clobbered (new_alias))
- mark_call_clobbered (var);
}
struct ptr_info_def *pi = SSA_NAME_PTR_INFO (ptr);
/* If the pointer has already been found to point to arbitrary
- memory locations, it is unsafe to mark it as pointing to malloc. */
+ memory locations, it is unsafe to mark it as pointing to malloc. */
if (pi->pt_anything)
return;
if (orig_pi)
{
+ dest_pi->pt_global_mem |= orig_pi->pt_global_mem;
+
/* Notice that we never merge PT_MALLOC. This attribute is only
true if the pointer is the result of a malloc() call.
Otherwise, we can end up in this situation: