return false;
}
-/* Advance the hashtable iterator pointed by HTI to the next element of the
+/* Advance the hashtable iterator pointed to by HTI to the next element of the
hashtable. */
static inline void *
return NULL;
return itm->to;
}
-
+
+/* Fill up VEC with the variables in the referenced vars hashtable. */
+
+static inline void
+fill_referenced_var_vec (VEC (tree, heap) **vec)
+{
+ referenced_var_iterator rvi;
+ tree var;
+ *vec = NULL;
+ FOR_EACH_REFERENCED_VAR (var, rvi)
+ VEC_safe_push (tree, heap, *vec, var);
+}
+
/* Return the variable annotation for T, which must be a _DECL node.
Return NULL if the variable annotation doesn't already exist. */
static inline var_ann_t
}
}
-/* Set the value of a use pointed by USE to VAL. */
+/* Set the value of a use pointed to by USE to VAL. */
static inline void
set_ssa_use_from_ptr (use_operand_p use, tree val)
{
return bsi;
}
-/* Return a block statement iterator that points to the last label in
+/* Return a block statement iterator that points to the first non-label
block BB. */
static inline block_stmt_iterator
if (tsi_end_p (bsi.tsi))
return bsi;
- /* Ensure that there are some labels. The rationale is that we want
- to insert after the bsi that is returned, and these insertions should
- be placed at the start of the basic block. This would not work if the
- first statement was not label; rather fail here than enable the user
- proceed in wrong way. */
- gcc_assert (TREE_CODE (tsi_stmt (bsi.tsi)) == LABEL_EXPR);
-
next = bsi.tsi;
tsi_next (&next);
/* If there is a single operand in STMT matching FLAGS, return it. Otherwise
- return NULL. PTR is the iterator to use. */
+ return NULL. */
static inline tree
single_ssa_tree_operand (tree stmt, int flags)
{
/* If there is a single operand in STMT matching FLAGS, return it. Otherwise
- return NULL. PTR is the iterator to use. */
+ return NULL. */
static inline use_operand_p
single_ssa_use_operand (tree stmt, int flags)
{
/* If there is a single operand in STMT matching FLAGS, return it. Otherwise
- return NULL. PTR is the iterator to use. */
+ return NULL. */
static inline def_operand_p
single_ssa_def_operand (tree stmt, int flags)
{
/* If there is a single operand in STMT matching FLAGS, return it. Otherwise
- return NULL. PTR is the iterator to use. */
+ return NULL. */
static inline bool
zero_ssa_operands (tree stmt, int flags)
{
return TREE_READONLY (var) && (TREE_STATIC (var) || DECL_EXTERNAL (var));
}
+/* Return true if REF, an ARRAY_REF, has an INDIRECT_REF somewhere in
+ it. */
+
+static inline bool
+ref_contains_indirect_ref (tree ref)
+{
+ while (handled_component_p (ref))
+ {
+ if (TREE_CODE (ref) == INDIRECT_REF)
+ return true;
+ ref = TREE_OPERAND (ref, 0);
+ }
+ return false;
+}
+
/* Return true if REF, a COMPONENT_REF, has an ARRAY_REF somewhere in it. */
static inline bool
return subvars;
}
+/* Return the subvariable of VAR at offset OFFSET. */
+
+static inline tree
+get_subvar_at (tree var, unsigned HOST_WIDE_INT offset)
+{
+ subvar_t sv;
+
+ for (sv = get_subvars_for_var (var); sv; sv = sv->next)
+ if (sv->offset == offset)
+ return sv->var;
+
+ return NULL_TREE;
+}
+
/* Return true if V is a tree that we can have subvars for.
Normally, this is any aggregate type, however, due to implementation
limitations ATM, we exclude array types as well. */
*EXACT will be set to true upon return. */
static inline bool
-overlap_subvar (HOST_WIDE_INT offset, HOST_WIDE_INT size,
+overlap_subvar (unsigned HOST_WIDE_INT offset, unsigned HOST_WIDE_INT size,
subvar_t sv, bool *exact)
{
/* There are three possible cases of overlap.
{
return true;
}
- else if (offset < sv->offset && (offset + size > sv->offset))
+ else if (offset < sv->offset && (size > sv->offset - offset))
{
return true;
}