return (ann) ? ann : create_stmt_ann (stmt);
}
-
/* Return the annotation type for annotation ANN. */
static inline enum tree_ann_type
ann_type (tree_ann_t ann)
link_imm_use (use, val);
}
-/* Link ssa_imm_use node LINKNODE into the chain for DEF, with use occuring
+/* Link ssa_imm_use node LINKNODE into the chain for DEF, with use occurring
in STMT. */
static inline void
link_imm_use_stmt (ssa_use_operand_t *linknode, tree def, tree stmt)
}
}
-/* Relink ssa_imm_use node LINKNODE into the chain for OLD, with use occuring
+/* Relink ssa_imm_use node LINKNODE into the chain for OLD, with use occurring
in STMT. */
static inline void
relink_imm_use_stmt (ssa_use_operand_t *linknode, ssa_use_operand_t *old, tree stmt)
return ann ? ann->addresses_taken : NULL;
}
-/* Return the basic_block annotation for BB. */
-static inline bb_ann_t
-bb_ann (basic_block bb)
-{
- return (bb_ann_t)bb->tree_annotations;
-}
-
/* Return the PHI nodes for basic block BB, or NULL if there are no
PHI nodes. */
static inline tree
phi_nodes (basic_block bb)
{
- return bb_ann (bb)->phi_nodes;
+ return bb->phi_nodes;
}
/* Set list of phi nodes of a basic block BB to L. */
{
tree phi;
- bb_ann (bb)->phi_nodes = l;
+ bb->phi_nodes = l;
for (phi = l; phi; phi = PHI_CHAIN (phi))
set_bb_for_stmt (phi, bb);
}
}
-/* This functiins clears the iterator PTR, and marks it done. This is normally
+/* This functions clears the iterator PTR, and marks it done. This is normally
used to prevent warnings in the compile about might be uninitailzied
components. */
static inline use_operand_p
op_iter_init_use (ssa_op_iter *ptr, tree stmt, int flags)
{
+ gcc_assert ((flags & SSA_OP_ALL_DEFS) == 0);
op_iter_init (ptr, stmt, flags);
ptr->iter_type = ssa_op_iter_use;
return op_iter_next_use (ptr);
static inline def_operand_p
op_iter_init_def (ssa_op_iter *ptr, tree stmt, int flags)
{
+ gcc_assert ((flags & (SSA_OP_ALL_USES | SSA_OP_VIRTUAL_KILLS)) == 0);
op_iter_init (ptr, stmt, flags);
ptr->iter_type = ssa_op_iter_def;
return op_iter_next_def (ptr);
}
-/* If there is a single opernad in STMT matching FLAGS, return it. Otherwise
+/* If there is a single operand in STMT matching FLAGS, return it. Otherwise
return NULL. PTR is the iterator to use. */
static inline tree
single_ssa_tree_operand (tree stmt, int flags)
}
-/* If there is a single opernad in STMT matching FLAGS, return it. Otherwise
+/* If there is a single operand in STMT matching FLAGS, return it. Otherwise
return NULL. PTR is the iterator to use. */
static inline use_operand_p
single_ssa_use_operand (tree stmt, int flags)
-/* If there is a single opernad in STMT matching FLAGS, return it. Otherwise
+/* If there is a single operand in STMT matching FLAGS, return it. Otherwise
return NULL. PTR is the iterator to use. */
static inline def_operand_p
single_ssa_def_operand (tree stmt, int flags)
}
-/* If there is a single opernad in STMT matching FLAGS, return it. Otherwise
+/* If there is a single operand in STMT matching FLAGS, return it. Otherwise
return NULL. PTR is the iterator to use. */
static inline bool
zero_ssa_operands (tree stmt, int flags)
}
-/* Return the number of opernads mathcing FLAGS in STMT. */
+/* Return the number of operands matching FLAGS in STMT. */
static inline int
num_ssa_operands (tree stmt, int flags)
{
ssa_op_iter iter;
+ tree t;
int num = 0;
- op_iter_init (&iter, stmt, flags);
- for ( ; iter.defs; iter.defs = iter.defs->next)
- num++;
- for ( ; iter.uses; iter.uses = iter.uses->next)
- num++;
- for ( ; iter.vuses; iter.vuses = iter.vuses->next)
+ FOR_EACH_SSA_TREE_OPERAND (t, stmt, iter, flags)
num++;
- for ( ; iter.maydefs; iter.maydefs = iter.maydefs->next)
- num++;
- for ( ; iter.mayuses; iter.mayuses = iter.mayuses->next)
- num++;
- for ( ; iter.mustdefs; iter.mustdefs = iter.mustdefs->next)
- num++;
- for ( ; iter.mustkills; iter.mustkills = iter.mustkills->next)
- num++;
-
return num;
}
comp = (is_gimple_reg (phi_def) ? SSA_OP_USE : SSA_OP_VIRTUAL_USES);
- /* if the PHI node deosn't the operand type we care about, we're done. */
+ /* If the PHI node doesn't the operand type we care about, we're done. */
if ((flags & comp) == 0)
{
ptr->done = true;
}
-/* Start an iterator for a PHI defintion. */
+/* Start an iterator for a PHI definition. */
static inline def_operand_p
op_iter_init_phidef (ssa_op_iter *ptr, tree phi, int flags)
comp = (is_gimple_reg (phi_def) ? SSA_OP_DEF : SSA_OP_VIRTUAL_DEFS);
- /* if the PHI node deosn't the operand type we care about, we're done. */
+ /* If the PHI node doesn't the operand type we care about, we're done. */
if ((flags & comp) == 0)
{
ptr->done = true;