diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/doc/tree-ssa.texi | 15 | ||||
-rw-r--r-- | gcc/lambda-code.c | 1 | ||||
-rw-r--r-- | gcc/tree-cfg.c | 4 | ||||
-rw-r--r-- | gcc/tree-flow-inline.h | 21 | ||||
-rw-r--r-- | gcc/tree-outof-ssa.c | 1 | ||||
-rw-r--r-- | gcc/tree-ssa-alias.c | 1 | ||||
-rw-r--r-- | gcc/tree-ssa-ccp.c | 4 | ||||
-rw-r--r-- | gcc/tree-ssa-dce.c | 4 | ||||
-rw-r--r-- | gcc/tree-ssa-dse.c | 1 | ||||
-rw-r--r-- | gcc/tree-ssa-live.c | 4 | ||||
-rw-r--r-- | gcc/tree-ssa-loop-im.c | 5 | ||||
-rw-r--r-- | gcc/tree-ssa-loop-ivopts.c | 3 | ||||
-rw-r--r-- | gcc/tree-ssa-loop-manip.c | 4 | ||||
-rw-r--r-- | gcc/tree-ssa-loop-niter.c | 1 | ||||
-rw-r--r-- | gcc/tree-ssa-loop-unswitch.c | 1 | ||||
-rw-r--r-- | gcc/tree-ssa-operands.c | 19 | ||||
-rw-r--r-- | gcc/tree-ssa-pre.c | 3 | ||||
-rw-r--r-- | gcc/tree-ssa-propagate.c | 2 | ||||
-rw-r--r-- | gcc/tree-ssa-sink.c | 1 | ||||
-rw-r--r-- | gcc/tree-ssa.c | 5 | ||||
-rw-r--r-- | gcc/tree-tailcall.c | 3 | ||||
-rw-r--r-- | gcc/tree-vect-transform.c | 1 | ||||
-rw-r--r-- | gcc/tree-vectorizer.c | 2 | ||||
-rw-r--r-- | gcc/tree-vrp.c | 1 |
25 files changed, 21 insertions, 94 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 903ae80..4698d04 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -7,6 +7,14 @@ * 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 diff --git a/gcc/doc/tree-ssa.texi b/gcc/doc/tree-ssa.texi index 2665b83..faf8ccc 100644 --- a/gcc/doc/tree-ssa.texi +++ b/gcc/doc/tree-ssa.texi @@ -886,15 +886,14 @@ print_ops (tree stmt) @} @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 diff --git a/gcc/lambda-code.c b/gcc/lambda-code.c index 5b23d6d..50815f9 100644 --- a/gcc/lambda-code.c +++ b/gcc/lambda-code.c @@ -1294,7 +1294,6 @@ gcc_loop_to_lambda_loop (struct loop *loop, int depth, phi = SSA_NAME_DEF_STMT (inductionvar); if (TREE_CODE (phi) != PHI_NODE) { - get_stmt_operands (phi); uses = STMT_USE_OPS (phi); if (!uses) diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index a80285b..6bed701 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -4730,9 +4730,6 @@ tree_duplicate_bb (basic_block bb) 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); @@ -4946,7 +4943,6 @@ rewrite_to_new_ssa_names_bb (basic_block bb, htab_t map) 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); diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h index 993c1de..f41448b 100644 --- a/gcc/tree-flow-inline.h +++ b/gcc/tree-flow-inline.h @@ -172,27 +172,6 @@ update_stmt_if_modified (tree t) 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) diff --git a/gcc/tree-outof-ssa.c b/gcc/tree-outof-ssa.c index 4663abb..657d1b5 100644 --- a/gcc/tree-outof-ssa.c +++ b/gcc/tree-outof-ssa.c @@ -1885,7 +1885,6 @@ rewrite_trees (var_map map, tree *values) stmt_ann_t ann; ssa_op_iter iter; - get_stmt_operands (stmt); ann = stmt_ann (stmt); changed = false; diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index 1380967..b926113 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -656,7 +656,6 @@ compute_points_to_and_addr_escape (struct alias_info *ai) 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) diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index 8b7ca40..9003a9d 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -475,8 +475,6 @@ likely_value (tree stmt) && 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) { @@ -525,8 +523,6 @@ ccp_initialize (void) bool is_varying = false; tree stmt = bsi_stmt (i); - get_stmt_operands (stmt); - if (likely_value (stmt) == VARYING) { diff --git a/gcc/tree-ssa-dce.c b/gcc/tree-ssa-dce.c index 582de35..f152321 100644 --- a/gcc/tree-ssa-dce.c +++ b/gcc/tree-ssa-dce.c @@ -355,8 +355,6 @@ mark_stmt_if_obviously_necessary (tree stmt, bool aggressive) return; } - get_stmt_operands (stmt); - FOR_EACH_SSA_TREE_OPERAND (def, stmt, iter, SSA_OP_DEF) { if (is_global_var (SSA_NAME_VAR (def))) @@ -539,8 +537,6 @@ propagate_necessity (struct edge_list *el) 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 diff --git a/gcc/tree-ssa-dse.c b/gcc/tree-ssa-dse.c index 4d929e1..1f376c4 100644 --- a/gcc/tree-ssa-dse.c +++ b/gcc/tree-ssa-dse.c @@ -178,7 +178,6 @@ dse_optimize_stmt (struct dom_walk_data *walk_data, 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 diff --git a/gcc/tree-ssa-live.c b/gcc/tree-ssa-live.c index a4b4ab0..718c3a3 100644 --- a/gcc/tree-ssa-live.c +++ b/gcc/tree-ssa-live.c @@ -367,7 +367,6 @@ create_ssa_var_map (int flags) 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) @@ -612,7 +611,6 @@ calculate_live_on_entry (var_map map) 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) { @@ -1324,8 +1322,6 @@ build_tree_conflict_graph (tree_live_info_p liveinfo, tpa_p tpa, 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 diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-ssa-loop-im.c index 4e123f2..b51b5e1 100644 --- a/gcc/tree-ssa-loop-im.c +++ b/gcc/tree-ssa-loop-im.c @@ -220,8 +220,6 @@ movement_possibility (tree stmt) { /* 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; } @@ -231,8 +229,6 @@ movement_possibility (tree stmt) if (stmt_ends_bb_p (stmt)) return MOVE_IMPOSSIBLE; - get_stmt_operands (stmt); - if (stmt_ann (stmt)->has_volatile_ops) return MOVE_IMPOSSIBLE; @@ -622,7 +618,6 @@ determine_invariantness_stmt (struct dom_walk_data *dw_data ATTRIBUTE_UNUSED, 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; diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c index 6dbb451..d1bf6a5 100644 --- a/gcc/tree-ssa-loop-ivopts.c +++ b/gcc/tree-ssa-loop-ivopts.c @@ -1553,7 +1553,6 @@ find_invariants_stmt (struct ivopts_data *data, tree stmt) n = PHI_NUM_ARGS (stmt); else { - get_stmt_operands (stmt); uses = STMT_USE_OPS (stmt); n = NUM_USES (uses); } @@ -4994,8 +4993,6 @@ protect_loop_closed_ssa_form (edge exit, tree stmt) 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)); diff --git a/gcc/tree-ssa-loop-manip.c b/gcc/tree-ssa-loop-manip.c index fbb45ad..02b21a3 100644 --- a/gcc/tree-ssa-loop-manip.c +++ b/gcc/tree-ssa-loop-manip.c @@ -256,8 +256,6 @@ find_uses_to_rename_stmt (tree stmt, bitmap *use_blocks) 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); } @@ -402,8 +400,6 @@ check_loop_closed_ssa_stmt (basic_block bb, tree stmt) 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); } diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c index 35d446c..b1af67f 100644 --- a/gcc/tree-ssa-loop-niter.c +++ b/gcc/tree-ssa-loop-niter.c @@ -1028,7 +1028,6 @@ chain_of_csts_start (struct loop *loop, tree x) 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) diff --git a/gcc/tree-ssa-loop-unswitch.c b/gcc/tree-ssa-loop-unswitch.c index 9546342..7b8855e 100644 --- a/gcc/tree-ssa-loop-unswitch.c +++ b/gcc/tree-ssa-loop-unswitch.c @@ -128,7 +128,6 @@ tree_may_unswitch_on (basic_block bb, struct loop *loop) return NULL_TREE; /* Condition must be invariant. */ - get_stmt_operands (stmt); uses = STMT_USE_OPS (stmt); for (i = 0; i < NUM_USES (uses); i++) { diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c index 9c009f7..b2f8b32 100644 --- a/gcc/tree-ssa-operands.c +++ b/gcc/tree-ssa-operands.c @@ -50,8 +50,6 @@ Boston, MA 02111-1307, USA. */ 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 @@ -81,7 +79,7 @@ Boston, MA 02111-1307, USA. */ */ -/* 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 @@ -520,9 +518,7 @@ finalize_ssa_uses (use_optype *old_ops_p, tree stmt) { 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); } @@ -1219,9 +1215,7 @@ swap_tree_operands (tree *exp0, tree *exp1) *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) @@ -1229,8 +1223,7 @@ 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 @@ -1249,9 +1242,7 @@ update_stmt_operands (tree stmt) 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); diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c index 2e2788e..9029dbe 100644 --- a/gcc/tree-ssa-pre.c +++ b/gcc/tree-ssa-pre.c @@ -1958,7 +1958,6 @@ compute_avail (void) 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" @@ -2176,8 +2175,6 @@ remove_dead_inserted_code (void) 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 diff --git a/gcc/tree-ssa-propagate.c b/gcc/tree-ssa-propagate.c index a4c764a..0cac9f4 100644 --- a/gcc/tree-ssa-propagate.c +++ b/gcc/tree-ssa-propagate.c @@ -1032,8 +1032,6 @@ substitute_and_fold (prop_value_t *prop_value) 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)) diff --git a/gcc/tree-ssa-sink.c b/gcc/tree-ssa-sink.c index a315d0d..7751c4a 100644 --- a/gcc/tree-ssa-sink.c +++ b/gcc/tree-ssa-sink.c @@ -462,7 +462,6 @@ sink_code_in_bb (basic_block bb) tree stmt = bsi_stmt (bsi); block_stmt_iterator tobsi; tree sinkstmt; - get_stmt_operands (stmt); sinkstmt = statement_sink_location (stmt, bb); if (!sinkstmt) diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c index 1e232e3..8efbdde 100644 --- a/gcc/tree-ssa.c +++ b/gcc/tree-ssa.c @@ -930,10 +930,7 @@ tree_ssa_useless_type_conversion (tree expr) 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; diff --git a/gcc/tree-tailcall.c b/gcc/tree-tailcall.c index 3a9162c..4034b8c 100644 --- a/gcc/tree-tailcall.c +++ b/gcc/tree-tailcall.c @@ -394,8 +394,6 @@ find_tail_calls (basic_block bb, struct tailcall **ret) if (TREE_CODE (stmt) == LABEL_EXPR) continue; - get_stmt_operands (stmt); - /* Check for a call. */ if (TREE_CODE (stmt) == MODIFY_EXPR) { @@ -687,7 +685,6 @@ eliminate_tail_call (struct tailcall *t) block_stmt_iterator bsi; stmt = bsi_stmt (t->call_bsi); - get_stmt_operands (stmt); ann = stmt_ann (stmt); bb = t->call_block; diff --git a/gcc/tree-vect-transform.c b/gcc/tree-vect-transform.c index e325ef8..f07669b 100644 --- a/gcc/tree-vect-transform.c +++ b/gcc/tree-vect-transform.c @@ -146,7 +146,6 @@ vect_create_index_for_vector_ref (loop_vec_info loop_vinfo) 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; diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c index c264ee0..13b2281 100644 --- a/gcc/tree-vectorizer.c +++ b/gcc/tree-vectorizer.c @@ -282,7 +282,6 @@ rename_variables_in_bb (basic_block bb) 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); @@ -1485,7 +1484,6 @@ new_loop_vec_info (struct loop *loop) 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)); } diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index 41cf6e1..c1f910e 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -1443,7 +1443,6 @@ maybe_add_assert_expr (basic_block bb) 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 |