]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-flow-inline.h (get_stmt_operands): Remove.
authorKazu Hirata <kazu@cs.umass.edu>
Sun, 17 Apr 2005 06:42:03 +0000 (06:42 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Sun, 17 Apr 2005 06:42:03 +0000 (06:42 +0000)
* 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.

From-SVN: r98262

25 files changed:
gcc/ChangeLog
gcc/doc/tree-ssa.texi
gcc/lambda-code.c
gcc/tree-cfg.c
gcc/tree-flow-inline.h
gcc/tree-outof-ssa.c
gcc/tree-ssa-alias.c
gcc/tree-ssa-ccp.c
gcc/tree-ssa-dce.c
gcc/tree-ssa-dse.c
gcc/tree-ssa-live.c
gcc/tree-ssa-loop-im.c
gcc/tree-ssa-loop-ivopts.c
gcc/tree-ssa-loop-manip.c
gcc/tree-ssa-loop-niter.c
gcc/tree-ssa-loop-unswitch.c
gcc/tree-ssa-operands.c
gcc/tree-ssa-pre.c
gcc/tree-ssa-propagate.c
gcc/tree-ssa-sink.c
gcc/tree-ssa.c
gcc/tree-tailcall.c
gcc/tree-vect-transform.c
gcc/tree-vectorizer.c
gcc/tree-vrp.c

index 903ae80d755b01c3e92245af77fd2cd420c95211..4698d048c5cdf2f2379bf0157ef683d13811089e 100644 (file)
@@ -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
index 2665b839a8698ba74e4d0350686db6f7ea59920b..faf8cccb292c9d8d9c097cd7a33b8565276550f2 100644 (file)
@@ -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
index 5b23d6d5fa136995210c9e245ed8ba4c35168270..50815f981b1a12284ec13139b7d9874ecb5dc2ab 100644 (file)
@@ -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)
index a80285b131f8fa863379599cec0e267f337f2c71..6bed701e5da6121e41310ebcd1b6e01f431d3373 100644 (file)
@@ -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);
index 993c1ded320e8a57ba921dd6a40bf7f7c5dbe764..f41448bc0e94e5b6da1635e784d8f8597cf9e072 100644 (file)
@@ -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)
index 4663abbdeac08e89d4da571848869482bec5250b..657d1b5461088bdaa57b96207a2b50aed257dd4c 100644 (file)
@@ -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;
 
index 13809670fa8fd5a1a86684c46ece7ea76106a883..b926113ded878ab2f8777a2fa00b3898a576f96d 100644 (file)
@@ -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)
index 8b7ca40aa7eef2ca84dc9ca1fa3e8c9170b8af54..9003a9d974a33f5af5e11fee6ddbef8a9043ca00 100644 (file)
@@ -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)
 
            {
index 582de359dd74db3511f5f2694f1161fc0eb7d2e5..f152321ab9a940af08923a62c69ac6cfbfb7f381 100644 (file)
@@ -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 
index 4d929e1331b507543df4efa6736f442e320ec900..1f376c4b964928096a402317fcb1b95208399022 100644 (file)
@@ -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
index a4b4ab05d74789999cf79231c01c06fe02cb9474..718c3a39dfbb4f26d6ac3ff0b3810f059af963d3 100644 (file)
@@ -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 
index 4e123f2c8a57a633788ed4ef33ae744e22249753..b51b5e11806b74ab5605c355895c53fd8a50b870 100644 (file)
@@ -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;
 
index 6dbb451fadf7eec1dfcb7e5e0324de5d33091f88..d1bf6a52dc10ed90c889bea0cdf2f74aa913d6aa 100644 (file)
@@ -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));
index fbb45ad3b01ad50fcf1fd27ecd8eadbab0e17577..02b21a32f943612e61cb2ec482138bf446607bc6 100644 (file)
@@ -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);
 }
index 35d446cd363a8ca25e6e6ceb2eeedd8df0023d04..b1af67f00111535bf66b44821af32130733cbe8a 100644 (file)
@@ -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)
index 9546342c9dc2f98e53c61eaba95c137e0ffca5a3..7b8855e7f5846638c909721aab0528e371508696 100644 (file)
@@ -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++)
     {
index 9c009f74773371ec83337d0910f6576809123f59..b2f8b32fea1a4091cb360ce2b150297a14641790 100644 (file)
@@ -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);
index 2e2788eea1664ec07e3869c35d6d159ffe3f3807..9029dbe3de304550008f7837ffb3ee3945ddc43e 100644 (file)
@@ -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 
index a4c764aacef0250cda9a7973da5ca9a5b137363d..0cac9f462dfcad15ddfd38d278e2bd4d11827dbf 100644 (file)
@@ -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))
index a315d0d47735f57196091c3d198fe6a43ac028f7..7751c4a8d7e07970370a0ef3b60cf8af9bef9b4f 100644 (file)
@@ -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)
index 1e232e392e53e8ca321e74037934490f26bbb3d8..8efbdde0b916979a7aa5a29973d27093096f7814 100644 (file)
@@ -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;
index 3a9162ce4e0c2570f76799730c23020c9e798a2a..4034b8c3d96931d82a226cf8f9f3691a2f1f6e2f 100644 (file)
@@ -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;
 
index e325ef80e423f93568d3660f9ff6aca633c2f49f..f07669bb8f7598cc817fb5e4e3a2b0b4c61dfa1d 100644 (file)
@@ -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;
index c264ee0c4f8b232da34cab78bca0d6a30f4d13a0..13b2281e1747834511c420db24e9f8eee27cbbd9 100644 (file)
@@ -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));
        }
index 41cf6e1806b226b86430aad2bf6f73048a86d2ec..c1f910e5ce10beabe1e7d6a682fbf31b5fc3006c 100644 (file)
@@ -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