-/* Finalize may-alias information for ref-all pointers. Traverse all
- the addressable variables found in setup_pointers_and_addressables.
-
- If flow-sensitive alias analysis has attached a name memory tag to
- a ref-all pointer, we will use it for the dereferences because that
- will have more precise aliasing information. But if there is no
- name tag, we will use a special symbol tag that aliases all the
- call-clobbered addressable variables. */
-
-static void
-finalize_ref_all_pointers (struct alias_info *ai)
-{
- size_t i;
-
- /* First add the real call-clobbered variables. */
- for (i = 0; i < ai->num_addressable_vars; i++)
- {
- tree var = ai->addressable_vars[i]->var;
- if (is_call_clobbered (var))
- add_may_alias (ai->ref_all_symbol_mem_tag, var);
- }
-
- /* Then add the call-clobbered pointer memory tags. See
- compute_flow_insensitive_aliasing for the rationale. */
- for (i = 0; i < ai->num_pointers; i++)
- {
- tree ptr = ai->pointers[i]->var, tag;
- /* Avoid adding to self and clean up. */
- if (PTR_IS_REF_ALL (ptr))
- {
- struct ptr_info_def *pi = get_ptr_info (ptr);
- if (pi->is_dereferenced)
- pi->pt_anything = 0;
- continue;
- }
- tag = symbol_mem_tag (ptr);
- if (is_call_clobbered (tag))
- add_may_alias (ai->ref_all_symbol_mem_tag, tag);
- }
-
-}
-
-