]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-phinodes.c (add_phi_arg): Take "tree" instead of "tree *" as the first argument.
authorKazu Hirata <kazu@cs.umass.edu>
Thu, 25 Nov 2004 22:31:09 +0000 (22:31 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Thu, 25 Nov 2004 22:31:09 +0000 (22:31 +0000)
* tree-phinodes.c (add_phi_arg): Take "tree" instead of
"tree *" as the first argument.
* tree-flow.h: Update the prototype of add_phi_arg.
* lambda-code.c, tree-cfg.c, tree-into-ssa.c,
tree-ssa-loop-ivopts.c, tree-ssa-loop-manip.c, tree-ssa-pre.c,
tree-ssa-threadupdate.c, tree-ssa.c, tree-tailcall.c,
tree-vectorizer.c: Update all call sites of add_phi_arg.

From-SVN: r91307

13 files changed:
gcc/ChangeLog
gcc/lambda-code.c
gcc/tree-cfg.c
gcc/tree-flow.h
gcc/tree-into-ssa.c
gcc/tree-phinodes.c
gcc/tree-ssa-loop-ivopts.c
gcc/tree-ssa-loop-manip.c
gcc/tree-ssa-pre.c
gcc/tree-ssa-threadupdate.c
gcc/tree-ssa.c
gcc/tree-tailcall.c
gcc/tree-vectorizer.c

index 96aebd523169d4c5cb4a716f99719fbc47868f44..316ca15473eeaf2c176bbb057edc6c14bf87705a 100644 (file)
@@ -1,3 +1,13 @@
+2004-11-25  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * tree-phinodes.c (add_phi_arg): Take "tree" instead of
+       "tree *" as the first argument.
+       * tree-flow.h: Update the prototype of add_phi_arg.
+       * lambda-code.c, tree-cfg.c, tree-into-ssa.c,
+       tree-ssa-loop-ivopts.c, tree-ssa-loop-manip.c, tree-ssa-pre.c,
+       tree-ssa-threadupdate.c, tree-ssa.c, tree-tailcall.c,
+       tree-vectorizer.c: Update all call sites of add_phi_arg.
+
 2004-11-25  Nathan Sidwell  <nathan@codesourcery.com>
 
        * bitmap.c (bitmap_malloc_alloc, bitmap_malloc_free): Remove.
index 96d9798aabd13c30606cfa5f19a066d415a63ea7..1fc3af52d9b6bf361e4f3dba5565f26831ec99b9 100644 (file)
@@ -2330,7 +2330,7 @@ perfect_nestify (struct loops *loops,
       def = VEC_pop (tree, phis);
       phiname = VEC_pop (tree, phis);      
       phi = create_phi_node (phiname, preheaderbb);
-      add_phi_arg (&phi, def, EDGE_PRED (preheaderbb, 0));
+      add_phi_arg (phi, def, EDGE_PRED (preheaderbb, 0));
     }       
   flush_pending_stmts (e);
   unmark_all_for_rewrite ();
index bd2555fbaaefac56a57ac102f8d838dd457641e3..2d02f71d5b09ae6715d809f67b7248507d7068db 100644 (file)
@@ -3130,7 +3130,7 @@ reinstall_phi_args (edge new_edge, edge old_edge)
 
       gcc_assert (result == PHI_RESULT (phi));
 
-      add_phi_arg (&phi, arg, new_edge);
+      add_phi_arg (phi, arg, new_edge);
     }
 
   PENDING_STMT (old_edge) = NULL;
@@ -3862,7 +3862,7 @@ tree_make_forwarder_block (edge fallthru)
       new_phi = create_phi_node (var, bb);
       SSA_NAME_DEF_STMT (var) = new_phi;
       SET_PHI_RESULT (phi, make_ssa_name (SSA_NAME_VAR (var), phi));
-      add_phi_arg (&new_phi, PHI_RESULT (phi), fallthru);
+      add_phi_arg (new_phi, PHI_RESULT (phi), fallthru);
     }
 
   /* Ensure that the PHI node chain is in the same order.  */
@@ -4040,7 +4040,7 @@ thread_jumps_from_bb (basic_block bb)
            {
              arg = phi_arg_from_edge (phi, last);
              gcc_assert (arg >= 0);
-             add_phi_arg (&phi, PHI_ARG_DEF (phi, arg), e);
+             add_phi_arg (phi, PHI_ARG_DEF (phi, arg), e);
            }
        }
 
@@ -4566,7 +4566,7 @@ add_phi_args_after_copy_bb (basic_block bb_copy)
 
          gcc_assert (PHI_RESULT (phi) == PHI_RESULT (phi_copy));
          def = PHI_ARG_DEF_FROM_EDGE (phi, e);
-         add_phi_arg (&phi_copy, def, e_copy);
+         add_phi_arg (phi_copy, def, e_copy);
        }
     }
 }
@@ -4888,8 +4888,8 @@ tree_duplicate_sese_region (edge entry, edge exit,
       tree name = ssa_name (ver);
 
       phi = create_phi_node (name, exit->dest);
-      add_phi_arg (&phi, name, exit);
-      add_phi_arg (&phi, name, exit_copy);
+      add_phi_arg (phi, name, exit);
+      add_phi_arg (phi, name, exit_copy);
 
       SSA_NAME_DEF_STMT (name) = phi;
     }
index 9847eaf6ac3290ea7550ed532f3aeb11acdb9100..39b81fc2ded9aa682d20f83e668a04da34147e03 100644 (file)
@@ -518,7 +518,7 @@ extern stmt_ann_t create_stmt_ann (tree);
 extern tree_ann_t create_tree_ann (tree);
 extern void reserve_phi_args_for_new_edge (basic_block);
 extern tree create_phi_node (tree, basic_block);
-extern void add_phi_arg (tree *, tree, edge);
+extern void add_phi_arg (tree, tree, edge);
 extern void remove_phi_args (edge);
 extern void remove_phi_node (tree, tree, basic_block);
 extern void remove_all_phi_nodes_for (bitmap);
index 197118518329e50bbb4cdaac85522f6e9ba87745..f79799ee372efb757a70e7b81783cf70780cb60c 100644 (file)
@@ -797,7 +797,7 @@ rewrite_add_phi_arguments (struct dom_walk_data *walk_data ATTRIBUTE_UNUSED,
            break;
 
          currdef = get_reaching_def (SSA_NAME_VAR (PHI_RESULT (phi)));
-         add_phi_arg (&phi, currdef, e);
+         add_phi_arg (phi, currdef, e);
        }
     }
 }
@@ -1071,7 +1071,7 @@ insert_phi_nodes_for (tree var, bitmap *dfs, VEC(basic_block) *work_stack)
        {
          edge_iterator ei;
          FOR_EACH_EDGE (e, ei, bb->preds)
-           add_phi_arg (&phi, var, e);
+           add_phi_arg (phi, var, e);
        }
     }
 
index f566c808957d8d797c569267d287db770cb06329..dc37066969b2683f9217b48a9d45b14817bd2aec 100644 (file)
@@ -334,30 +334,30 @@ create_phi_node (tree var, basic_block bb)
    PHI points to the reallocated phi node when we return.  */
 
 void
-add_phi_arg (tree *phi, tree def, edge e)
+add_phi_arg (tree phi, tree def, edge e)
 {
   basic_block bb = e->dest;
 
-  gcc_assert (bb == bb_for_stmt (*phi));
+  gcc_assert (bb == bb_for_stmt (phi));
 
   /* We resize PHI nodes upon edge creation.  We should always have
      enough room at this point.  */
-  gcc_assert (PHI_NUM_ARGS (*phi) <= PHI_ARG_CAPACITY (*phi));
+  gcc_assert (PHI_NUM_ARGS (phi) <= PHI_ARG_CAPACITY (phi));
 
   /* We resize PHI nodes upon edge creation.  We should always have
      enough room at this point.  */
-  gcc_assert (e->dest_idx < (unsigned int) PHI_NUM_ARGS (*phi));
+  gcc_assert (e->dest_idx < (unsigned int) PHI_NUM_ARGS (phi));
 
   /* Copy propagation needs to know what object occur in abnormal
      PHI nodes.  This is a convenient place to record such information.  */
   if (e->flags & EDGE_ABNORMAL)
     {
       SSA_NAME_OCCURS_IN_ABNORMAL_PHI (def) = 1;
-      SSA_NAME_OCCURS_IN_ABNORMAL_PHI (PHI_RESULT (*phi)) = 1;
+      SSA_NAME_OCCURS_IN_ABNORMAL_PHI (PHI_RESULT (phi)) = 1;
     }
 
-  SET_PHI_ARG_DEF (*phi, e->dest_idx, def);
-  PHI_ARG_NONZERO (*phi, e->dest_idx) = false;
+  SET_PHI_ARG_DEF (phi, e->dest_idx, def);
+  PHI_ARG_NONZERO (phi, e->dest_idx) = false;
 }
 
 /* Remove the Ith argument from PHI's argument list.  This routine assumes
index 58c751e71bc5486871859dcfd9f88fa5b53e5c38..9bc66599dfec676cad9e78430db9d42d8d8a4607 100644 (file)
@@ -4591,7 +4591,7 @@ protect_loop_closed_ssa_form_use (edge exit, use_operand_p op_p)
 
       phi = create_phi_node (new_name, exit->dest);
       SSA_NAME_DEF_STMT (new_name) = phi;
-      add_phi_arg (&phi, use, exit);
+      add_phi_arg (phi, use, exit);
     }
 
   SET_USE (op_p, PHI_RESULT (phi));
index 3a8784985f7c847264d1b82aa0b1d11cbae9fc1e..01c75c87cfa9dd88a042853fd8095981ba2e5de5 100644 (file)
@@ -110,8 +110,8 @@ create_iv (tree base, tree step, tree var, struct loop *loop,
 
   stmt = create_phi_node (vb, loop->header);
   SSA_NAME_DEF_STMT (vb) = stmt;
-  add_phi_arg (&stmt, initial, loop_preheader_edge (loop));
-  add_phi_arg (&stmt, va, loop_latch_edge (loop));
+  add_phi_arg (stmt, initial, loop_preheader_edge (loop));
+  add_phi_arg (stmt, va, loop_latch_edge (loop));
 }
 
 /* Add exit phis for the USE on EXIT.  */
@@ -140,7 +140,7 @@ add_exit_phis_edge (basic_block exit, tree use)
   phi = create_phi_node (use, exit);
 
   FOR_EACH_EDGE (e, ei, exit->preds)
-    add_phi_arg (&phi, use, e);
+    add_phi_arg (phi, use, e);
 
   SSA_NAME_DEF_STMT (use) = def_stmt;
 }
@@ -420,7 +420,7 @@ split_loop_exit_edge (edge exit)
       new_name = duplicate_ssa_name (name, NULL);
       new_phi = create_phi_node (new_name, bb);
       SSA_NAME_DEF_STMT (new_name) = new_phi;
-      add_phi_arg (&new_phi, name, exit);
+      add_phi_arg (new_phi, name, exit);
       SET_USE (op_p, new_name);
     }
 }
@@ -672,7 +672,7 @@ lv_adjust_loop_header_phi (basic_block first, basic_block second,
       if (e2)
        {
          tree def = PHI_ARG_DEF (phi2, e2->dest_idx);
-         add_phi_arg (&phi1, def, e);
+         add_phi_arg (phi1, def, e);
        }
     }
 }
index cbf43c42a70c5f88b21a22c3defdfb25cd008bac..7cffc5656991b6d56dbb5fc4d57c1740ab3abe6c 100644 (file)
@@ -1555,7 +1555,7 @@ insert_aux (basic_block block)
                                                         PHI_RESULT (temp));
                          FOR_EACH_EDGE (pred, ei, block->preds)
                            {
-                             add_phi_arg (&temp, avail[pred->src->index],
+                             add_phi_arg (temp, avail[pred->src->index],
                                           pred);
                            }
                          if (dump_file && (dump_flags & TDF_DETAILS))
index f10dc3ddff19b7d96ba32d23566eb9065cd685d8..d5272d533740a0de4e47653230be07d30be198f4 100644 (file)
@@ -299,7 +299,7 @@ create_edge_and_update_destination_phis (struct redirection_data *rd)
   for (phi = phi_nodes (e->dest); phi; phi = PHI_CHAIN (phi))
     {
       int indx = phi_arg_from_edge (phi, rd->outgoing_edge);
-      add_phi_arg (&phi, PHI_ARG_DEF_TREE (phi, indx), e);
+      add_phi_arg (phi, PHI_ARG_DEF_TREE (phi, indx), e);
     }
 }
 
index e2b23f01844c54e0084077dec049488daf901685..8e2e0982cded4b3e69cde596f922858341a5daa2 100644 (file)
@@ -96,7 +96,7 @@ flush_pending_stmts (edge e)
        phi = PHI_CHAIN (phi), arg = TREE_CHAIN (arg))
     {
       tree def = TREE_VALUE (arg);
-      add_phi_arg (&phi, def, e);
+      add_phi_arg (phi, def, e);
     }
 
   PENDING_STMT (e) = NULL;
index 00fdea301adf866c01216c7822a4f20ea994b810..5c5e09cce0573412819fdf5f75d860d59e271ce7 100644 (file)
@@ -589,7 +589,7 @@ adjust_accumulator_values (block_stmt_iterator bsi, tree m, tree a, edge back)
        if (PHI_RESULT (phi) == a_acc)
          break;
 
-      add_phi_arg (&phi, a_acc_arg, back);
+      add_phi_arg (phi, a_acc_arg, back);
     }
 
   if (m_acc)
@@ -598,7 +598,7 @@ adjust_accumulator_values (block_stmt_iterator bsi, tree m, tree a, edge back)
        if (PHI_RESULT (phi) == m_acc)
          break;
 
-      add_phi_arg (&phi, m_acc_arg, back);
+      add_phi_arg (phi, m_acc_arg, back);
     }
 }
 
@@ -736,7 +736,7 @@ eliminate_tail_call (struct tailcall *t)
       if (!phi)
        continue;
 
-      add_phi_arg (&phi, TREE_VALUE (args), e);
+      add_phi_arg (phi, TREE_VALUE (args), e);
     }
 
   /* Add phi nodes for the call clobbered variables.  */
@@ -766,7 +766,7 @@ eliminate_tail_call (struct tailcall *t)
          var_ann (param)->default_def = new_name;
          phi = create_phi_node (name, first);
          SSA_NAME_DEF_STMT (name) = phi;
-         add_phi_arg (&phi, new_name, EDGE_SUCC (ENTRY_BLOCK_PTR, 0));
+         add_phi_arg (phi, new_name, EDGE_SUCC (ENTRY_BLOCK_PTR, 0));
 
          /* For all calls the same set of variables should be clobbered.  This
             means that there always should be the appropriate phi node except
@@ -774,7 +774,7 @@ eliminate_tail_call (struct tailcall *t)
          gcc_assert (EDGE_COUNT (first->preds) <= 2);
        }
 
-      add_phi_arg (&phi, V_MAY_DEF_OP (v_may_defs, i), e);
+      add_phi_arg (phi, V_MAY_DEF_OP (v_may_defs, i), e);
     }
 
   /* Update the values of accumulators.  */
@@ -884,7 +884,7 @@ tree_optimize_tail_calls_1 (bool opt_tailcalls)
              var_ann (param)->default_def = new_name;
              phi = create_phi_node (name, first);
              SSA_NAME_DEF_STMT (name) = phi;
-             add_phi_arg (&phi, new_name, EDGE_PRED (first, 0));
+             add_phi_arg (phi, new_name, EDGE_PRED (first, 0));
            }
          phis_constructed = true;
        }
@@ -897,7 +897,7 @@ tree_optimize_tail_calls_1 (bool opt_tailcalls)
          add_referenced_tmp_var (tmp);
 
          phi = create_phi_node (tmp, first);
-         add_phi_arg (&phi,
+         add_phi_arg (phi,
                       /* RET_TYPE can be a float when -ffast-maths is
                          enabled.  */
                       fold_convert (ret_type, integer_zero_node),
@@ -913,7 +913,7 @@ tree_optimize_tail_calls_1 (bool opt_tailcalls)
          add_referenced_tmp_var (tmp);
 
          phi = create_phi_node (tmp, first);
-         add_phi_arg (&phi,
+         add_phi_arg (phi,
                       /* RET_TYPE can be a float when -ffast-maths is
                          enabled.  */
                       fold_convert (ret_type, integer_one_node),
index 8853e88da9c73f9b980ede80fe1490d01e1c6dba..57739931bebeb98d2cda5e6eb1445d0066a4e7ae 100644 (file)
@@ -504,7 +504,7 @@ slpeel_update_phis_for_duplicate_loop (struct loop *orig_loop,
     {
       /* step 1.  */
       def = PHI_ARG_DEF_FROM_EDGE (phi_orig, entry_arg_e);
-      add_phi_arg (&phi_new, def, new_loop_entry_e);
+      add_phi_arg (phi_new, def, new_loop_entry_e);
 
       /* step 2.  */
       def = PHI_ARG_DEF_FROM_EDGE (phi_orig, orig_loop_latch);
@@ -518,7 +518,7 @@ slpeel_update_phis_for_duplicate_loop (struct loop *orig_loop,
 
       /* An ordinary ssa name defined in the loop.  */
       new_ssa_name = *new_name_ptr;
-      add_phi_arg (&phi_new, new_ssa_name, loop_latch_edge (new_loop));
+      add_phi_arg (phi_new, new_ssa_name, loop_latch_edge (new_loop));
 
       /* step 3 (case 1).  */
       if (!after)
@@ -635,8 +635,8 @@ slpeel_update_phi_nodes_for_guard (edge guard_edge,
               loop_arg = orig_def;
             }
         }
-      add_phi_arg (&new_phi, loop_arg, loop->exit_edges[0]);
-      add_phi_arg (&new_phi, guard_arg, guard_edge);
+      add_phi_arg (new_phi, loop_arg, loop->exit_edges[0]);
+      add_phi_arg (new_phi, guard_arg, guard_edge);
 
       /* 3. Update phi in successor block.  */
       gcc_assert (PHI_ARG_DEF_FROM_EDGE (update_phi, e) == loop_arg
@@ -763,7 +763,7 @@ slpeel_tree_duplicate_loop_to_edge_cfg (struct loop *loop, struct loops *loops,
          else
            new_loop_exit_edge = EDGE_SUCC (new_loop->header, 0);
   
-         add_phi_arg (&phi, phi_arg, new_loop_exit_edge);      
+         add_phi_arg (phi, phi_arg, new_loop_exit_edge);       
        }
     }    
    
@@ -796,7 +796,7 @@ slpeel_tree_duplicate_loop_to_edge_cfg (struct loop *loop, struct loops *loops,
        {
          phi_arg = PHI_ARG_DEF_FROM_EDGE (phi, entry_e);
          if (phi_arg)
-           add_phi_arg (&phi, phi_arg, new_exit_e);    
+           add_phi_arg (phi, phi_arg, new_exit_e);     
        }    
 
       redirect_edge_and_branch_force (entry_e, new_loop->header);
@@ -2646,8 +2646,8 @@ vectorizable_load (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
       msq = make_ssa_name (vec_dest, NULL_TREE);
       phi_stmt = create_phi_node (msq, loop->header); /* CHECKME */
       SSA_NAME_DEF_STMT (msq) = phi_stmt;
-      add_phi_arg (&phi_stmt, msq_init, loop_preheader_edge (loop));
-      add_phi_arg (&phi_stmt, lsq, loop_latch_edge (loop));
+      add_phi_arg (phi_stmt, msq_init, loop_preheader_edge (loop));
+      add_phi_arg (phi_stmt, lsq, loop_latch_edge (loop));
 
 
       /* <5> Create <vec_dest = realign_load (msq, lsq, magic)> in loop  */