]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/tree-ssa-uninit.c
switch from gimple to gimple*
[thirdparty/gcc.git] / gcc / tree-ssa-uninit.c
index fa59642d5a6f9d2dc5fe085252106b4410e43474..3f7dbcf9228b8b7229caee227174cfb990bcf046 100644 (file)
@@ -126,7 +126,7 @@ static void
 warn_uninit (enum opt_code wc, tree t, tree expr, tree var,
             const char *gmsgid, void *data, location_t phiarg_loc)
 {
-  gimple context = (gimple) data;
+  gimple *context = (gimple *) data;
   location_t location, cfun_loc;
   expanded_location xloc, floc;
 
@@ -188,7 +188,7 @@ warn_uninitialized_vars (bool warn_possibly_uninitialized)
                                             single_succ (ENTRY_BLOCK_PTR_FOR_FN (cfun)), bb);
       for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
        {
-         gimple stmt = gsi_stmt (gsi);
+         gimple *stmt = gsi_stmt (gsi);
          use_operand_p use_p;
          ssa_op_iter op_iter;
          tree use;
@@ -261,9 +261,9 @@ warn_uninitialized_vars (bool warn_possibly_uninitialized)
    redundant. Can be enhanced to be more general.  */
 
 static bool
-can_skip_redundant_opnd (tree opnd, gimple phi)
+can_skip_redundant_opnd (tree opnd, gimple *phi)
 {
-  gimple op_def;
+  gimple *op_def;
   tree phi_def;
   int i, n;
 
@@ -534,7 +534,7 @@ convert_control_dep_chain_into_preds (vec<edge> *dep_chains,
       pred_chain t_chain = vNULL;
       for (j = 0; j < one_cd_chain.length (); j++)
         {
-          gimple cond_stmt;
+         gimple *cond_stmt;
           gimple_stmt_iterator gsi;
           basic_block guard_bb;
           pred_info one_pred;
@@ -689,7 +689,7 @@ find_predicates (pred_chain_union *preds,
 static void
 collect_phi_def_edges (gphi *phi, basic_block cd_root,
                        vec<edge> *edges,
-                       hash_set<gimple> *visited_phis)
+                      hash_set<gimple *> *visited_phis)
 {
   size_t i, n;
   edge opnd_edge;
@@ -715,7 +715,7 @@ collect_phi_def_edges (gphi *phi, basic_block cd_root,
         }
       else
         {
-          gimple def = SSA_NAME_DEF_STMT (opnd);
+         gimple *def = SSA_NAME_DEF_STMT (opnd);
 
           if (gimple_code (def) == GIMPLE_PHI
               && dominated_by_p (CDI_DOMINATORS,
@@ -756,7 +756,7 @@ find_def_preds (pred_chain_union *preds, gphi *phi)
   if (!cd_root)
     return false;
 
-  hash_set<gimple> visited_phis;
+  hash_set<gimple *> visited_phis;
   collect_phi_def_edges (phi, cd_root, &def_edges, &visited_phis);
 
   n = def_edges.length ();
@@ -795,7 +795,7 @@ find_def_preds (pred_chain_union *preds, gphi *phi)
 /* Dumps the predicates (PREDS) for USESTMT.  */
 
 static void
-dump_predicates (gimple usestmt, pred_chain_union preds,
+dump_predicates (gimple *usestmt, pred_chain_union preds,
                  const char* msg)
 {
   size_t i, j;
@@ -976,7 +976,7 @@ find_matching_predicate_in_rest_chains (pred_info pred,
 
 /* Forward declaration.  */
 static bool
-is_use_properly_guarded (gimple use_stmt,
+is_use_properly_guarded (gimple *use_stmt,
                          basic_block use_bb,
                          gphi *phi,
                          unsigned uninit_opnds,
@@ -1085,7 +1085,7 @@ prune_uninit_phi_opnds_in_unrealizable_paths (gphi *phi,
       if (is_value_included_in (flag_arg, boundary_cst, cmp_code))
         {
           tree opnd;
-          gimple opnd_def;
+         gimple *opnd_def;
 
           /* Now that we know that this undefined edge is not
              pruned. If the operand is defined by another phi,
@@ -1201,7 +1201,7 @@ use_pred_not_overlap_with_undef_path_pred (pred_chain_union preds,
                                           hash_set<gphi *> *visited_phis)
 {
   unsigned int i, n;
-  gimple flag_def = 0;
+  gimple *flag_def = 0;
   tree  boundary_cst = 0;
   enum tree_code cmp_code;
   bool swap_cond = false;
@@ -1524,7 +1524,7 @@ simplify_pred (pred_chain *one_chain)
       if (!is_neq_zero_form_p (*a_pred))
         continue;
 
-      gimple def_stmt = SSA_NAME_DEF_STMT (a_pred->pred_lhs);
+      gimple *def_stmt = SSA_NAME_DEF_STMT (a_pred->pred_lhs);
       if (gimple_code (def_stmt) != GIMPLE_ASSIGN)
         continue;
       if (gimple_assign_rhs_code (def_stmt) == BIT_IOR_EXPR)
@@ -1713,7 +1713,7 @@ simplify_preds_4 (pred_chain_union *preds)
   size_t i, j, n;
   bool simplified = false;
   pred_chain_union s_preds = vNULL;
-  gimple def_stmt;
+  gimple *def_stmt;
 
   n = preds->length ();
   for (i = 0; i < n; i++)
@@ -1787,7 +1787,7 @@ simplify_preds_4 (pred_chain_union *preds)
 /* This function simplifies predicates in PREDS.  */
 
 static void
-simplify_preds (pred_chain_union *preds, gimple use_or_def, bool is_use)
+simplify_preds (pred_chain_union *preds, gimple *use_or_def, bool is_use)
 {
   size_t i, n;
   bool changed = false;
@@ -1887,7 +1887,7 @@ push_to_worklist (tree op, vec<pred_info, va_heap, vl_ptr> *work_list,
    CMP_ASSIGN with comparison rhs.  */
 
 static pred_info
-get_pred_info_from_cmp (gimple cmp_assign)
+get_pred_info_from_cmp (gimple *cmp_assign)
 {
   pred_info n_pred;
   n_pred.pred_lhs = gimple_assign_rhs1 (cmp_assign);
@@ -1902,11 +1902,11 @@ get_pred_info_from_cmp (gimple cmp_assign)
    will be updated to that value.  */
 
 static bool
-is_degenerated_phi (gimple phi, pred_info *pred_p)
+is_degenerated_phi (gimple *phi, pred_info *pred_p)
 {
   int i, n;
   tree op0;
-  gimple def0;
+  gimple *def0;
   pred_info pred0;
 
   n = gimple_phi_num_args (phi);
@@ -1925,7 +1925,7 @@ is_degenerated_phi (gimple phi, pred_info *pred_p)
 
   for (i = 1; i < n; ++i)
     {
-      gimple def;
+      gimple *def;
       pred_info pred;
       tree op = gimple_phi_arg_def (phi, i);
 
@@ -1969,7 +1969,7 @@ normalize_one_pred_1 (pred_chain_union *norm_preds,
       return;
     }
 
-  gimple def_stmt = SSA_NAME_DEF_STMT (pred.pred_lhs);
+  gimple *def_stmt = SSA_NAME_DEF_STMT (pred.pred_lhs);
  
   if (gimple_code (def_stmt) == GIMPLE_PHI
       && is_degenerated_phi (def_stmt, &pred))
@@ -2064,7 +2064,7 @@ normalize_one_pred (pred_chain_union *norm_preds,
       return;
     }
 
-  gimple def_stmt = SSA_NAME_DEF_STMT (pred.pred_lhs);
+  gimple *def_stmt = SSA_NAME_DEF_STMT (pred.pred_lhs);
   if (gimple_code (def_stmt) == GIMPLE_ASSIGN)
     and_or_code = gimple_assign_rhs_code (def_stmt);
   if (and_or_code != BIT_IOR_EXPR
@@ -2125,7 +2125,7 @@ normalize_one_pred_chain (pred_chain_union *norm_preds,
 /* Normalize predicate chains PREDS and returns the normalized one.  */
 
 static pred_chain_union
-normalize_preds (pred_chain_union preds, gimple use_or_def, bool is_use)
+normalize_preds (pred_chain_union preds, gimple *use_or_def, bool is_use)
 {
   pred_chain_union norm_preds = vNULL;
   size_t n = preds.length ();
@@ -2181,7 +2181,7 @@ normalize_preds (pred_chain_union preds, gimple use_or_def, bool is_use)
    VISITED_PHIS is a pointer set of phis being visited.  */
 
 static bool
-is_use_properly_guarded (gimple use_stmt,
+is_use_properly_guarded (gimple *use_stmt,
                          basic_block use_bb,
                          gphi *phi,
                          unsigned uninit_opnds,
@@ -2252,17 +2252,17 @@ is_use_properly_guarded (gimple use_stmt,
    function. ADDED_TO_WORKLIST is the pointer set tracking
    if the new phi is already in the worklist.  */
 
-static gimple
+static gimple *
 find_uninit_use (gphi *phi, unsigned uninit_opnds,
                  vec<gphi *> *worklist,
                 hash_set<gphi *> *added_to_worklist)
 {
   tree phi_result;
   use_operand_p use_p;
-  gimple use_stmt;
+  gimple *use_stmt;
   imm_use_iterator iter;
   pred_chain_union def_preds = vNULL;
-  gimple ret = NULL;
+  gimple *ret = NULL;
 
   phi_result = gimple_phi_result (phi);
 
@@ -2329,7 +2329,7 @@ warn_uninitialized_phi (gphi *phi, vec<gphi *> *worklist,
                         hash_set<gphi *> *added_to_worklist)
 {
   unsigned uninit_opnds;
-  gimple uninit_use_stmt = 0;
+  gimple *uninit_use_stmt = 0;
   tree uninit_op;
   int phiarg_index;
   location_t loc;