Lines Matching defs:tag

71   /* Nonzero if the aliases for this memory tag have been grouped
175 tag. */
193 mark_aliases_call_clobbered (tree tag, VEC (tree, heap) **worklist,
199 var_ann_t ta = var_ann (tag);
201 if (!MTAG_P (tag))
203 ma = may_aliases (tag);
225 tree tag;
229 FOR_EACH_REFERENCED_VAR (tag, rvi)
231 if (!MTAG_P (tag) || TREE_CODE (tag) == STRUCT_FIELD_TAG)
233 VEC_safe_push (tree, heap, taglist, tag);
240 an earlier tag is included in a later tag, and this will reduce
243 If we had a real tag graph, we would just topo-order it and be
250 /* Go through each tag not marked as global, and if it aliases
253 If the tag contains call clobbered vars, mark it call
264 for (k = 0; VEC_iterate (tree, taglist, k, tag); k++)
269 bool tagcc = is_call_clobbered (tag);
270 bool tagglobal = MTAG_GLOBAL (tag);
275 ma = may_aliases (tag);
281 /* Call clobbered entries cause the tag to be marked
285 mark_call_clobbered (tag, var_ann (entry)->escape_mask);
290 /* Global vars cause the tag to be marked global. */
293 MTAG_GLOBAL (tag) = true;
365 /* If the name tag is call clobbered, so is the symbol tag
404 their tag is call clobbered, and which tags need to be marked
444 /* We could do better here by looking at the type tag of LHS, but it
570 pointed-to by P_i (and its memory tag) also escape.
576 called "symbol memory tag" (SMT). The other class are those associated
577 with SSA_NAMEs, called "name memory tag" (NMT). The basic idea is that
579 whether P_i has a name tag, if it does we use it, because that will have
581 tag.
586 it points to and its tag.
591 This pass will compare the alias set of every symbol memory tag and
593 memory tag SMT and an addressable variable V. If the alias sets of
595 as an alias tag and added to the alias set of SMT.
613 After aliasing analysis has finished, the symbol memory tag for pointer
936 /* Clear all the flags but keep the name tag to
940 tag will need to be created in create_name_tags. */
1012 We only create a name tag for a pointer P if P is found to point to
1018 are assigned the same name tag. */
1050 that they are assigned a symbol tag. */
1062 /* Now go through the pointers with pt_vars, and find a name tag
1073 creating a tag. If so, use Q's tag instead of creating a
1090 as PTR, create a new name tag if needed. */
1095 /* If the new name tag computed for PTR is different than
1096 the old name tag that it used to have, then the old tag
1105 /* Mark the new name tag for renaming. */
1115 the name memory tag (NMT) associated with P_i. If P_i escapes, then its
1116 name tag and the variables it points-to are call-clobbered. Finally, if
1144 /* Set up aliasing information for PTR's name memory tag (if it has
1146 have a name memory tag. */
1162 memory tag (SMT) if their alias sets conflict. V is then marked as
1163 an alias tag so that the operand scanner knows that statements
1178 with P's symbol memory tag. */
1183 tree tag = var_ann (p_map->var)->symbol_mem_tag;
1184 var_ann_t tag_ann = var_ann (tag);
1217 tag and variable before querying the bitmap. */
1218 tag_stored_p = is_call_clobbered (tag)
1219 || bitmap_bit_p (ai->written_vars, DECL_UID (tag));
1239 add_may_alias (tag, var);
1337 If flow-sensitive alias analysis has attached a name memory tag to
1340 name tag, we will use a special symbol tag that aliases all the
1364 tree ptr = ai->pointers[i]->var, tag;
1367 tag = var_ann (ptr)->symbol_mem_tag;
1368 if (is_call_clobbered (tag))
1369 add_may_alias (ai->ref_all_symbol_mem_tag, tag);
1392 function will make TAG be the unique alias tag for all the
1404 group_aliases_into (tree tag, bitmap tag_aliases, struct alias_info *ai)
1407 var_ann_t tag_ann = var_ann (tag);
1423 if (var != tag)
1424 add_may_alias (var, tag);
1451 the memory tag and its aliases. Usually, whenever an aliased
1452 variable Vi is found to alias with a memory tag T, we add Vi
1460 grouping is enabled, we make T an alias tag and add it to the
1476 memory tag, the grouping done in step (2) needs to be extended
1478 the may-aliases set of tag T. For instance, if we originally
1514 /* For every pointer in AI->POINTERS, reverse the roles of its tag
1515 and the tag's may-aliases set. */
1574 replace 'a' with 'SMT.20' in the name tag of p_5. */
1744 array and create a symbol memory tag for them. */
1750 tree tag;
1753 /* If pointer VAR still doesn't have a memory tag
1756 tag = get_tmt_for (var, ai);
1757 t_ann = var_ann (tag);
1759 /* The symbol tag will need to be renamed into SSA
1763 mark_sym_for_renaming (tag);
1766 tag, we will need to process it in the renamer to
1771 /* Associate the tag with pointer VAR. */
1772 v_ann->symbol_mem_tag = tag;
1775 then its memory tag must be marked as written-to. */
1777 bitmap_set_bit (ai->written_vars, DECL_UID (tag));
1790 symbol memory tag, remove it and mark the old tag for
1793 tree tag = ann->symbol_mem_tag;
1794 if (tag)
1796 mark_sym_for_renaming (tag);
2090 /* The pointer used to have a name tag, but we now found it pointing
2091 to an arbitrary location. The name tag needs to be renamed and
2180 /* Create a new memory tag of type TYPE.
2206 /* Create a new memory tag of type TYPE. If IS_TYPE_TAG is true, the tag
2208 in the same alias set class. Otherwise, the tag represents a single
2215 tree tag = create_tag_raw (is_type_tag ? SYMBOL_MEMORY_TAG : NAME_MEMORY_TAG,
2220 DECL_CONTEXT (tag) = current_function_decl;
2223 TREE_ADDRESSABLE (tag) = 1;
2225 ann = get_var_ann (tag);
2228 /* Add the tag to the symbol table. */
2229 add_referenced_var (tag);
2231 return tag;
2235 /* Create a name memory tag to represent a specific SSA_NAME pointer P_i.
2244 tree tag = pi->name_mem_tag;
2246 if (tag == NULL_TREE)
2247 tag = create_memory_tag (TREE_TYPE (TREE_TYPE (ptr)), false);
2248 return tag;
2252 /* Return the symbol memory tag associated to pointer PTR. A memory
2253 tag is an artificial variable that represents the memory location
2264 tree tag;
2268 /* We use a unique memory tag for all the ref-all pointers. */
2276 /* To avoid creating unnecessary memory tags, only create one memory tag
2284 for (i = 0, tag = NULL_TREE; i < ai->num_pointers; i++)
2290 tag = curr_tag;
2296 tag for PTR and add it to the POINTERS array. */
2297 if (tag == NULL_TREE)
2301 /* If PTR did not have a symbol tag already, create a new SMT.*
2305 tag = create_memory_tag (tag_type, true);
2307 tag = var_ann (ptr)->symbol_mem_tag;
2318 /* If the pointed-to type is volatile, so is the tag. */
2319 TREE_THIS_VOLATILE (tag) |= TREE_THIS_VOLATILE (tag_type);
2321 /* Make sure that the symbol tag has the same alias set as the
2323 gcc_assert (tag_set == get_alias_set (tag));
2325 return tag;
2494 fprintf (file, ", name memory tag: ");
2675 is_aliased_with (tree tag, tree sym)
2683 aliases = var_ann (tag)->may_aliases;
2700 if (al == tag)
2746 add_may_alias_for_new_tag (tree tag, tree var)
2763 add_may_alias (tag, var);
2771 add_may_alias (tag, al);
2774 return tag;
2777 /* Create a new symbol tag for PTR. Construct the may-alias list of this type
2778 tag so that it has the aliasing of VAR, or of the relevant subvars of VAR
2781 Note, the set of aliases represented by the new symbol tag are not marked
2789 tree tag;
2801 tag = create_memory_tag (tag_type, true);
2802 p_ann->symbol_mem_tag = tag;
2804 /* Add VAR to the may-alias set of PTR's new symbol tag. If VAR has
2805 subvars, add the subvars to the tag instead of the actual var. */
2826 ali = add_may_alias_for_new_tag (tag, VEC_index (tree, overlaps, 0));
2834 ali = add_may_alias_for_new_tag (tag, sv_var);
2836 if (ali != tag)
2840 'ali' as one of the may_aliases of the new tag. */
2841 add_may_alias (tag, ali);
2842 ali = tag;
2848 ali = add_may_alias_for_new_tag (tag, var);
2851 TREE_READONLY (tag) = TREE_READONLY (var);
2852 MTAG_GLOBAL (tag) = is_global_var (var);
3103 fprintf (dump_file, "structure field tag %s created for var %s",