summaryrefslogtreecommitdiff
path: root/gcc/tree-flow-inline.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-flow-inline.h')
-rw-r--r--gcc/tree-flow-inline.h38
1 files changed, 37 insertions, 1 deletions
diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h
index bc4c3946335..49be48e1009 100644
--- a/gcc/tree-flow-inline.h
+++ b/gcc/tree-flow-inline.h
@@ -587,7 +587,14 @@ num_imm_uses (tree var)
return num;
}
-
+/* Return true if VAR has no immediate uses. */
+static inline bool
+zero_imm_uses_p (tree var)
+{
+ ssa_use_operand_t *ptr = &(SSA_NAME_IMM_USE_NODE (var));
+ return (ptr == ptr->next);
+}
+
/* Return the tree pointer to by USE. */
static inline tree
get_use_from_ptr (use_operand_p use)
@@ -1712,6 +1719,35 @@ overlap_subvar (unsigned HOST_WIDE_INT offset, unsigned HOST_WIDE_INT size,
}
+/* Return the memory tag associated with symbol SYM. */
+
+static inline tree
+symbol_mem_tag (tree sym)
+{
+ tree tag = get_var_ann (sym)->symbol_mem_tag;
+
+#if defined ENABLE_CHECKING
+ if (tag)
+ gcc_assert (TREE_CODE (tag) == SYMBOL_MEMORY_TAG);
+#endif
+
+ return tag;
+}
+
+
+/* Set the memory tag associated with symbol SYM. */
+
+static inline void
+set_symbol_mem_tag (tree sym, tree tag)
+{
+#if defined ENABLE_CHECKING
+ if (tag)
+ gcc_assert (TREE_CODE (tag) == SYMBOL_MEMORY_TAG);
+#endif
+
+ get_var_ann (sym)->symbol_mem_tag = tag;
+}
+
/* Get the value handle of EXPR. This is the only correct way to get
the value handle for a "thing". If EXPR does not have a value
handle associated, it returns NULL_TREE.