+2012-08-14  Richard Guenther  <rguenther@suse.de>
+
+       * cfgexpand.c (expand_used_vars): Use virtual_operand_p.
+       * gimple-pretty-print.c (dump_phi_nodes): Likewise.
+       * gimple-streamer-out.c (output_bb): Likewise.
+       * graphite-sese-to-poly.c (scalar_close_phi_node_p): Likewise.
+       (rewrite_reductions_out_of_ssa): Likewise.
+       (rewrite_commutative_reductions_out_of_ss): Likewise.
+       * ipa-split.c (verify_non_ssa_vars): Likewise.
+       (consider_split): Likewise.
+       (visit_bb): Likewise.
+       (split_function): Likewise.
+       * lto-streamer-out.c (output_ssa_names): Likewise.
+       * sese.c (rename_uses): Likewise.
+       * tree-cfg.c (replace_uses_by): Likewise.
+       (gimple_merge_blocks): Likewise.
+       (gimple_cfg2dot): Likewise.
+       (verify_gimple_phi): Likewise.
+       (replace_ssa_name): Likewise.
+       (move_block_to_fn): Likewise.
+       * tree-eh.c (cleanup_empty_eh_merge_phis): Likewise.
+       * tree-if-conv.c (if_convertible_phi_p): Likewise.
+       (predicate_scalar_phi): Likewise.
+       * tree-inline.c (update_ssa_across_abnormal_edges): Likewise.
+       (copy_phis_for_bb): Likewise.
+       * tree-loop-distribution.c (generate_loops_for_partition): Likewise.
+       (destroy_loop): Likewise.
+       * tree-outof-ssa.c (eliminate_useless_phis): Likewise.
+       (insert_backedge_copies): Likewise.
+       * tree-parloops.c (transform_to_exit_first_loop): Likewise.
+       (gather_scalar_reductions): Likewise.
+       (try_create_reduction_list): Likewise.
+       * tree-scalar-evolution.c (analyze_scalar_evolution_for_all_loop_ph):
+       Likewise.
+       (scev_const_prop): Likewise.
+       * tree-ssa-ccp.c (debug_lattice_value): Likewise.
+       (get_default_value): Likewise.
+       (ccp_initialize): Likewise.
+       * tree-ssa-coalesce.c (create_outofssa_var_map): Likewise.
+       * tree-ssa-copy.c (may_propagate_copy): Likewise.
+       (init_copy_prop): Likewise.
+       * tree-ssa-dce.c (propagate_necessity): Likewise.
+       (remove_dead_phis): Likewise.
+       (forward_edge_to_pdom): Likewise.
+       (eliminate_unnecessary_stmts): Likewise.
+       * tree-ssa-live.c (partition_view_init): Likewise.
+       (remove_unused_locals): Likewise.
+       (register_ssa_partition_check): Likewise.
+       * tree-ssa-loop-im.c (movement_possibility): Likewise.
+       (move_computations_stmt): Likewise.
+       * tree-ssa-loop-ivopts.c (determine_biv_step): Likewise.
+       (record_invariant): Likewise.
+       (find_interesting_uses_outside): Likewise.
+       (determine_set_costs): Likewise.
+       * tree-ssa-loop-manip.c (add_exit_phis_var): Likewise.
+       (find_uses_to_rename_use): Likewise.
+       (check_loop_closed_ssa_use): Likewise.
+       (rewrite_phi_with_iv): Likewise.
+       (canonicalize_loop_ivs): Likewise.
+       * tree-ssa-math-opts.c (execute_cse_reciprocals): Likewise.
+       * tree-ssa-phiopt.c (hoist_adjacent_loads): Likewise.
+       * tree-ssa-pre.c (make_values_for_phi): Likewise.
+       (compute_avail): Likewise.
+       (eliminate): Likewise.
+       * tree-ssa-propagate.c (substitute_and_fold): Likewise.
+       * tree-ssa-reassoc.c (phi_rank): Likewise.
+       * tree-ssa-strlen.c (strlen_enter_block): Likewise.
+       * tree-ssa-structalias.c (compute_points_to_sets): Likewise.
+       (ipa_pta_execute): Likewise.
+       * tree-ssa-tail-merge.c (same_succ_hash): Likewise.
+       (release_last_vdef): Likewise.
+       (same_phi_alternatives_1): Likewise.
+       (bb_has_non_vop_phi): Likewise.
+       (vop_phi): Likewise.
+       * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
+       Likewise.
+       * tree-ssa-uninit.c (warn_uninitialized_phi): Likewise.
+       (execute_late_warn_uninitialized): Likewise.
+       * tree-ssa.c (verify_ssa_name): Likewise.
+       (verify_phi_args): Likewise.
+       (verify_ssa): Likewise.
+       * tree-stdarg.c (execute_optimize_stdarg): Likewise.
+       * tree-vect-loop-manip.c (slpeel_update_phi_nodes_for_guard1): Likewise.
+       (slpeel_tree_peel_loop_to_edge): Likewise.
+       (vect_can_advance_ivs_p): Likewise.
+       (vect_update_ivs_after_vectorizer): Likewise.
+       * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
+       * tree-vrp.c (remove_range_assertions): Likewise.
+       * value-prof.c (gimple_divmod_values_to_profile): Likewise.
+
 2012-08-14  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/54146
 
     {
       tree var = partition_to_var (SA.map, i);
 
-      gcc_assert (is_gimple_reg (var));
+      gcc_assert (!virtual_operand_p (var));
 
       /* Assign decls to each SSA name partition, share decls for partitions
          we could have coalesced (those with the same type).  */
 
   for (i = gsi_start_phis (bb); !gsi_end_p (i); gsi_next (&i))
     {
       gimple phi = gsi_stmt (i);
-      if (is_gimple_reg (gimple_phi_result (phi)) || (flags & TDF_VOPS))
+      if (!virtual_operand_p (gimple_phi_result (phi)) || (flags & TDF_VOPS))
         {
           INDENT (indent);
           pp_string (buffer, "# ");
 
          /* Only emit PHIs for gimple registers.  PHI nodes for .MEM
             will be filled in on reading when the SSA form is
             updated.  */
-         if (is_gimple_reg (gimple_phi_result (phi)))
+         if (!virtual_operand_p (gimple_phi_result (phi)))
            output_phi (ob, phi);
        }
 
 
 scalar_close_phi_node_p (gimple phi)
 {
   if (gimple_code (phi) != GIMPLE_PHI
-      || !is_gimple_reg (gimple_phi_result (phi)))
+      || virtual_operand_p (gimple_phi_result (phi)))
     return false;
 
   /* Note that loop close phi nodes should have a single argument
        {
          gimple phi = gsi_stmt (psi);
 
-         if (!is_gimple_reg (gimple_phi_result (phi)))
+         if (virtual_operand_p (gimple_phi_result (phi)))
            {
              gsi_next (&psi);
              continue;
 
   for (gsi = gsi_start_phis (exit->dest); !gsi_end_p (gsi); gsi_next (&gsi))
     if ((res = gimple_phi_result (gsi_stmt (gsi)))
-       && is_gimple_reg (res)
+       && !virtual_operand_p (res)
        && !scev_analyzable_p (res, SCOP_REGION (scop)))
       changed |= rewrite_commutative_reductions_out_of_ssa_close_phi
        (scop, gsi_stmt (gsi));
 
              gimple stmt = gsi_stmt (bsi);
              tree op = gimple_phi_arg_def (stmt, e->dest_idx);
 
-             if (!is_gimple_reg (gimple_phi_result (stmt)))
+             if (virtual_operand_p (gimple_phi_result (stmt)))
                continue;
              if (TREE_CODE (op) != SSA_NAME
                  && test_nonssa_use (stmt, op, non_ssa_vars))
       gimple stmt = gsi_stmt (bsi);
       tree val = NULL;
 
-      if (!is_gimple_reg (gimple_phi_result (stmt)))
+      if (virtual_operand_p (gimple_phi_result (stmt)))
        continue;
       for (i = 0; i < gimple_phi_num_args (stmt); i++)
        {
       gimple_stmt_iterator psi;
 
       for (psi = gsi_start_phis (return_bb); !gsi_end_p (psi); gsi_next (&psi))
-       if (is_gimple_reg (gimple_phi_result (gsi_stmt (psi)))
+       if (!virtual_operand_p (gimple_phi_result (gsi_stmt (psi)))
            && !(retval
                 && current->split_part_set_retval
                 && TREE_CODE (retval) == SSA_NAME
       gimple stmt = gsi_stmt (bsi);
       unsigned int i;
 
-      if (is_gimple_debug (stmt))
-       continue;
-      if (!is_gimple_reg (gimple_phi_result (stmt)))
+      if (virtual_operand_p (gimple_phi_result (stmt)))
        continue;
       bitmap_set_bit (set_ssa_names,
                      SSA_NAME_VERSION (gimple_phi_result (stmt)));
            gimple stmt = gsi_stmt (bsi);
            tree op = gimple_phi_arg_def (stmt, e->dest_idx);
 
-           if (is_gimple_debug (stmt))
-             continue;
-           if (!is_gimple_reg (gimple_phi_result (stmt)))
+           if (virtual_operand_p (gimple_phi_result (stmt)))
              continue;
            if (TREE_CODE (op) == SSA_NAME)
              bitmap_set_bit (used_ssa_names, SSA_NAME_VERSION (op));
       for (gsi = gsi_start_phis (return_bb); !gsi_end_p (gsi);)
        {
          gimple stmt = gsi_stmt (gsi);
-         if (is_gimple_reg (gimple_phi_result (stmt)))
+         if (!virtual_operand_p (gimple_phi_result (stmt)))
            {
              gsi_next (&gsi);
              continue;
                  /* See if there is PHI defining return value.  */
                  for (psi = gsi_start_phis (return_bb);
                       !gsi_end_p (psi); gsi_next (&psi))
-                   if (is_gimple_reg (gimple_phi_result (gsi_stmt (psi))))
+                   if (!virtual_operand_p (gimple_phi_result (gsi_stmt (psi))))
                      break;
 
                  /* When there is PHI, just update its value.  */
 
 
       if (ptr == NULL_TREE
          || SSA_NAME_IN_FREE_LIST (ptr)
-         || !is_gimple_reg (ptr))
+         || virtual_operand_p (ptr))
        continue;
 
       streamer_write_uhwi (ob, i);
 
       return false;
     }
 
-  FOR_EACH_SSA_USE_OPERAND (use_p, copy, op_iter, SSA_OP_ALL_USES)
+  FOR_EACH_SSA_USE_OPERAND (use_p, copy, op_iter, SSA_OP_USE)
     {
       tree old_name = USE_FROM_PTR (use_p);
       tree new_expr, scev;
       gimple_seq stmts;
 
       if (TREE_CODE (old_name) != SSA_NAME
-         || !is_gimple_reg (old_name)
          || SSA_NAME_IS_DEFAULT_DEF (old_name))
        continue;
 
          tree type_new_expr = TREE_TYPE (new_expr);
 
          if (type_old_name != type_new_expr
-             || (TREE_CODE (new_expr) != SSA_NAME
-                 && is_gimple_reg (old_name)))
+             || TREE_CODE (new_expr) != SSA_NAME)
            {
              tree var = create_tmp_var (type_old_name, "var");
 
 
                  /* This can only occur for virtual operands, since
                     for the real ones SSA_NAME_OCCURS_IN_ABNORMAL_PHI (name))
                     would prevent replacement.  */
-                 gcc_checking_assert (!is_gimple_reg (name));
+                 gcc_checking_assert (virtual_operand_p (name));
                  SSA_NAME_OCCURS_IN_ABNORMAL_PHI (val) = 1;
                }
            }
       gimple phi = gsi_stmt (psi);
       tree def = gimple_phi_result (phi), use = gimple_phi_arg_def (phi, 0);
       gimple copy;
-      bool may_replace_uses = !is_gimple_reg (def)
-                             || may_propagate_copy (def, use);
+      bool may_replace_uses = (virtual_operand_p (def)
+                              || may_propagate_copy (def, use));
 
       /* In case we maintain loop closed ssa form, do not propagate arguments
         of loop exit phi nodes.  */
       if (current_loops
          && loops_state_satisfies_p (LOOP_CLOSED_SSA)
-         && is_gimple_reg (def)
+         && !virtual_operand_p (def)
          && TREE_CODE (use) == SSA_NAME
          && a->loop_father != b->loop_father)
        may_replace_uses = false;
 
       if (!may_replace_uses)
        {
-         gcc_assert (is_gimple_reg (def));
+         gcc_assert (!virtual_operand_p (def));
 
          /* Note that just emitting the copies is fine -- there is no problem
             with ordering of phi nodes.  This is because A is the single
          /* If we deal with a PHI for virtual operands, we can simply
             propagate these without fussing with folding or updating
             the stmt.  */
-         if (!is_gimple_reg (def))
+         if (virtual_operand_p (def))
            {
              imm_use_iterator iter;
              use_operand_p use_p;
       return true;
     }
 
-  virtual_p = !is_gimple_reg (phi_result);
+  virtual_p = virtual_operand_p (phi_result);
   if (TREE_CODE (phi_result) != SSA_NAME
       || (virtual_p
          && SSA_NAME_VAR (phi_result) != gimple_vop (cfun)))
       /* Addressable variables do have SSA_NAMEs but they
         are not considered gimple values.  */
       else if ((TREE_CODE (t) == SSA_NAME
-               && virtual_p != !is_gimple_reg (t))
+               && virtual_p != virtual_operand_p (t))
               || (virtual_p
                   && (TREE_CODE (t) != SSA_NAME
                       || SSA_NAME_VAR (t) != gimple_vop (cfun)))
   void **loc;
   tree new_name;
 
-  gcc_assert (is_gimple_reg (name));
+  gcc_assert (!virtual_operand_p (name));
 
   loc = pointer_map_contains (vars_map, name);
 
       tree op = PHI_RESULT (phi);
       ssa_op_iter oi;
 
-      if (!is_gimple_reg (op))
+      if (virtual_operand_p (op))
        {
          /* Remove the phi nodes for virtual operands (alias analysis will be
             run for the new function, anyway).  */
 
        }
       /* If we didn't find the PHI, but it's a VOP, remember to rename
         it later, assuming all other tests succeed.  */
-      else if (!is_gimple_reg (nresult))
+      else if (virtual_operand_p (nresult))
        bitmap_set_bit (rename_virts, SSA_NAME_VERSION (nresult));
       /* If we didn't find the PHI, and it's a real variable, we know
         from the fact that OLD_BB is tree_empty_eh_handler_p that the
 
   /* When the flag_tree_loop_if_convert_stores is not set, check
      that there are no memory writes in the branches of the loop to be
      if-converted.  */
-  if (!is_gimple_reg (gimple_phi_result (phi)))
+  if (virtual_operand_p (gimple_phi_result (phi)))
     {
       imm_use_iterator imm_iter;
       use_operand_p use_p;
 
   res = gimple_phi_result (phi);
   /* Do not handle virtual phi nodes.  */
-  if (!is_gimple_reg (res))
+  if (virtual_operand_p (res))
     return;
 
   bb = gimple_bb (phi);
 
            gcc_assert ((e->flags & EDGE_EH)
                        || SSA_NAME_OCCURS_IN_ABNORMAL_PHI (PHI_RESULT (phi)));
 
-           if (!is_gimple_reg (PHI_RESULT (phi)))
+           if (virtual_operand_p (PHI_RESULT (phi)))
              {
                mark_virtual_operands_for_renaming (cfun);
                continue;
       phi = gsi_stmt (si);
       res = PHI_RESULT (phi);
       new_res = res;
-      if (is_gimple_reg (res))
+      if (!virtual_operand_p (res))
        {
          walk_tree (&new_res, copy_tree_body_r, id, NULL);
          new_phi = create_phi_node (new_res, new_bb);
 
        if (!bitmap_bit_p (partition->stmts, x++))
          {
            gimple phi = gsi_stmt (bsi);
-           if (!is_gimple_reg (gimple_phi_result (phi)))
+           if (virtual_operand_p (gimple_phi_result (phi)))
              mark_virtual_phi_result_for_renaming (phi);
            remove_phi_node (&bsi, true);
          }
       for (gsi = gsi_start_phis (bbs[i]); !gsi_end_p (gsi); gsi_next (&gsi))
        {
          gimple phi = gsi_stmt (gsi);
-         if (!is_gimple_reg (gimple_phi_result (phi)))
+         if (virtual_operand_p (gimple_phi_result (phi)))
            mark_virtual_phi_result_for_renaming (phi);
        }
       for (gsi = gsi_start_bb (bbs[i]); !gsi_end_p (gsi); gsi_next (&gsi))
 
         {
          gimple phi = gsi_stmt (gsi);
          result = gimple_phi_result (phi);
-         if (!is_gimple_reg (result))
+         if (virtual_operand_p (result))
            {
 #ifdef ENABLE_CHECKING
              size_t i;
                {
                  tree arg = PHI_ARG_DEF (phi, i);
                  if (TREE_CODE (arg) == SSA_NAME
-                     && is_gimple_reg (arg))
+                     && !virtual_operand_p (arg))
                    {
                      fprintf (stderr, "Argument of PHI is not virtual (");
                      print_generic_expr (stderr, arg, TDF_SLIM);
          tree result = gimple_phi_result (phi);
          size_t i;
 
-         if (!is_gimple_reg (result))
+         if (virtual_operand_p (result))
            continue;
 
          for (i = 0; i < gimple_phi_num_args (phi); i++)
 
     {
       phi = gsi_stmt (gsi);
       res = PHI_RESULT (phi);
-      if (!is_gimple_reg (res))
+      if (virtual_operand_p (res))
        {
          gsi_next (&gsi);
          continue;
       tree res = PHI_RESULT (phi);
       bool double_reduc;
 
-      if (!is_gimple_reg (res))
+      if (virtual_operand_p (res))
        continue;
 
       if (!simple_iv (loop, loop, res, &iv, true)
       gimple reduc_phi;
       tree val = PHI_ARG_DEF_FROM_EDGE (phi, exit);
 
-      if (is_gimple_reg (val))
+      if (!virtual_operand_p (val))
        {
          if (dump_file && (dump_flags & TDF_DETAILS))
            {
       tree def = PHI_RESULT (phi);
       affine_iv iv;
 
-      if (is_gimple_reg (def) && !simple_iv (loop, loop, def, &iv, true))
+      if (!virtual_operand_p (def) && !simple_iv (loop, loop, def, &iv, true))
        {
          struct reduction_info *red;
 
 
       for (psi = gsi_start_phis (bb); !gsi_end_p (psi); gsi_next (&psi))
        {
          phi = gsi_stmt (psi);
-         if (is_gimple_reg (PHI_RESULT (phi)))
+         if (!virtual_operand_p (PHI_RESULT (phi)))
            {
              chrec = instantiate_parameters
                        (loop,
          phi = gsi_stmt (psi);
          name = PHI_RESULT (phi);
 
-         if (!is_gimple_reg (name))
+         if (virtual_operand_p (name))
            continue;
 
          type = TREE_TYPE (name);
          phi = gsi_stmt (psi);
          rslt = PHI_RESULT (phi);
          def = PHI_ARG_DEF_FROM_EDGE (phi, exit);
-         if (!is_gimple_reg (def))
+         if (virtual_operand_p (def))
            {
              gsi_next (&psi);
              continue;
 
 static prop_value_t
 get_default_value (tree var)
 {
-  tree sym = SSA_NAME_VAR (var);
   prop_value_t val = { UNINITIALIZED, NULL_TREE, { 0, 0 } };
   gimple stmt;
 
         before being initialized.  If VAR is a local variable, we
         can assume initially that it is UNDEFINED, otherwise we must
         consider it VARYING.  */
-      if (is_gimple_reg (sym)
-         && TREE_CODE (sym) == VAR_DECL)
+      if (!virtual_operand_p (var)
+         && TREE_CODE (SSA_NAME_VAR (var)) == VAR_DECL)
        val.lattice_val = UNDEFINED;
       else
        {
         {
           gimple phi = gsi_stmt (i);
 
-         if (!is_gimple_reg (gimple_phi_result (phi)))
+         if (virtual_operand_p (gimple_phi_result (phi)))
             prop_set_simulate_again (phi, false);
          else
             prop_set_simulate_again (phi, true);
 
   for (i = 1; i < num_ssa_names; i++)
     {
       var = ssa_name (i);
-      if (var != NULL_TREE && is_gimple_reg (var))
+      if (var != NULL_TREE && !virtual_operand_p (var))
         {
          /* Add coalesces between all the result decls.  */
          if (SSA_NAME_VAR (var)
 
     return false;
 
   /* Propagating virtual operands is always ok.  */
-  if (TREE_CODE (dest) == SSA_NAME && !is_gimple_reg (dest))
+  if (TREE_CODE (dest) == SSA_NAME && virtual_operand_p (dest))
     {
       /* But only between virtual operands.  */
-      gcc_assert (TREE_CODE (orig) == SSA_NAME && !is_gimple_reg (orig));
+      gcc_assert (TREE_CODE (orig) == SSA_NAME && virtual_operand_p (orig));
 
       return true;
     }
           tree def;
 
          def = gimple_phi_result (phi);
-         if (!is_gimple_reg (def))
+         if (virtual_operand_p (def))
             prop_set_simulate_again (phi, false);
          else
             prop_set_simulate_again (phi, true);
 
       if (gimple_code (stmt) == GIMPLE_PHI
          /* We do not process virtual PHI nodes nor do we track their
             necessity.  */
-         && is_gimple_reg (gimple_phi_result (stmt)))
+         && !virtual_operand_p (gimple_phi_result (stmt)))
        {
          /* PHI nodes are somewhat special in that each PHI alternative has
             data and control dependencies.  All the statements feeding the
 
       /* We do not track necessity of virtual PHI nodes.  Instead do
          very simple dead PHI removal here.  */
-      if (!is_gimple_reg (gimple_phi_result (phi)))
+      if (virtual_operand_p (gimple_phi_result (phi)))
        {
          /* Virtual PHI nodes with one or identical arguments
             can be removed.  */
 
          /* PHIs for virtuals have no control dependency relation on them.
             We are lost here and must force renaming of the symbol.  */
-         if (!is_gimple_reg (gimple_phi_result (phi)))
+         if (virtual_operand_p (gimple_phi_result (phi)))
            {
              mark_virtual_phi_result_for_renaming (phi);
              remove_phi_node (&gsi, true);
              || !(bb->flags & BB_REACHABLE))
            {
              for (gsi = gsi_start_phis (bb); !gsi_end_p (gsi); gsi_next (&gsi))
-               if (!is_gimple_reg (gimple_phi_result (gsi_stmt (gsi))))
+               if (virtual_operand_p (gimple_phi_result (gsi_stmt (gsi))))
                  {
                    bool found = false;
                    imm_use_iterator iter;
 
   for (x = 0; x < map->partition_size; x++)
     {
       tmp = partition_find (map->var_partition, x);
-      if (ssa_name (tmp) != NULL_TREE && is_gimple_reg (ssa_name (tmp))
+      if (ssa_name (tmp) != NULL_TREE && !virtual_operand_p (ssa_name (tmp))
          && (!has_zero_uses (ssa_name (tmp))
              || !SSA_NAME_IS_DEFAULT_DEF (ssa_name (tmp))))
        bitmap_set_bit (used, tmp);
          tree def;
          gimple phi = gsi_stmt (gsi);
 
-         if (!is_gimple_reg (gimple_phi_result (phi)))
+         if (virtual_operand_p (gimple_phi_result (phi)))
            continue;
 
          def = gimple_phi_result (phi);
 register_ssa_partition_check (tree ssa_var)
 {
   gcc_assert (TREE_CODE (ssa_var) == SSA_NAME);
-  if (!is_gimple_reg (ssa_var))
+  if (virtual_operand_p (ssa_var))
     {
       fprintf (stderr, "Illegally registering a virtual SSA name :");
       print_generic_expr (stderr, ssa_var, TDF_SLIM);
 
 
   if (gimple_code (stmt) == GIMPLE_PHI
       && gimple_phi_num_args (stmt) <= 2
-      && is_gimple_reg (gimple_phi_result (stmt))
+      && !virtual_operand_p (gimple_phi_result (stmt))
       && !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (gimple_phi_result (stmt)))
     return MOVE_POSSIBLE;
 
               !gsi_end_p (gsi2); gsi_next (&gsi2))
            {
              gimple phi = gsi_stmt (gsi2);
-             if (!is_gimple_reg (gimple_phi_result (phi)))
+             if (virtual_operand_p (gimple_phi_result (phi)))
                {
                  gimple_set_vuse (stmt, PHI_ARG_DEF_FROM_EDGE (phi, e));
                  break;
 
   tree name = PHI_RESULT (phi);
   affine_iv iv;
 
-  if (!is_gimple_reg (name))
+  if (virtual_operand_p (name))
     return NULL_TREE;
 
   if (!simple_iv (loop, loop, name, &iv, true))
   struct version_info *info;
 
   if (TREE_CODE (op) != SSA_NAME
-      || !is_gimple_reg (op))
+      || virtual_operand_p (op))
     return;
 
   bb = gimple_bb (SSA_NAME_DEF_STMT (op));
     {
       phi = gsi_stmt (psi);
       def = PHI_ARG_DEF_FROM_EDGE (phi, exit);
-      if (is_gimple_reg (def))
+      if (!virtual_operand_p (def))
         find_interesting_uses_op (data, def);
     }
 }
       phi = gsi_stmt (psi);
       op = PHI_RESULT (phi);
 
-      if (!is_gimple_reg (op))
+      if (virtual_operand_p (op))
        continue;
 
       if (get_iv (data, op))
 
   basic_block def_bb = gimple_bb (SSA_NAME_DEF_STMT (var));
   bitmap_iterator bi;
 
-  gcc_checking_assert (is_gimple_reg (var));
+  gcc_checking_assert (! virtual_operand_p (var));
   bitmap_clear_bit (livein, def_bb->index);
 
   def = BITMAP_ALLOC (&loop_renamer_obstack);
     return;
 
   /* We don't need to keep virtual operands in loop-closed form.  */
-  if (!is_gimple_reg (use))
+  if (virtual_operand_p (use))
     return;
 
   ver = SSA_NAME_VERSION (use);
   gimple def;
   basic_block def_bb;
 
-  if (TREE_CODE (use) != SSA_NAME || !is_gimple_reg (use))
+  if (TREE_CODE (use) != SSA_NAME || virtual_operand_p (use))
     return;
 
   def = SSA_NAME_DEF_STMT (use);
   gimple stmt, phi = gsi_stmt (*psi);
   tree atype, mtype, val, res = PHI_RESULT (phi);
 
-  if (!is_gimple_reg (res) || res == main_iv)
+  if (virtual_operand_p (res) || res == main_iv)
     {
       gsi_next (psi);
       return;
       bool uns;
 
       type = TREE_TYPE (res);
-      if (!is_gimple_reg (res)
+      if (virtual_operand_p (res)
          || (!INTEGRAL_TYPE_P (type)
              && !POINTER_TYPE_P (type))
          || TYPE_PRECISION (type) < precision)
 
        {
          phi = gsi_stmt (gsi);
          def = PHI_RESULT (phi);
-         if (FLOAT_TYPE_P (TREE_TYPE (def))
-             && is_gimple_reg (def))
+         if (! virtual_operand_p (def)
+             && FLOAT_TYPE_P (TREE_TYPE (def)))
            execute_cse_reciprocals_1 (NULL, def);
        }
 
 
       gimple_stmt_iterator gsi2;
       basic_block bb_for_def1, bb_for_def2;
 
-      if (gimple_phi_num_args (phi_stmt) != 2)
+      if (gimple_phi_num_args (phi_stmt) != 2
+         || virtual_operand_p (gimple_phi_result (phi_stmt)))
        continue;
 
       arg1 = gimple_phi_arg_def (phi_stmt, 0);
       if (TREE_CODE (arg1) != SSA_NAME
          || TREE_CODE (arg2) != SSA_NAME
          || SSA_NAME_IS_DEFAULT_DEF (arg1)
-         || SSA_NAME_IS_DEFAULT_DEF (arg2)
-         || !is_gimple_reg (arg1)
-         || !is_gimple_reg (arg2))
+         || SSA_NAME_IS_DEFAULT_DEF (arg2))
        continue;
 
       def1 = SSA_NAME_DEF_STMT (arg1);
 
 
   /* We have no need for virtual phis, as they don't represent
      actual computations.  */
-  if (is_gimple_reg (result))
+  if (!virtual_operand_p (result))
     {
       pre_expr e = get_or_alloc_expr_for_name (result);
       add_to_value (get_expr_value_id (e), e);
       if (!name
          || !SSA_NAME_IS_DEFAULT_DEF (name)
          || has_zero_uses (name)
-         || !is_gimple_reg (name))
+         || virtual_operand_p (name))
        continue;
 
       e = get_or_alloc_expr_for_name (name);
             replacing the PHI with a single copy if possible.
             Do not touch inserted, single-argument or virtual PHIs.  */
          if (gimple_phi_num_args (phi) == 1
-             || !is_gimple_reg (res))
+             || virtual_operand_p (res))
            {
              gsi_next (&gsi);
              continue;
 
        gimple_stmt_iterator gsi;
 
        if (!name
-           || !is_gimple_reg (name))
+           || virtual_operand_p (name))
          continue;
 
        def_stmt = SSA_NAME_DEF_STMT (name);
 
 
   /* Ignore virtual SSA_NAMEs.  */
   res = gimple_phi_result (stmt);
-  if (!is_gimple_reg (res))
+  if (virtual_operand_p (res))
     return bb_rank[bb->index];
 
   /* The phi definition must have a single use, and that use must be
 
          for (gsi = gsi_start_phis (bb); !gsi_end_p (gsi); gsi_next (&gsi))
            {
              gimple phi = gsi_stmt (gsi);
-             if (!is_gimple_reg (gimple_phi_result (phi)))
+             if (virtual_operand_p (gimple_phi_result (phi)))
                {
                  bitmap visited = BITMAP_ALLOC (NULL);
                  int count_vdef = 100;
     {
       gimple phi = gsi_stmt (gsi);
       tree result = gimple_phi_result (phi);
-      if (is_gimple_reg (result) && POINTER_TYPE_P (TREE_TYPE (result)))
+      if (!virtual_operand_p (result) && POINTER_TYPE_P (TREE_TYPE (result)))
        {
          int idx = get_stridx (gimple_phi_arg_def (phi, 0));
          if (idx != 0)
 
        {
          gimple phi = gsi_stmt (gsi);
 
-         if (is_gimple_reg (gimple_phi_result (phi)))
+         if (! virtual_operand_p (gimple_phi_result (phi)))
            find_func_aliases (phi);
        }
 
            {
              gimple phi = gsi_stmt (gsi);
 
-             if (is_gimple_reg (gimple_phi_result (phi)))
+             if (! virtual_operand_p (gimple_phi_result (phi)))
                find_func_aliases (phi);
            }
 
 
          tree lhs = gimple_phi_result (phi);
          tree val = gimple_phi_arg_def (phi, n);
 
-         if (!is_gimple_reg (lhs))
+         if (virtual_operand_p (lhs))
            continue;
          update_dep_bb (bb, val);
        }
       gimple phi = gsi_stmt (i);
       tree res = gimple_phi_result (phi);
 
-      if (is_gimple_reg (res))
+      if (!virtual_operand_p (res))
        continue;
 
       mark_virtual_phi_result_for_renaming (phi);
       tree val1 = gimple_phi_arg_def (phi, n1);
       tree val2 = gimple_phi_arg_def (phi, n2);
 
-      if (!is_gimple_reg (lhs))
+      if (virtual_operand_p (lhs))
        continue;
 
       if (operand_equal_for_phi_arg_p (val1, val2))
     return true;
 
   phi = gimple_seq_first_stmt (phis);
-  return is_gimple_reg (gimple_phi_result (phi));
+  return !virtual_operand_p (gimple_phi_result (phi));
 }
 
 /* Returns true if redirecting the incoming edges of FROM to TO maintains the
   for (gsi = gsi_start_phis (bb); !gsi_end_p (gsi); gsi_next (&gsi))
     {
       stmt = gsi_stmt (gsi);
-      if (is_gimple_reg (gimple_phi_result (stmt)))
+      if (! virtual_operand_p (gimple_phi_result (stmt)))
        continue;
       return stmt;
     }
 
 
       /* We consider any non-virtual PHI as a statement since it
         count result in a constant assignment or copy operation.  */
-      if (is_gimple_reg (dst))
+      if (!virtual_operand_p (dst))
        stmt_count++;
 
       record_temporary_equivalence (dst, src, stack);
 
   gimple uninit_use_stmt = 0;
   tree uninit_op;
 
-  /* Don't look at memory tags.  */
-  if (!is_gimple_reg (gimple_phi_result (phi)))
+  /* Don't look at virtual operands.  */
+  if (virtual_operand_p (gimple_phi_result (phi)))
     return;
 
   uninit_opnds = compute_uninit_opnds_pos (phi);
 
         n = gimple_phi_num_args (phi);
 
-        /* Don't look at memory tags.  */
-        if (!is_gimple_reg (gimple_phi_result (phi)))
+        /* Don't look at virtual operands.  */
+        if (virtual_operand_p (gimple_phi_result (phi)))
           continue;
 
         for (i = 0; i < n; ++i)
 
       return true;
     }
 
-  if (is_virtual && is_gimple_reg (ssa_name))
+  if (is_virtual && !virtual_operand_p (ssa_name))
     {
       error ("found a virtual definition for a GIMPLE register");
       return true;
       return true;
     }
 
-  if (!is_virtual && !is_gimple_reg (ssa_name))
+  if (!is_virtual && virtual_operand_p (ssa_name))
     {
       error ("found a real definition for a non-register");
       return true;
 
       if (TREE_CODE (op) == SSA_NAME)
        {
-         err = verify_ssa_name (op, !is_gimple_reg (gimple_phi_result (phi)));
+         err = verify_ssa_name (op, virtual_operand_p (gimple_phi_result (phi)));
          err |= verify_use (e->src, definition_block[SSA_NAME_VERSION (op)],
                             op_p, phi, e->flags & EDGE_ABNORMAL, NULL);
        }
          gimple stmt;
          TREE_VISITED (name) = 0;
 
-         verify_ssa_name (name, !is_gimple_reg (name));
+         verify_ssa_name (name, virtual_operand_p (name));
 
          stmt = SSA_NAME_DEF_STMT (name);
          if (!gimple_nop_p (stmt))
            {
              basic_block bb = gimple_bb (stmt);
              verify_def (bb, definition_block,
-                         name, stmt, !is_gimple_reg (name));
+                         name, stmt, virtual_operand_p (name));
 
            }
        }
 
              gimple phi = gsi_stmt (i);
              lhs = PHI_RESULT (phi);
 
-             if (!is_gimple_reg (lhs))
+             if (virtual_operand_p (lhs))
                continue;
 
              FOR_EACH_PHI_ARG (uop, phi, soi, SSA_OP_USE)
 
 
       /** 2. Handle loop-closed-ssa-form phis  **/
 
-      if (!is_gimple_reg (PHI_RESULT (orig_phi)))
+      if (virtual_operand_p (PHI_RESULT (orig_phi)))
        continue;
 
       /* 2.1. Generate new phi node in NEW_EXIT_BB:  */
      in the same form).  Doing this early simplifies the checking what
      uses should be renamed.  */
   for (gsi = gsi_start_phis (loop->header); !gsi_end_p (gsi); gsi_next (&gsi))
-    if (!is_gimple_reg (gimple_phi_result (gsi_stmt (gsi))))
+    if (virtual_operand_p (gimple_phi_result (gsi_stmt (gsi))))
       {
        gimple phi = gsi_stmt (gsi);
        for (gsi = gsi_start_phis (exit_e->dest);
             !gsi_end_p (gsi); gsi_next (&gsi))
-         if (!is_gimple_reg (gimple_phi_result (gsi_stmt (gsi))))
+         if (virtual_operand_p (gimple_phi_result (gsi_stmt (gsi))))
            break;
        if (gsi_end_p (gsi))
          {
       /* Skip virtual phi's. The data dependences that are associated with
          virtual defs/uses (i.e., memory accesses) are analyzed elsewhere.  */
 
-      if (!is_gimple_reg (PHI_RESULT (phi)))
+      if (virtual_operand_p (PHI_RESULT (phi)))
        {
          if (vect_print_dump_info (REPORT_DETAILS))
            fprintf (vect_dump, "virtual phi. skip.");
         }
 
       /* Skip virtual phi's.  */
-      if (!is_gimple_reg (PHI_RESULT (phi)))
+      if (virtual_operand_p (PHI_RESULT (phi)))
        {
          if (vect_print_dump_info (REPORT_DETAILS))
            fprintf (vect_dump, "virtual phi. skip.");
 
 
       /* Skip virtual phi's.  The data dependences that are associated with
          virtual defs/uses (i.e., memory accesses) are analyzed elsewhere.  */
-      if (!is_gimple_reg (def))
+      if (virtual_operand_p (def))
        continue;
 
       STMT_VINFO_DEF_TYPE (stmt_vinfo) = vect_unknown_def_type;
           print_gimple_stmt (vect_dump, phi, 0, TDF_SLIM);
         }
 
-      gcc_assert (is_gimple_reg (def));
-      gcc_assert (STMT_VINFO_DEF_TYPE (stmt_vinfo) == vect_unknown_def_type);
+      gcc_assert (!virtual_operand_p (def)
+                 && STMT_VINFO_DEF_TYPE (stmt_vinfo) == vect_unknown_def_type);
 
       nested_cycle = (loop != LOOP_VINFO_LOOP (loop_vinfo));
       reduc_stmt = vect_force_simple_reduction (loop_vinfo, phi, !nested_cycle,
 
 static bool
 stmt_interesting_for_vrp (gimple stmt)
 {
-  if (gimple_code (stmt) == GIMPLE_PHI
-      && is_gimple_reg (gimple_phi_result (stmt))
-      && (INTEGRAL_TYPE_P (TREE_TYPE (gimple_phi_result (stmt)))
-         || POINTER_TYPE_P (TREE_TYPE (gimple_phi_result (stmt)))))
-    return true;
+  if (gimple_code (stmt) == GIMPLE_PHI)
+    {
+      tree res = gimple_phi_result (stmt);
+      return (!virtual_operand_p (res)
+             && (INTEGRAL_TYPE_P (TREE_TYPE (res))
+                 || POINTER_TYPE_P (TREE_TYPE (res))));
+    }
   else if (is_gimple_assign (stmt) || is_gimple_call (stmt))
     {
       tree lhs = gimple_get_lhs (stmt);
 
 
       VEC_reserve (histogram_value, heap, *values, 3);
 
-      if (is_gimple_reg (divisor))
+      if (TREE_CODE (divisor) == SSA_NAME)
        /* Check for the case where the divisor is the same value most
           of the time.  */
        VEC_quick_push (histogram_value, *values,