* c-parser.c (N_C_TTYPES): Remove.
+ * tree-flow-inline.h (get_stmt_operands): Remove.
+ * lambda-code.c, tree-ssa-loop-unswitch.c,
+ tree-ssa-operands.c, tree-ssa-pre.c, tree-ssa-propagate.c,
+ tree-ssa-sink.c, tree-ssa.c, tree-tailcall.c,
+ tree-vect-transform.c, tree-vectorizer.c, tree-vrp.c): Remove
+ calls to get_stmt_operands.
+ * doc/tree-ssa.texi: Don't mention get_stmt_operands.
+
2005-04-17 Richard Henderson <rth@redhat.com>
PR target/20375
@}
@end smallexample
-Operands were once updated lazily via calls to @code{get_stmt_operands}.
-This function is now deprecated and operands are updated as soon as the
-statement is finished via a call to @code{update_stmt}. If statement elements
-are changed via @code{SET_USE} or @code{SET_DEF}, then no further action is
-required (ie, those macros take care of updating the statement). If
-changes are made by manipulating the statement's tree directly, then a call
+Operands are updated as soon as the statement is finished via a call
+to @code{update_stmt}. If statement elements are changed via
+@code{SET_USE} or @code{SET_DEF}, then no further action is required
+(ie, those macros take care of updating the statement). If changes
+are made by manipulating the statement's tree directly, then a call
must be made to @code{update_stmt} when complete. Calling one of the
-@code{bsi_insert} routines or @code{bsi_replace} performs an implicit call
-to @code{update_stmt}.
+@code{bsi_insert} routines or @code{bsi_replace} performs an implicit
+call to @code{update_stmt}.
@subsection Operand Iterators
@cindex Operand Iterators
phi = SSA_NAME_DEF_STMT (inductionvar);
if (TREE_CODE (phi) != PHI_NODE)
{
- get_stmt_operands (phi);
uses = STMT_USE_OPS (phi);
if (!uses)
if (TREE_CODE (stmt) == LABEL_EXPR)
continue;
- /* Record the definitions. */
- get_stmt_operands (stmt);
-
FOR_EACH_SSA_TREE_OPERAND (val, stmt, op_iter, SSA_OP_ALL_DEFS)
mark_for_rewrite (val);
for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi))
{
stmt = bsi_stmt (bsi);
- get_stmt_operands (stmt);
ann = stmt_ann (stmt);
uses = USE_OPS (ann);
update_stmt_operands (t);
}
-static inline void
-get_stmt_operands (tree stmt ATTRIBUTE_UNUSED)
-{
-#ifdef ENABLE_CHECKING
- stmt_ann_t ann;
-
- /* The optimizers cannot handle statements that are nothing but a
- _DECL. This indicates a bug in the gimplifier. */
- gcc_assert (!SSA_VAR_P (stmt));
-
- /* Ignore error statements. */
- if (TREE_CODE (stmt) == ERROR_MARK)
- return;
-
- ann = get_stmt_ann (stmt);
- gcc_assert (!ann->modified);
-
- return;
-#endif
-}
-
/* Return true if T is marked as modified, false otherwise. */
static inline bool
stmt_modified_p (tree t)
stmt_ann_t ann;
ssa_op_iter iter;
- get_stmt_operands (stmt);
ann = stmt_ann (stmt);
changed = false;
statement. Note that this will miss all the addresses taken
in PHI nodes (those are discovered while following the use-def
chains). */
- get_stmt_operands (stmt);
addr_taken = addresses_taken (stmt);
if (addr_taken)
EXECUTE_IF_SET_IN_BITMAP (addr_taken, 0, i, bi)
&& TREE_CODE (stmt) != SWITCH_EXPR)
return VARYING;
- get_stmt_operands (stmt);
-
found_constant = false;
FOR_EACH_SSA_TREE_OPERAND (use, stmt, iter, SSA_OP_USE|SSA_OP_VUSE)
{
bool is_varying = false;
tree stmt = bsi_stmt (i);
- get_stmt_operands (stmt);
-
if (likely_value (stmt) == VARYING)
{
return;
}
- get_stmt_operands (stmt);
-
FOR_EACH_SSA_TREE_OPERAND (def, stmt, iter, SSA_OP_DEF)
{
if (is_global_var (SSA_NAME_VAR (def)))
ssa_op_iter iter;
tree use;
- get_stmt_operands (i);
-
/* The operands of V_MAY_DEF expressions are also needed as they
represent potential definitions that may reach this
statement (V_MAY_DEF operands allow us to follow def-def
stmt_ann_t ann = stmt_ann (stmt);
v_may_def_optype v_may_defs;
- get_stmt_operands (stmt);
v_may_defs = V_MAY_DEF_OPS (ann);
/* If this statement has no virtual defs, then there is nothing
for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi))
{
stmt = bsi_stmt (bsi);
- get_stmt_operands (stmt);
/* Register USE and DEF operands in each statement. */
FOR_EACH_SSA_TREE_OPERAND (use , stmt, iter, SSA_OP_USE)
for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi))
{
stmt = bsi_stmt (bsi);
- get_stmt_operands (stmt);
FOR_EACH_SSA_TREE_OPERAND (op, stmt, iter, SSA_OP_USE)
{
bool is_a_copy = false;
tree stmt = bsi_stmt (bsi);
- get_stmt_operands (stmt);
-
/* A copy between 2 partitions does not introduce an interference
by itself. If they did, you would never be able to coalesce
two things which are copied. If the two variables really do
{
/* If we perform unswitching, force the operands of the invariant
condition to be moved out of the loop. */
- get_stmt_operands (stmt);
-
return MOVE_POSSIBLE;
}
if (stmt_ends_bb_p (stmt))
return MOVE_IMPOSSIBLE;
- get_stmt_operands (stmt);
-
if (stmt_ann (stmt)->has_volatile_ops)
return MOVE_IMPOSSIBLE;
The multiply stmt is not invariant, so update iterator
and avoid rescanning. */
bsi_replace (&bsi, stmt1, true);
- get_stmt_operands (stmt1); /* Should not be necessary. */
bsi_insert_after (&bsi, stmt2, BSI_NEW_STMT);
SSA_NAME_DEF_STMT (lhs) = stmt2;
n = PHI_NUM_ARGS (stmt);
else
{
- get_stmt_operands (stmt);
uses = STMT_USE_OPS (stmt);
n = NUM_USES (uses);
}
v_may_def_optype v_may_defs;
unsigned i;
- get_stmt_operands (stmt);
-
uses = STMT_USE_OPS (stmt);
for (i = 0; i < NUM_USES (uses); i++)
protect_loop_closed_ssa_form_use (exit, USE_OP_PTR (uses, i));
tree var;
basic_block bb = bb_for_stmt (stmt);
- get_stmt_operands (stmt);
-
FOR_EACH_SSA_TREE_OPERAND (var, stmt, iter, SSA_OP_ALL_USES | SSA_OP_ALL_KILLS)
find_uses_to_rename_use (bb, var, use_blocks);
}
ssa_op_iter iter;
tree var;
- get_stmt_operands (stmt);
-
FOR_EACH_SSA_TREE_OPERAND (var, stmt, iter, SSA_OP_ALL_USES)
check_loop_closed_ssa_use (bb, var);
}
if (TREE_CODE (stmt) != MODIFY_EXPR)
return NULL_TREE;
- get_stmt_operands (stmt);
if (NUM_VUSES (STMT_VUSE_OPS (stmt)) > 0)
return NULL_TREE;
if (NUM_V_MAY_DEFS (STMT_V_MAY_DEF_OPS (stmt)) > 0)
return NULL_TREE;
/* Condition must be invariant. */
- get_stmt_operands (stmt);
uses = STMT_USE_OPS (stmt);
for (i = 0; i < NUM_USES (uses); i++)
{
The routines in this file are concerned with creating this operand cache
from a stmt tree.
- get_stmt_operands() in the primary entry point.
-
The operand tree is the parsed by the various get_* routines which look
through the stmt tree for the occurrence of operands which may be of
interest, and calls are made to the append_* routines whenever one is
*/
-/* Flags to describe operand properties in get_stmt_operands and helpers. */
+/* Flags to describe operand properties in helpers. */
/* By default, operands are loaded. */
#define opf_none 0
{
unsigned x;
/* If the pointer to the operand is the statement itself, something is
- wrong. It means that we are pointing to a local variable (the
- initial call to get_stmt_operands does not pass a pointer to a
- statement). */
+ wrong. It means that we are pointing to a local variable. */
for (x = 0; x < num; x++)
gcc_assert (*(VARRAY_TREE_PTR (build_uses, x)) != stmt);
}
*exp1 = op0;
}
-/* Get the operands of statement STMT. Note that repeated calls to
- get_stmt_operands for the same statement will do nothing until the
- statement is marked modified by a call to mark_stmt_modified(). */
+/* Get the operands of statement STMT. */
void
update_stmt_operands (tree stmt)
stmt_ann_t ann;
stmt_operands_t old_operands;
- /* If get_stmt_operands is called before SSA is initialized, dont
- do anything. */
+ /* Don't do anything if we are called before SSA is initialized. */
if (build_defs == NULL)
return;
/* The optimizers cannot handle statements that are nothing but a
build_ssa_operands (stmt, ann, &old_operands, &(ann->operands));
free_ssa_operands (&old_operands);
- /* Clear the modified bit for STMT. Subsequent calls to
- get_stmt_operands for this statement will do nothing until the
- statement is marked modified by a call to mark_stmt_modified(). */
+ /* Clear the modified bit for STMT. */
ann->modified = 0;
timevar_pop (TV_TREE_OPS);
stmt = bsi_stmt (bsi);
ann = stmt_ann (stmt);
- get_stmt_operands (stmt);
/* We are only interested in assignments of the form
X_i = EXPR, where EXPR represents an "interesting"
ssa_op_iter iter;
tree use;
- get_stmt_operands (t);
-
/* The operands of V_MAY_DEF expressions are also needed as they
represent potential definitions that may reach this
statement (V_MAY_DEF operands allow us to follow def-def
bool replaced_address, did_replace;
tree stmt = bsi_stmt (i);
- get_stmt_operands (stmt);
-
/* Replace the statement with its folded version and mark it
folded. */
if (dump_file && (dump_flags & TDF_DETAILS))
tree stmt = bsi_stmt (bsi);
block_stmt_iterator tobsi;
tree sinkstmt;
- get_stmt_operands (stmt);
sinkstmt = statement_sink_location (stmt, bb);
if (!sinkstmt)
bool
stmt_references_memory_p (tree stmt)
{
- stmt_ann_t ann;
-
- get_stmt_operands (stmt);
- ann = stmt_ann (stmt);
+ stmt_ann_t ann = stmt_ann (stmt);
if (ann->has_volatile_ops)
return true;
if (TREE_CODE (stmt) == LABEL_EXPR)
continue;
- get_stmt_operands (stmt);
-
/* Check for a call. */
if (TREE_CODE (stmt) == MODIFY_EXPR)
{
block_stmt_iterator bsi;
stmt = bsi_stmt (t->call_bsi);
- get_stmt_operands (stmt);
ann = stmt_ann (stmt);
bb = t->call_block;
create_iv (init, step, NULL_TREE, loop, &incr_bsi, insert_after,
&indx_before_incr, &indx_after_incr);
incr = bsi_stmt (incr_bsi);
- get_stmt_operands (incr);
set_stmt_info (stmt_ann (incr), new_stmt_vec_info (incr, loop_vinfo));
return indx_before_incr;
for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi))
{
stmt = bsi_stmt (bsi);
- get_stmt_operands (stmt);
ann = stmt_ann (stmt);
uses = USE_OPS (ann);
tree stmt = bsi_stmt (si);
stmt_ann_t ann;
- get_stmt_operands (stmt);
ann = stmt_ann (stmt);
set_stmt_info (ann, new_stmt_vec_info (stmt, res));
}
ssa_op_iter i;
stmt = bsi_stmt (si);
- get_stmt_operands (stmt);
/* Mark all the SSA names used by STMT in bitmap FOUND. If STMT
is inside the sub-graph of a conditional block, when we