This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Use virtual_operand_p where appropriate
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 14 Aug 2012 16:10:56 +0200 (CEST)
- Subject: [PATCH] Use virtual_operand_p where appropriate
So I audited all uses of is_gimple_reg () and replaced those that
were checking for virtual operands by virtual_operand_p which I
introduced a few weeks ago.
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.
Richard.
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.
Index: trunk/gcc/cfgexpand.c
===================================================================
*** trunk.orig/gcc/cfgexpand.c 2012-08-14 10:25:06.000000000 +0200
--- trunk/gcc/cfgexpand.c 2012-08-14 14:31:20.389839245 +0200
*************** expand_used_vars (void)
*** 1471,1477 ****
{
tree var = partition_to_var (SA.map, i);
! gcc_assert (is_gimple_reg (var));
/* Assign decls to each SSA name partition, share decls for partitions
we could have coalesced (those with the same type). */
--- 1471,1477 ----
{
tree var = partition_to_var (SA.map, i);
! 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). */
Index: trunk/gcc/gimple-pretty-print.c
===================================================================
*** trunk.orig/gcc/gimple-pretty-print.c 2012-08-13 11:13:16.000000000 +0200
--- trunk/gcc/gimple-pretty-print.c 2012-08-14 14:30:57.585840050 +0200
*************** dump_phi_nodes (pretty_printer *buffer,
*** 2128,2134 ****
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))
{
INDENT (indent);
pp_string (buffer, "# ");
--- 2128,2134 ----
for (i = gsi_start_phis (bb); !gsi_end_p (i); gsi_next (&i))
{
gimple phi = gsi_stmt (i);
! if (!virtual_operand_p (gimple_phi_result (phi)) || (flags & TDF_VOPS))
{
INDENT (indent);
pp_string (buffer, "# ");
Index: trunk/gcc/gimple-streamer-out.c
===================================================================
*** trunk.orig/gcc/gimple-streamer-out.c 2012-08-13 15:47:54.000000000 +0200
--- trunk/gcc/gimple-streamer-out.c 2012-08-14 14:30:45.046840468 +0200
*************** output_bb (struct output_block *ob, basi
*** 210,216 ****
/* 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)))
output_phi (ob, phi);
}
--- 210,216 ----
/* Only emit PHIs for gimple registers. PHI nodes for .MEM
will be filled in on reading when the SSA form is
updated. */
! if (!virtual_operand_p (gimple_phi_result (phi)))
output_phi (ob, phi);
}
Index: trunk/gcc/graphite-sese-to-poly.c
===================================================================
*** trunk.orig/gcc/graphite-sese-to-poly.c 2012-08-07 16:30:56.000000000 +0200
--- trunk/gcc/graphite-sese-to-poly.c 2012-08-14 14:30:34.781840854 +0200
*************** static bool
*** 2110,2116 ****
scalar_close_phi_node_p (gimple phi)
{
if (gimple_code (phi) != GIMPLE_PHI
! || !is_gimple_reg (gimple_phi_result (phi)))
return false;
/* Note that loop close phi nodes should have a single argument
--- 2110,2116 ----
scalar_close_phi_node_p (gimple phi)
{
if (gimple_code (phi) != GIMPLE_PHI
! || virtual_operand_p (gimple_phi_result (phi)))
return false;
/* Note that loop close phi nodes should have a single argument
*************** rewrite_reductions_out_of_ssa (scop_p sc
*** 2318,2324 ****
{
gimple phi = gsi_stmt (psi);
! if (!is_gimple_reg (gimple_phi_result (phi)))
{
gsi_next (&psi);
continue;
--- 2318,2324 ----
{
gimple phi = gsi_stmt (psi);
! if (virtual_operand_p (gimple_phi_result (phi)))
{
gsi_next (&psi);
continue;
*************** rewrite_commutative_reductions_out_of_ss
*** 3079,3085 ****
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)
&& !scev_analyzable_p (res, SCOP_REGION (scop)))
changed |= rewrite_commutative_reductions_out_of_ssa_close_phi
(scop, gsi_stmt (gsi));
--- 3079,3085 ----
for (gsi = gsi_start_phis (exit->dest); !gsi_end_p (gsi); gsi_next (&gsi))
if ((res = gimple_phi_result (gsi_stmt (gsi)))
! && !virtual_operand_p (res)
&& !scev_analyzable_p (res, SCOP_REGION (scop)))
changed |= rewrite_commutative_reductions_out_of_ssa_close_phi
(scop, gsi_stmt (gsi));
Index: trunk/gcc/ipa-split.c
===================================================================
*** trunk.orig/gcc/ipa-split.c 2012-08-10 10:32:43.000000000 +0200
--- trunk/gcc/ipa-split.c 2012-08-14 14:29:33.730842901 +0200
*************** verify_non_ssa_vars (struct split_point
*** 258,264 ****
gimple stmt = gsi_stmt (bsi);
tree op = gimple_phi_arg_def (stmt, e->dest_idx);
! if (!is_gimple_reg (gimple_phi_result (stmt)))
continue;
if (TREE_CODE (op) != SSA_NAME
&& test_nonssa_use (stmt, op, non_ssa_vars))
--- 258,264 ----
gimple stmt = gsi_stmt (bsi);
tree op = gimple_phi_arg_def (stmt, e->dest_idx);
! if (virtual_operand_p (gimple_phi_result (stmt)))
continue;
if (TREE_CODE (op) != SSA_NAME
&& test_nonssa_use (stmt, op, non_ssa_vars))
*************** consider_split (struct split_point *curr
*** 402,408 ****
gimple stmt = gsi_stmt (bsi);
tree val = NULL;
! if (!is_gimple_reg (gimple_phi_result (stmt)))
continue;
for (i = 0; i < gimple_phi_num_args (stmt); i++)
{
--- 402,408 ----
gimple stmt = gsi_stmt (bsi);
tree val = NULL;
! if (virtual_operand_p (gimple_phi_result (stmt)))
continue;
for (i = 0; i < gimple_phi_num_args (stmt); i++)
{
*************** consider_split (struct split_point *curr
*** 553,559 ****
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)))
&& !(retval
&& current->split_part_set_retval
&& TREE_CODE (retval) == SSA_NAME
--- 553,559 ----
gimple_stmt_iterator psi;
for (psi = gsi_start_phis (return_bb); !gsi_end_p (psi); gsi_next (&psi))
! if (!virtual_operand_p (gimple_phi_result (gsi_stmt (psi)))
&& !(retval
&& current->split_part_set_retval
&& TREE_CODE (retval) == SSA_NAME
*************** visit_bb (basic_block bb, basic_block re
*** 804,812 ****
gimple stmt = gsi_stmt (bsi);
unsigned int i;
! if (is_gimple_debug (stmt))
! continue;
! if (!is_gimple_reg (gimple_phi_result (stmt)))
continue;
bitmap_set_bit (set_ssa_names,
SSA_NAME_VERSION (gimple_phi_result (stmt)));
--- 804,810 ----
gimple stmt = gsi_stmt (bsi);
unsigned int i;
! if (virtual_operand_p (gimple_phi_result (stmt)))
continue;
bitmap_set_bit (set_ssa_names,
SSA_NAME_VERSION (gimple_phi_result (stmt)));
*************** visit_bb (basic_block bb, basic_block re
*** 830,838 ****
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)))
continue;
if (TREE_CODE (op) == SSA_NAME)
bitmap_set_bit (used_ssa_names, SSA_NAME_VERSION (op));
--- 828,834 ----
gimple stmt = gsi_stmt (bsi);
tree op = gimple_phi_arg_def (stmt, e->dest_idx);
! 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));
*************** split_function (struct split_point *spli
*** 1158,1164 ****
for (gsi = gsi_start_phis (return_bb); !gsi_end_p (gsi);)
{
gimple stmt = gsi_stmt (gsi);
! if (is_gimple_reg (gimple_phi_result (stmt)))
{
gsi_next (&gsi);
continue;
--- 1154,1160 ----
for (gsi = gsi_start_phis (return_bb); !gsi_end_p (gsi);)
{
gimple stmt = gsi_stmt (gsi);
! if (!virtual_operand_p (gimple_phi_result (stmt)))
{
gsi_next (&gsi);
continue;
*************** split_function (struct split_point *spli
*** 1275,1281 ****
/* 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))))
break;
/* When there is PHI, just update its value. */
--- 1271,1277 ----
/* See if there is PHI defining return value. */
for (psi = gsi_start_phis (return_bb);
!gsi_end_p (psi); gsi_next (&psi))
! if (!virtual_operand_p (gimple_phi_result (gsi_stmt (psi))))
break;
/* When there is PHI, just update its value. */
Index: trunk/gcc/lto-streamer-out.c
===================================================================
*** trunk.orig/gcc/lto-streamer-out.c 2012-08-13 11:13:16.000000000 +0200
--- trunk/gcc/lto-streamer-out.c 2012-08-14 14:27:48.445846492 +0200
*************** output_ssa_names (struct output_block *o
*** 613,619 ****
if (ptr == NULL_TREE
|| SSA_NAME_IN_FREE_LIST (ptr)
! || !is_gimple_reg (ptr))
continue;
streamer_write_uhwi (ob, i);
--- 613,619 ----
if (ptr == NULL_TREE
|| SSA_NAME_IN_FREE_LIST (ptr)
! || virtual_operand_p (ptr))
continue;
streamer_write_uhwi (ob, i);
Index: trunk/gcc/sese.c
===================================================================
*** trunk.orig/gcc/sese.c 2012-08-14 11:24:40.000000000 +0200
--- trunk/gcc/sese.c 2012-08-14 14:27:18.316847609 +0200
*************** rename_uses (gimple copy, htab_t rename_
*** 480,493 ****
return false;
}
! FOR_EACH_SSA_USE_OPERAND (use_p, copy, op_iter, SSA_OP_ALL_USES)
{
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;
--- 480,492 ----
return false;
}
! 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
|| SSA_NAME_IS_DEFAULT_DEF (old_name))
continue;
*************** rename_uses (gimple copy, htab_t rename_
*** 499,506 ****
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 var = create_tmp_var (type_old_name, "var");
--- 498,504 ----
tree type_new_expr = TREE_TYPE (new_expr);
if (type_old_name != type_new_expr
! || TREE_CODE (new_expr) != SSA_NAME)
{
tree var = create_tmp_var (type_old_name, "var");
Index: trunk/gcc/tree-cfg.c
===================================================================
*** trunk.orig/gcc/tree-cfg.c 2012-08-14 10:25:06.000000000 +0200
--- trunk/gcc/tree-cfg.c 2012-08-14 14:24:33.865853308 +0200
*************** replace_uses_by (tree name, tree val)
*** 1593,1599 ****
/* 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));
SSA_NAME_OCCURS_IN_ABNORMAL_PHI (val) = 1;
}
}
--- 1593,1599 ----
/* 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 (virtual_operand_p (name));
SSA_NAME_OCCURS_IN_ABNORMAL_PHI (val) = 1;
}
}
*************** gimple_merge_blocks (basic_block a, basi
*** 1668,1688 ****
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);
/* 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)
&& 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));
/* Note that just emitting the copies is fine -- there is no problem
with ordering of phi nodes. This is because A is the single
--- 1668,1688 ----
gimple phi = gsi_stmt (psi);
tree def = gimple_phi_result (phi), use = gimple_phi_arg_def (phi, 0);
gimple copy;
! 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)
! && !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 (!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
*************** gimple_merge_blocks (basic_block a, basi
*** 1697,1703 ****
/* 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))
{
imm_use_iterator iter;
use_operand_p use_p;
--- 1697,1703 ----
/* If we deal with a PHI for virtual operands, we can simply
propagate these without fussing with folding or updating
the stmt. */
! if (virtual_operand_p (def))
{
imm_use_iterator iter;
use_operand_p use_p;
*************** gimple_cfg2dot (const char *fname)
*** 2217,2223 ****
{
for (gsi = gsi_start_phis (bb); !gsi_end_p (gsi); gsi_next (&gsi))
{
! if (!is_gimple_reg (gimple_phi_result (gsi_stmt (gsi))))
continue;
dump_gimple_stmt (&buffer, gsi_stmt (gsi), 0, TDF_SLIM);
pp_write_text_to_stream (&buffer);
--- 2217,2223 ----
{
for (gsi = gsi_start_phis (bb); !gsi_end_p (gsi); gsi_next (&gsi))
{
! if (virtual_operand_p (gimple_phi_result (gsi_stmt (gsi))))
continue;
dump_gimple_stmt (&buffer, gsi_stmt (gsi), 0, TDF_SLIM);
pp_write_text_to_stream (&buffer);
*************** verify_gimple_phi (gimple phi)
*** 4456,4462 ****
return true;
}
! virtual_p = !is_gimple_reg (phi_result);
if (TREE_CODE (phi_result) != SSA_NAME
|| (virtual_p
&& SSA_NAME_VAR (phi_result) != gimple_vop (cfun)))
--- 4456,4462 ----
return true;
}
! virtual_p = virtual_operand_p (phi_result);
if (TREE_CODE (phi_result) != SSA_NAME
|| (virtual_p
&& SSA_NAME_VAR (phi_result) != gimple_vop (cfun)))
*************** verify_gimple_phi (gimple phi)
*** 4478,4484 ****
/* 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
&& (TREE_CODE (t) != SSA_NAME
|| SSA_NAME_VAR (t) != gimple_vop (cfun)))
--- 4478,4484 ----
/* Addressable variables do have SSA_NAMEs but they
are not considered gimple values. */
else if ((TREE_CODE (t) == SSA_NAME
! && virtual_p != virtual_operand_p (t))
|| (virtual_p
&& (TREE_CODE (t) != SSA_NAME
|| SSA_NAME_VAR (t) != gimple_vop (cfun)))
*************** replace_ssa_name (tree name, struct poin
*** 6047,6053 ****
void **loc;
tree new_name;
! gcc_assert (is_gimple_reg (name));
loc = pointer_map_contains (vars_map, name);
--- 6047,6053 ----
void **loc;
tree new_name;
! gcc_assert (!virtual_operand_p (name));
loc = pointer_map_contains (vars_map, name);
*************** move_block_to_fn (struct function *dest_
*** 6334,6340 ****
tree op = PHI_RESULT (phi);
ssa_op_iter oi;
! if (!is_gimple_reg (op))
{
/* Remove the phi nodes for virtual operands (alias analysis will be
run for the new function, anyway). */
--- 6334,6340 ----
tree op = PHI_RESULT (phi);
ssa_op_iter oi;
! if (virtual_operand_p (op))
{
/* Remove the phi nodes for virtual operands (alias analysis will be
run for the new function, anyway). */
Index: trunk/gcc/tree-eh.c
===================================================================
*** trunk.orig/gcc/tree-eh.c 2012-08-01 13:47:13.000000000 +0200
--- trunk/gcc/tree-eh.c 2012-08-14 14:22:06.487858493 +0200
*************** cleanup_empty_eh_merge_phis (basic_block
*** 3857,3863 ****
}
/* 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))
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
--- 3857,3863 ----
}
/* If we didn't find the PHI, but it's a VOP, remember to rename
it later, assuming all other tests succeed. */
! 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
Index: trunk/gcc/tree-if-conv.c
===================================================================
*** trunk.orig/gcc/tree-if-conv.c 2012-08-10 11:21:02.000000000 +0200
--- trunk/gcc/tree-if-conv.c 2012-08-14 14:21:42.193859374 +0200
*************** if_convertible_phi_p (struct loop *loop,
*** 410,416 ****
/* 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)))
{
imm_use_iterator imm_iter;
use_operand_p use_p;
--- 410,416 ----
/* 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 (virtual_operand_p (gimple_phi_result (phi)))
{
imm_use_iterator imm_iter;
use_operand_p use_p;
*************** predicate_scalar_phi (gimple phi, tree c
*** 1262,1268 ****
res = gimple_phi_result (phi);
/* Do not handle virtual phi nodes. */
! if (!is_gimple_reg (res))
return;
bb = gimple_bb (phi);
--- 1262,1268 ----
res = gimple_phi_result (phi);
/* Do not handle virtual phi nodes. */
! if (virtual_operand_p (res))
return;
bb = gimple_bb (phi);
Index: trunk/gcc/tree-inline.c
===================================================================
*** trunk.orig/gcc/tree-inline.c 2012-08-10 10:32:43.000000000 +0200
--- trunk/gcc/tree-inline.c 2012-08-14 14:21:20.057860014 +0200
*************** update_ssa_across_abnormal_edges (basic_
*** 1830,1836 ****
gcc_assert ((e->flags & EDGE_EH)
|| SSA_NAME_OCCURS_IN_ABNORMAL_PHI (PHI_RESULT (phi)));
! if (!is_gimple_reg (PHI_RESULT (phi)))
{
mark_virtual_operands_for_renaming (cfun);
continue;
--- 1830,1836 ----
gcc_assert ((e->flags & EDGE_EH)
|| SSA_NAME_OCCURS_IN_ABNORMAL_PHI (PHI_RESULT (phi)));
! if (virtual_operand_p (PHI_RESULT (phi)))
{
mark_virtual_operands_for_renaming (cfun);
continue;
*************** copy_phis_for_bb (basic_block bb, copy_b
*** 1970,1976 ****
phi = gsi_stmt (si);
res = PHI_RESULT (phi);
new_res = res;
! if (is_gimple_reg (res))
{
walk_tree (&new_res, copy_tree_body_r, id, NULL);
new_phi = create_phi_node (new_res, new_bb);
--- 1970,1976 ----
phi = gsi_stmt (si);
res = PHI_RESULT (phi);
new_res = 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);
Index: trunk/gcc/tree-loop-distribution.c
===================================================================
*** trunk.orig/gcc/tree-loop-distribution.c 2012-08-10 11:21:02.000000000 +0200
--- trunk/gcc/tree-loop-distribution.c 2012-08-14 14:20:24.751861903 +0200
*************** generate_loops_for_partition (struct loo
*** 288,294 ****
if (!bitmap_bit_p (partition->stmts, x++))
{
gimple phi = gsi_stmt (bsi);
! if (!is_gimple_reg (gimple_phi_result (phi)))
mark_virtual_phi_result_for_renaming (phi);
remove_phi_node (&bsi, true);
}
--- 288,294 ----
if (!bitmap_bit_p (partition->stmts, x++))
{
gimple phi = gsi_stmt (bsi);
! if (virtual_operand_p (gimple_phi_result (phi)))
mark_virtual_phi_result_for_renaming (phi);
remove_phi_node (&bsi, true);
}
*************** destroy_loop (struct loop *loop)
*** 492,498 ****
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)))
mark_virtual_phi_result_for_renaming (phi);
}
for (gsi = gsi_start_bb (bbs[i]); !gsi_end_p (gsi); gsi_next (&gsi))
--- 492,498 ----
for (gsi = gsi_start_phis (bbs[i]); !gsi_end_p (gsi); gsi_next (&gsi))
{
gimple phi = gsi_stmt (gsi);
! 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))
Index: trunk/gcc/tree-outof-ssa.c
===================================================================
*** trunk.orig/gcc/tree-outof-ssa.c 2012-08-08 16:37:04.000000000 +0200
--- trunk/gcc/tree-outof-ssa.c 2012-08-14 14:19:39.679863482 +0200
*************** eliminate_useless_phis (void)
*** 762,768 ****
{
gimple phi = gsi_stmt (gsi);
result = gimple_phi_result (phi);
! if (!is_gimple_reg (result))
{
#ifdef ENABLE_CHECKING
size_t i;
--- 762,768 ----
{
gimple phi = gsi_stmt (gsi);
result = gimple_phi_result (phi);
! if (virtual_operand_p (result))
{
#ifdef ENABLE_CHECKING
size_t i;
*************** eliminate_useless_phis (void)
*** 772,778 ****
{
tree arg = PHI_ARG_DEF (phi, i);
if (TREE_CODE (arg) == SSA_NAME
! && is_gimple_reg (arg))
{
fprintf (stderr, "Argument of PHI is not virtual (");
print_generic_expr (stderr, arg, TDF_SLIM);
--- 772,778 ----
{
tree arg = PHI_ARG_DEF (phi, i);
if (TREE_CODE (arg) == SSA_NAME
! && !virtual_operand_p (arg))
{
fprintf (stderr, "Argument of PHI is not virtual (");
print_generic_expr (stderr, arg, TDF_SLIM);
*************** insert_backedge_copies (void)
*** 1032,1038 ****
tree result = gimple_phi_result (phi);
size_t i;
! if (!is_gimple_reg (result))
continue;
for (i = 0; i < gimple_phi_num_args (phi); i++)
--- 1032,1038 ----
tree result = gimple_phi_result (phi);
size_t i;
! if (virtual_operand_p (result))
continue;
for (i = 0; i < gimple_phi_num_args (phi); i++)
Index: trunk/gcc/tree-parloops.c
===================================================================
*** trunk.orig/gcc/tree-parloops.c 2012-08-10 11:21:02.000000000 +0200
--- trunk/gcc/tree-parloops.c 2012-08-14 14:18:34.844865746 +0200
*************** transform_to_exit_first_loop (struct loo
*** 1517,1523 ****
{
phi = gsi_stmt (gsi);
res = PHI_RESULT (phi);
! if (!is_gimple_reg (res))
{
gsi_next (&gsi);
continue;
--- 1517,1523 ----
{
phi = gsi_stmt (gsi);
res = PHI_RESULT (phi);
! if (virtual_operand_p (res))
{
gsi_next (&gsi);
continue;
*************** gather_scalar_reductions (loop_p loop, h
*** 1953,1959 ****
tree res = PHI_RESULT (phi);
bool double_reduc;
! if (!is_gimple_reg (res))
continue;
if (!simple_iv (loop, loop, res, &iv, true)
--- 1953,1959 ----
tree res = PHI_RESULT (phi);
bool double_reduc;
! if (virtual_operand_p (res))
continue;
if (!simple_iv (loop, loop, res, &iv, true)
*************** try_create_reduction_list (loop_p loop,
*** 2019,2025 ****
gimple reduc_phi;
tree val = PHI_ARG_DEF_FROM_EDGE (phi, exit);
! if (is_gimple_reg (val))
{
if (dump_file && (dump_flags & TDF_DETAILS))
{
--- 2019,2025 ----
gimple reduc_phi;
tree val = PHI_ARG_DEF_FROM_EDGE (phi, exit);
! if (!virtual_operand_p (val))
{
if (dump_file && (dump_flags & TDF_DETAILS))
{
*************** try_create_reduction_list (loop_p loop,
*** 2074,2080 ****
tree def = PHI_RESULT (phi);
affine_iv iv;
! if (is_gimple_reg (def) && !simple_iv (loop, loop, def, &iv, true))
{
struct reduction_info *red;
--- 2074,2080 ----
tree def = PHI_RESULT (phi);
affine_iv iv;
! if (!virtual_operand_p (def) && !simple_iv (loop, loop, def, &iv, true))
{
struct reduction_info *red;
Index: trunk/gcc/tree-scalar-evolution.c
===================================================================
*** trunk.orig/gcc/tree-scalar-evolution.c 2012-07-16 14:10:00.000000000 +0200
--- trunk/gcc/tree-scalar-evolution.c 2012-08-14 14:18:02.833866813 +0200
*************** analyze_scalar_evolution_for_all_loop_ph
*** 3039,3045 ****
for (psi = gsi_start_phis (bb); !gsi_end_p (psi); gsi_next (&psi))
{
phi = gsi_stmt (psi);
! if (is_gimple_reg (PHI_RESULT (phi)))
{
chrec = instantiate_parameters
(loop,
--- 3039,3045 ----
for (psi = gsi_start_phis (bb); !gsi_end_p (psi); gsi_next (&psi))
{
phi = gsi_stmt (psi);
! if (!virtual_operand_p (PHI_RESULT (phi)))
{
chrec = instantiate_parameters
(loop,
*************** scev_const_prop (void)
*** 3328,3334 ****
phi = gsi_stmt (psi);
name = PHI_RESULT (phi);
! if (!is_gimple_reg (name))
continue;
type = TREE_TYPE (name);
--- 3328,3334 ----
phi = gsi_stmt (psi);
name = PHI_RESULT (phi);
! if (virtual_operand_p (name))
continue;
type = TREE_TYPE (name);
*************** scev_const_prop (void)
*** 3404,3410 ****
phi = gsi_stmt (psi);
rslt = PHI_RESULT (phi);
def = PHI_ARG_DEF_FROM_EDGE (phi, exit);
! if (!is_gimple_reg (def))
{
gsi_next (&psi);
continue;
--- 3404,3410 ----
phi = gsi_stmt (psi);
rslt = PHI_RESULT (phi);
def = PHI_ARG_DEF_FROM_EDGE (phi, exit);
! if (virtual_operand_p (def))
{
gsi_next (&psi);
continue;
Index: trunk/gcc/tree-ssa-ccp.c
===================================================================
*** trunk.orig/gcc/tree-ssa-ccp.c 2012-08-03 12:49:33.000000000 +0200
--- trunk/gcc/tree-ssa-ccp.c 2012-08-14 14:16:56.847869167 +0200
*************** debug_lattice_value (prop_value_t val)
*** 236,242 ****
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;
--- 236,241 ----
*************** get_default_value (tree var)
*** 248,255 ****
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)
val.lattice_val = UNDEFINED;
else
{
--- 247,254 ----
before being initialized. If VAR is a local variable, we
can assume initially that it is UNDEFINED, otherwise we must
consider it VARYING. */
! if (!virtual_operand_p (var)
! && TREE_CODE (SSA_NAME_VAR (var)) == VAR_DECL)
val.lattice_val = UNDEFINED;
else
{
*************** ccp_initialize (void)
*** 762,768 ****
{
gimple phi = gsi_stmt (i);
! if (!is_gimple_reg (gimple_phi_result (phi)))
prop_set_simulate_again (phi, false);
else
prop_set_simulate_again (phi, true);
--- 761,767 ----
{
gimple phi = gsi_stmt (i);
! if (virtual_operand_p (gimple_phi_result (phi)))
prop_set_simulate_again (phi, false);
else
prop_set_simulate_again (phi, true);
Index: trunk/gcc/tree-ssa-coalesce.c
===================================================================
*** trunk.orig/gcc/tree-ssa-coalesce.c 2012-08-10 10:32:43.000000000 +0200
--- trunk/gcc/tree-ssa-coalesce.c 2012-08-14 14:14:48.052873591 +0200
*************** create_outofssa_var_map (coalesce_list_p
*** 1101,1107 ****
for (i = 1; i < num_ssa_names; i++)
{
var = ssa_name (i);
! if (var != NULL_TREE && is_gimple_reg (var))
{
/* Add coalesces between all the result decls. */
if (SSA_NAME_VAR (var)
--- 1101,1107 ----
for (i = 1; i < num_ssa_names; i++)
{
var = ssa_name (i);
! if (var != NULL_TREE && !virtual_operand_p (var))
{
/* Add coalesces between all the result decls. */
if (SSA_NAME_VAR (var)
Index: trunk/gcc/tree-ssa-copy.c
===================================================================
*** trunk.orig/gcc/tree-ssa-copy.c 2012-08-13 15:47:55.000000000 +0200
--- trunk/gcc/tree-ssa-copy.c 2012-08-14 14:14:36.871874108 +0200
*************** may_propagate_copy (tree dest, tree orig
*** 74,83 ****
return false;
/* Propagating virtual operands is always ok. */
! if (TREE_CODE (dest) == SSA_NAME && !is_gimple_reg (dest))
{
/* But only between virtual operands. */
! gcc_assert (TREE_CODE (orig) == SSA_NAME && !is_gimple_reg (orig));
return true;
}
--- 74,83 ----
return false;
/* Propagating virtual operands is always ok. */
! if (TREE_CODE (dest) == SSA_NAME && virtual_operand_p (dest))
{
/* But only between virtual operands. */
! gcc_assert (TREE_CODE (orig) == SSA_NAME && virtual_operand_p (orig));
return true;
}
*************** init_copy_prop (void)
*** 713,719 ****
tree def;
def = gimple_phi_result (phi);
! if (!is_gimple_reg (def))
prop_set_simulate_again (phi, false);
else
prop_set_simulate_again (phi, true);
--- 713,719 ----
tree def;
def = gimple_phi_result (phi);
! if (virtual_operand_p (def))
prop_set_simulate_again (phi, false);
else
prop_set_simulate_again (phi, true);
Index: trunk/gcc/tree-ssa-dce.c
===================================================================
*** trunk.orig/gcc/tree-ssa-dce.c 2012-08-08 10:15:02.000000000 +0200
--- trunk/gcc/tree-ssa-dce.c 2012-08-14 14:13:57.259875351 +0200
*************** propagate_necessity (struct edge_list *e
*** 720,726 ****
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)))
{
/* PHI nodes are somewhat special in that each PHI alternative has
data and control dependencies. All the statements feeding the
--- 720,726 ----
if (gimple_code (stmt) == GIMPLE_PHI
/* We do not process virtual PHI nodes nor do we track their
necessity. */
! && !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
*************** remove_dead_phis (basic_block bb)
*** 1052,1058 ****
/* 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)))
{
/* Virtual PHI nodes with one or identical arguments
can be removed. */
--- 1052,1058 ----
/* We do not track necessity of virtual PHI nodes. Instead do
very simple dead PHI removal here. */
! if (virtual_operand_p (gimple_phi_result (phi)))
{
/* Virtual PHI nodes with one or identical arguments
can be removed. */
*************** forward_edge_to_pdom (edge e, basic_bloc
*** 1130,1136 ****
/* 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)))
{
mark_virtual_phi_result_for_renaming (phi);
remove_phi_node (&gsi, true);
--- 1130,1136 ----
/* PHIs for virtuals have no control dependency relation on them.
We are lost here and must force renaming of the symbol. */
! if (virtual_operand_p (gimple_phi_result (phi)))
{
mark_virtual_phi_result_for_renaming (phi);
remove_phi_node (&gsi, true);
*************** eliminate_unnecessary_stmts (void)
*** 1391,1397 ****
|| !(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))))
{
bool found = false;
imm_use_iterator iter;
--- 1391,1397 ----
|| !(bb->flags & BB_REACHABLE))
{
for (gsi = gsi_start_phis (bb); !gsi_end_p (gsi); gsi_next (&gsi))
! if (virtual_operand_p (gimple_phi_result (gsi_stmt (gsi))))
{
bool found = false;
imm_use_iterator iter;
Index: trunk/gcc/tree-ssa-live.c
===================================================================
*** trunk.orig/gcc/tree-ssa-live.c 2012-08-10 10:32:43.000000000 +0200
--- trunk/gcc/tree-ssa-live.c 2012-08-14 14:13:09.420877007 +0200
*************** partition_view_init (var_map map)
*** 240,246 ****
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))
&& (!has_zero_uses (ssa_name (tmp))
|| !SSA_NAME_IS_DEFAULT_DEF (ssa_name (tmp))))
bitmap_set_bit (used, tmp);
--- 240,246 ----
for (x = 0; x < map->partition_size; x++)
{
tmp = partition_find (map->var_partition, x);
! 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);
*************** remove_unused_locals (void)
*** 750,756 ****
tree def;
gimple phi = gsi_stmt (gsi);
! if (!is_gimple_reg (gimple_phi_result (phi)))
continue;
def = gimple_phi_result (phi);
--- 750,756 ----
tree def;
gimple phi = gsi_stmt (gsi);
! if (virtual_operand_p (gimple_phi_result (phi)))
continue;
def = gimple_phi_result (phi);
*************** void
*** 1216,1222 ****
register_ssa_partition_check (tree ssa_var)
{
gcc_assert (TREE_CODE (ssa_var) == SSA_NAME);
! if (!is_gimple_reg (ssa_var))
{
fprintf (stderr, "Illegally registering a virtual SSA name :");
print_generic_expr (stderr, ssa_var, TDF_SLIM);
--- 1216,1222 ----
register_ssa_partition_check (tree ssa_var)
{
gcc_assert (TREE_CODE (ssa_var) == SSA_NAME);
! if (virtual_operand_p (ssa_var))
{
fprintf (stderr, "Illegally registering a virtual SSA name :");
print_generic_expr (stderr, ssa_var, TDF_SLIM);
Index: trunk/gcc/tree-ssa-loop-im.c
===================================================================
*** trunk.orig/gcc/tree-ssa-loop-im.c 2012-08-10 11:21:02.000000000 +0200
--- trunk/gcc/tree-ssa-loop-im.c 2012-08-14 14:12:24.889878551 +0200
*************** movement_possibility (gimple stmt)
*** 356,362 ****
if (gimple_code (stmt) == GIMPLE_PHI
&& gimple_phi_num_args (stmt) <= 2
! && is_gimple_reg (gimple_phi_result (stmt))
&& !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (gimple_phi_result (stmt)))
return MOVE_POSSIBLE;
--- 356,362 ----
if (gimple_code (stmt) == GIMPLE_PHI
&& gimple_phi_num_args (stmt) <= 2
! && !virtual_operand_p (gimple_phi_result (stmt))
&& !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (gimple_phi_result (stmt)))
return MOVE_POSSIBLE;
*************** move_computations_stmt (struct dom_walk_
*** 1327,1333 ****
!gsi_end_p (gsi2); gsi_next (&gsi2))
{
gimple phi = gsi_stmt (gsi2);
! if (!is_gimple_reg (gimple_phi_result (phi)))
{
gimple_set_vuse (stmt, PHI_ARG_DEF_FROM_EDGE (phi, e));
break;
--- 1327,1333 ----
!gsi_end_p (gsi2); gsi_next (&gsi2))
{
gimple phi = gsi_stmt (gsi2);
! if (virtual_operand_p (gimple_phi_result (phi)))
{
gimple_set_vuse (stmt, PHI_ARG_DEF_FROM_EDGE (phi, e));
break;
Index: trunk/gcc/tree-ssa-loop-ivopts.c
===================================================================
*** trunk.orig/gcc/tree-ssa-loop-ivopts.c 2012-08-13 15:47:55.000000000 +0200
--- trunk/gcc/tree-ssa-loop-ivopts.c 2012-08-14 14:12:02.494879326 +0200
*************** determine_biv_step (gimple phi)
*** 980,986 ****
tree name = PHI_RESULT (phi);
affine_iv iv;
! if (!is_gimple_reg (name))
return NULL_TREE;
if (!simple_iv (loop, loop, name, &iv, true))
--- 980,986 ----
tree name = PHI_RESULT (phi);
affine_iv iv;
! if (virtual_operand_p (name))
return NULL_TREE;
if (!simple_iv (loop, loop, name, &iv, true))
*************** record_invariant (struct ivopts_data *da
*** 1225,1231 ****
struct version_info *info;
if (TREE_CODE (op) != SSA_NAME
! || !is_gimple_reg (op))
return;
bb = gimple_bb (SSA_NAME_DEF_STMT (op));
--- 1225,1231 ----
struct version_info *info;
if (TREE_CODE (op) != SSA_NAME
! || virtual_operand_p (op))
return;
bb = gimple_bb (SSA_NAME_DEF_STMT (op));
*************** find_interesting_uses_outside (struct iv
*** 1927,1933 ****
{
phi = gsi_stmt (psi);
def = PHI_ARG_DEF_FROM_EDGE (phi, exit);
! if (is_gimple_reg (def))
find_interesting_uses_op (data, def);
}
}
--- 1927,1933 ----
{
phi = gsi_stmt (psi);
def = PHI_ARG_DEF_FROM_EDGE (phi, exit);
! if (!virtual_operand_p (def))
find_interesting_uses_op (data, def);
}
}
*************** determine_set_costs (struct ivopts_data
*** 5063,5069 ****
phi = gsi_stmt (psi);
op = PHI_RESULT (phi);
! if (!is_gimple_reg (op))
continue;
if (get_iv (data, op))
--- 5063,5069 ----
phi = gsi_stmt (psi);
op = PHI_RESULT (phi);
! if (virtual_operand_p (op))
continue;
if (get_iv (data, op))
Index: trunk/gcc/tree-ssa-loop-manip.c
===================================================================
*** trunk.orig/gcc/tree-ssa-loop-manip.c 2012-08-14 10:25:05.000000000 +0200
--- trunk/gcc/tree-ssa-loop-manip.c 2012-08-14 14:11:18.837880837 +0200
*************** add_exit_phis_var (tree var, bitmap live
*** 169,175 ****
basic_block def_bb = gimple_bb (SSA_NAME_DEF_STMT (var));
bitmap_iterator bi;
! gcc_checking_assert (is_gimple_reg (var));
bitmap_clear_bit (livein, def_bb->index);
def = BITMAP_ALLOC (&loop_renamer_obstack);
--- 169,175 ----
basic_block def_bb = gimple_bb (SSA_NAME_DEF_STMT (var));
bitmap_iterator bi;
! gcc_checking_assert (! virtual_operand_p (var));
bitmap_clear_bit (livein, def_bb->index);
def = BITMAP_ALLOC (&loop_renamer_obstack);
*************** find_uses_to_rename_use (basic_block bb,
*** 243,249 ****
return;
/* We don't need to keep virtual operands in loop-closed form. */
! if (!is_gimple_reg (use))
return;
ver = SSA_NAME_VERSION (use);
--- 243,249 ----
return;
/* We don't need to keep virtual operands in loop-closed form. */
! if (virtual_operand_p (use))
return;
ver = SSA_NAME_VERSION (use);
*************** check_loop_closed_ssa_use (basic_block b
*** 417,423 ****
gimple def;
basic_block def_bb;
! if (TREE_CODE (use) != SSA_NAME || !is_gimple_reg (use))
return;
def = SSA_NAME_DEF_STMT (use);
--- 417,423 ----
gimple def;
basic_block def_bb;
! if (TREE_CODE (use) != SSA_NAME || virtual_operand_p (use))
return;
def = SSA_NAME_DEF_STMT (use);
*************** rewrite_phi_with_iv (loop_p loop,
*** 1121,1127 ****
gimple stmt, phi = gsi_stmt (*psi);
tree atype, mtype, val, res = PHI_RESULT (phi);
! if (!is_gimple_reg (res) || res == main_iv)
{
gsi_next (psi);
return;
--- 1121,1127 ----
gimple stmt, phi = gsi_stmt (*psi);
tree atype, mtype, val, res = PHI_RESULT (phi);
! if (virtual_operand_p (res) || res == main_iv)
{
gsi_next (psi);
return;
*************** canonicalize_loop_ivs (struct loop *loop
*** 1205,1211 ****
bool uns;
type = TREE_TYPE (res);
! if (!is_gimple_reg (res)
|| (!INTEGRAL_TYPE_P (type)
&& !POINTER_TYPE_P (type))
|| TYPE_PRECISION (type) < precision)
--- 1205,1211 ----
bool uns;
type = TREE_TYPE (res);
! if (virtual_operand_p (res)
|| (!INTEGRAL_TYPE_P (type)
&& !POINTER_TYPE_P (type))
|| TYPE_PRECISION (type) < precision)
Index: trunk/gcc/tree-ssa-math-opts.c
===================================================================
*** trunk.orig/gcc/tree-ssa-math-opts.c 2012-08-10 11:21:02.000000000 +0200
--- trunk/gcc/tree-ssa-math-opts.c 2012-08-14 14:10:10.988883188 +0200
*************** execute_cse_reciprocals (void)
*** 531,538 ****
{
phi = gsi_stmt (gsi);
def = PHI_RESULT (phi);
! if (FLOAT_TYPE_P (TREE_TYPE (def))
! && is_gimple_reg (def))
execute_cse_reciprocals_1 (NULL, def);
}
--- 531,538 ----
{
phi = gsi_stmt (gsi);
def = PHI_RESULT (phi);
! if (! virtual_operand_p (def)
! && FLOAT_TYPE_P (TREE_TYPE (def)))
execute_cse_reciprocals_1 (NULL, def);
}
Index: trunk/gcc/tree-ssa-phiopt.c
===================================================================
*** trunk.orig/gcc/tree-ssa-phiopt.c 2012-08-10 11:21:02.000000000 +0200
--- trunk/gcc/tree-ssa-phiopt.c 2012-08-14 14:09:29.094884637 +0200
*************** hoist_adjacent_loads (basic_block bb0, b
*** 1820,1826 ****
gimple_stmt_iterator gsi2;
basic_block bb_for_def1, bb_for_def2;
! if (gimple_phi_num_args (phi_stmt) != 2)
continue;
arg1 = gimple_phi_arg_def (phi_stmt, 0);
--- 1820,1827 ----
gimple_stmt_iterator gsi2;
basic_block bb_for_def1, bb_for_def2;
! 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);
*************** hoist_adjacent_loads (basic_block bb0, b
*** 1829,1837 ****
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))
continue;
def1 = SSA_NAME_DEF_STMT (arg1);
--- 1830,1836 ----
if (TREE_CODE (arg1) != SSA_NAME
|| TREE_CODE (arg2) != SSA_NAME
|| SSA_NAME_IS_DEFAULT_DEF (arg1)
! || SSA_NAME_IS_DEFAULT_DEF (arg2))
continue;
def1 = SSA_NAME_DEF_STMT (arg1);
Index: trunk/gcc/tree-ssa-pre.c
===================================================================
*** trunk.orig/gcc/tree-ssa-pre.c 2012-08-14 11:52:02.000000000 +0200
--- trunk/gcc/tree-ssa-pre.c 2012-08-14 14:07:43.609888289 +0200
*************** make_values_for_phi (gimple phi, basic_b
*** 3803,3809 ****
/* We have no need for virtual phis, as they don't represent
actual computations. */
! if (is_gimple_reg (result))
{
pre_expr e = get_or_alloc_expr_for_name (result);
add_to_value (get_expr_value_id (e), e);
--- 3803,3809 ----
/* We have no need for virtual phis, as they don't represent
actual computations. */
! if (!virtual_operand_p (result))
{
pre_expr e = get_or_alloc_expr_for_name (result);
add_to_value (get_expr_value_id (e), e);
*************** compute_avail (void)
*** 3853,3859 ****
if (!name
|| !SSA_NAME_IS_DEFAULT_DEF (name)
|| has_zero_uses (name)
! || !is_gimple_reg (name))
continue;
e = get_or_alloc_expr_for_name (name);
--- 3853,3859 ----
if (!name
|| !SSA_NAME_IS_DEFAULT_DEF (name)
|| has_zero_uses (name)
! || virtual_operand_p (name))
continue;
e = get_or_alloc_expr_for_name (name);
*************** eliminate (void)
*** 4456,4462 ****
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))
{
gsi_next (&gsi);
continue;
--- 4456,4462 ----
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
! || virtual_operand_p (res))
{
gsi_next (&gsi);
continue;
Index: trunk/gcc/tree-ssa-propagate.c
===================================================================
*** trunk.orig/gcc/tree-ssa-propagate.c 2012-08-10 11:21:02.000000000 +0200
--- trunk/gcc/tree-ssa-propagate.c 2012-08-14 14:06:59.019889834 +0200
*************** substitute_and_fold (ssa_prop_get_value_
*** 1028,1034 ****
gimple_stmt_iterator gsi;
if (!name
! || !is_gimple_reg (name))
continue;
def_stmt = SSA_NAME_DEF_STMT (name);
--- 1028,1034 ----
gimple_stmt_iterator gsi;
if (!name
! || virtual_operand_p (name))
continue;
def_stmt = SSA_NAME_DEF_STMT (name);
Index: trunk/gcc/tree-ssa-reassoc.c
===================================================================
*** trunk.orig/gcc/tree-ssa-reassoc.c 2012-08-14 10:25:06.000000000 +0200
--- trunk/gcc/tree-ssa-reassoc.c 2012-08-14 14:06:39.480890508 +0200
*************** phi_rank (gimple stmt)
*** 234,240 ****
/* Ignore virtual SSA_NAMEs. */
res = gimple_phi_result (stmt);
! if (!is_gimple_reg (res))
return bb_rank[bb->index];
/* The phi definition must have a single use, and that use must be
--- 234,240 ----
/* Ignore virtual SSA_NAMEs. */
res = gimple_phi_result (stmt);
! if (virtual_operand_p (res))
return bb_rank[bb->index];
/* The phi definition must have a single use, and that use must be
Index: trunk/gcc/tree-ssa-strlen.c
===================================================================
*** trunk.orig/gcc/tree-ssa-strlen.c 2012-08-10 11:21:02.000000000 +0200
--- trunk/gcc/tree-ssa-strlen.c 2012-08-14 14:05:52.940892121 +0200
*************** strlen_enter_block (struct dom_walk_data
*** 1890,1896 ****
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)))
{
bitmap visited = BITMAP_ALLOC (NULL);
int count_vdef = 100;
--- 1890,1896 ----
for (gsi = gsi_start_phis (bb); !gsi_end_p (gsi); gsi_next (&gsi))
{
gimple phi = gsi_stmt (gsi);
! if (virtual_operand_p (gimple_phi_result (phi)))
{
bitmap visited = BITMAP_ALLOC (NULL);
int count_vdef = 100;
*************** strlen_enter_block (struct dom_walk_data
*** 1908,1914 ****
{
gimple phi = gsi_stmt (gsi);
tree result = gimple_phi_result (phi);
! if (is_gimple_reg (result) && POINTER_TYPE_P (TREE_TYPE (result)))
{
int idx = get_stridx (gimple_phi_arg_def (phi, 0));
if (idx != 0)
--- 1908,1914 ----
{
gimple phi = gsi_stmt (gsi);
tree result = gimple_phi_result (phi);
! if (!virtual_operand_p (result) && POINTER_TYPE_P (TREE_TYPE (result)))
{
int idx = get_stridx (gimple_phi_arg_def (phi, 0));
if (idx != 0)
Index: trunk/gcc/tree-ssa-structalias.c
===================================================================
*** trunk.orig/gcc/tree-ssa-structalias.c 2012-08-10 10:32:43.000000000 +0200
--- trunk/gcc/tree-ssa-structalias.c 2012-08-14 14:05:22.312893182 +0200
*************** compute_points_to_sets (void)
*** 6589,6595 ****
{
gimple phi = gsi_stmt (gsi);
! if (is_gimple_reg (gimple_phi_result (phi)))
find_func_aliases (phi);
}
--- 6589,6595 ----
{
gimple phi = gsi_stmt (gsi);
! if (! virtual_operand_p (gimple_phi_result (phi)))
find_func_aliases (phi);
}
*************** ipa_pta_execute (void)
*** 6966,6972 ****
{
gimple phi = gsi_stmt (gsi);
! if (is_gimple_reg (gimple_phi_result (phi)))
find_func_aliases (phi);
}
--- 6966,6972 ----
{
gimple phi = gsi_stmt (gsi);
! if (! virtual_operand_p (gimple_phi_result (phi)))
find_func_aliases (phi);
}
Index: trunk/gcc/tree-ssa-tail-merge.c
===================================================================
*** trunk.orig/gcc/tree-ssa-tail-merge.c 2012-08-08 10:15:02.000000000 +0200
--- trunk/gcc/tree-ssa-tail-merge.c 2012-08-14 14:04:54.614894141 +0200
*************** same_succ_hash (const void *ve)
*** 480,486 ****
tree lhs = gimple_phi_result (phi);
tree val = gimple_phi_arg_def (phi, n);
! if (!is_gimple_reg (lhs))
continue;
update_dep_bb (bb, val);
}
--- 480,486 ----
tree lhs = gimple_phi_result (phi);
tree val = gimple_phi_arg_def (phi, n);
! if (virtual_operand_p (lhs))
continue;
update_dep_bb (bb, val);
}
*************** release_last_vdef (basic_block bb)
*** 834,840 ****
gimple phi = gsi_stmt (i);
tree res = gimple_phi_result (phi);
! if (is_gimple_reg (res))
continue;
mark_virtual_phi_result_for_renaming (phi);
--- 834,840 ----
gimple phi = gsi_stmt (i);
tree res = gimple_phi_result (phi);
! if (!virtual_operand_p (res))
continue;
mark_virtual_phi_result_for_renaming (phi);
*************** same_phi_alternatives_1 (basic_block des
*** 1252,1258 ****
tree val1 = gimple_phi_arg_def (phi, n1);
tree val2 = gimple_phi_arg_def (phi, n2);
! if (!is_gimple_reg (lhs))
continue;
if (operand_equal_for_phi_arg_p (val1, val2))
--- 1252,1258 ----
tree val1 = gimple_phi_arg_def (phi, n1);
tree val2 = gimple_phi_arg_def (phi, n2);
! if (virtual_operand_p (lhs))
continue;
if (operand_equal_for_phi_arg_p (val1, val2))
*************** bb_has_non_vop_phi (basic_block bb)
*** 1310,1316 ****
return true;
phi = gimple_seq_first_stmt (phis);
! return is_gimple_reg (gimple_phi_result (phi));
}
/* Returns true if redirecting the incoming edges of FROM to TO maintains the
--- 1310,1316 ----
return true;
phi = gimple_seq_first_stmt (phis);
! return !virtual_operand_p (gimple_phi_result (phi));
}
/* Returns true if redirecting the incoming edges of FROM to TO maintains the
*************** vop_phi (basic_block bb)
*** 1432,1438 ****
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)))
continue;
return stmt;
}
--- 1432,1438 ----
for (gsi = gsi_start_phis (bb); !gsi_end_p (gsi); gsi_next (&gsi))
{
stmt = gsi_stmt (gsi);
! if (! virtual_operand_p (gimple_phi_result (stmt)))
continue;
return stmt;
}
Index: trunk/gcc/tree-ssa-threadedge.c
===================================================================
*** trunk.orig/gcc/tree-ssa-threadedge.c 2012-07-16 14:10:05.000000000 +0200
--- trunk/gcc/tree-ssa-threadedge.c 2012-08-14 14:04:04.688895869 +0200
*************** record_temporary_equivalences_from_phis
*** 204,210 ****
/* 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))
stmt_count++;
record_temporary_equivalence (dst, src, stack);
--- 204,210 ----
/* We consider any non-virtual PHI as a statement since it
count result in a constant assignment or copy operation. */
! if (!virtual_operand_p (dst))
stmt_count++;
record_temporary_equivalence (dst, src, stack);
Index: trunk/gcc/tree-ssa-uninit.c
===================================================================
*** trunk.orig/gcc/tree-ssa-uninit.c 2012-08-10 10:32:41.000000000 +0200
--- trunk/gcc/tree-ssa-uninit.c 2012-08-14 14:03:44.963896552 +0200
*************** warn_uninitialized_phi (gimple phi, VEC(
*** 1923,1930 ****
gimple uninit_use_stmt = 0;
tree uninit_op;
! /* Don't look at memory tags. */
! if (!is_gimple_reg (gimple_phi_result (phi)))
return;
uninit_opnds = compute_uninit_opnds_pos (phi);
--- 1923,1930 ----
gimple uninit_use_stmt = 0;
tree uninit_op;
! /* Don't look at virtual operands. */
! if (virtual_operand_p (gimple_phi_result (phi)))
return;
uninit_opnds = compute_uninit_opnds_pos (phi);
*************** execute_late_warn_uninitialized (void)
*** 1988,1995 ****
n = gimple_phi_num_args (phi);
! /* Don't look at memory tags. */
! if (!is_gimple_reg (gimple_phi_result (phi)))
continue;
for (i = 0; i < n; ++i)
--- 1988,1995 ----
n = gimple_phi_num_args (phi);
! /* Don't look at virtual operands. */
! if (virtual_operand_p (gimple_phi_result (phi)))
continue;
for (i = 0; i < n; ++i)
Index: trunk/gcc/tree-ssa.c
===================================================================
*** trunk.orig/gcc/tree-ssa.c 2012-08-10 10:32:43.000000000 +0200
--- trunk/gcc/tree-ssa.c 2012-08-14 14:03:16.016897555 +0200
*************** verify_ssa_name (tree ssa_name, bool is_
*** 642,648 ****
return true;
}
! if (is_virtual && is_gimple_reg (ssa_name))
{
error ("found a virtual definition for a GIMPLE register");
return true;
--- 642,648 ----
return true;
}
! if (is_virtual && !virtual_operand_p (ssa_name))
{
error ("found a virtual definition for a GIMPLE register");
return true;
*************** verify_ssa_name (tree ssa_name, bool is_
*** 654,660 ****
return true;
}
! if (!is_virtual && !is_gimple_reg (ssa_name))
{
error ("found a real definition for a non-register");
return true;
--- 654,660 ----
return true;
}
! if (!is_virtual && virtual_operand_p (ssa_name))
{
error ("found a real definition for a non-register");
return true;
*************** verify_phi_args (gimple phi, basic_block
*** 864,870 ****
if (TREE_CODE (op) == SSA_NAME)
{
! err = verify_ssa_name (op, !is_gimple_reg (gimple_phi_result (phi)));
err |= verify_use (e->src, definition_block[SSA_NAME_VERSION (op)],
op_p, phi, e->flags & EDGE_ABNORMAL, NULL);
}
--- 864,870 ----
if (TREE_CODE (op) == SSA_NAME)
{
! 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);
}
*************** verify_ssa (bool check_modified_stmt)
*** 938,951 ****
gimple stmt;
TREE_VISITED (name) = 0;
! verify_ssa_name (name, !is_gimple_reg (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));
}
}
--- 938,951 ----
gimple stmt;
TREE_VISITED (name) = 0;
! 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, virtual_operand_p (name));
}
}
Index: trunk/gcc/tree-stdarg.c
===================================================================
*** trunk.orig/gcc/tree-stdarg.c 2012-08-08 16:37:04.000000000 +0200
--- trunk/gcc/tree-stdarg.c 2012-08-14 14:00:25.254903467 +0200
*************** execute_optimize_stdarg (void)
*** 791,797 ****
gimple phi = gsi_stmt (i);
lhs = PHI_RESULT (phi);
! if (!is_gimple_reg (lhs))
continue;
FOR_EACH_PHI_ARG (uop, phi, soi, SSA_OP_USE)
--- 791,797 ----
gimple phi = gsi_stmt (i);
lhs = PHI_RESULT (phi);
! if (virtual_operand_p (lhs))
continue;
FOR_EACH_PHI_ARG (uop, phi, soi, SSA_OP_USE)
Index: trunk/gcc/tree-vect-loop-manip.c
===================================================================
*** trunk.orig/gcc/tree-vect-loop-manip.c 2012-08-10 11:21:02.000000000 +0200
--- trunk/gcc/tree-vect-loop-manip.c 2012-08-14 13:59:42.178904958 +0200
*************** slpeel_update_phi_nodes_for_guard1 (edge
*** 545,551 ****
/** 2. Handle loop-closed-ssa-form phis **/
! if (!is_gimple_reg (PHI_RESULT (orig_phi)))
continue;
/* 2.1. Generate new phi node in NEW_EXIT_BB: */
--- 545,551 ----
/** 2. Handle loop-closed-ssa-form phis **/
! if (virtual_operand_p (PHI_RESULT (orig_phi)))
continue;
/* 2.1. Generate new phi node in NEW_EXIT_BB: */
*************** slpeel_tree_peel_loop_to_edge (struct lo
*** 1176,1187 ****
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))))
{
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))))
break;
if (gsi_end_p (gsi))
{
--- 1176,1187 ----
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 (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 (virtual_operand_p (gimple_phi_result (gsi_stmt (gsi))))
break;
if (gsi_end_p (gsi))
{
*************** vect_can_advance_ivs_p (loop_vec_info lo
*** 1665,1671 ****
/* 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 (vect_print_dump_info (REPORT_DETAILS))
fprintf (vect_dump, "virtual phi. skip.");
--- 1665,1671 ----
/* Skip virtual phi's. The data dependences that are associated with
virtual defs/uses (i.e., memory accesses) are analyzed elsewhere. */
! if (virtual_operand_p (PHI_RESULT (phi)))
{
if (vect_print_dump_info (REPORT_DETAILS))
fprintf (vect_dump, "virtual phi. skip.");
*************** vect_update_ivs_after_vectorizer (loop_v
*** 1795,1801 ****
}
/* Skip virtual phi's. */
! if (!is_gimple_reg (PHI_RESULT (phi)))
{
if (vect_print_dump_info (REPORT_DETAILS))
fprintf (vect_dump, "virtual phi. skip.");
--- 1795,1801 ----
}
/* Skip virtual phi's. */
! if (virtual_operand_p (PHI_RESULT (phi)))
{
if (vect_print_dump_info (REPORT_DETAILS))
fprintf (vect_dump, "virtual phi. skip.");
Index: trunk/gcc/tree-vect-loop.c
===================================================================
*** trunk.orig/gcc/tree-vect-loop.c 2012-08-07 16:30:56.000000000 +0200
--- trunk/gcc/tree-vect-loop.c 2012-08-14 13:58:38.284907171 +0200
*************** vect_analyze_scalar_cycles_1 (loop_vec_i
*** 555,561 ****
/* 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))
continue;
STMT_VINFO_DEF_TYPE (stmt_vinfo) = vect_unknown_def_type;
--- 555,561 ----
/* Skip virtual phi's. The data dependences that are associated with
virtual defs/uses (i.e., memory accesses) are analyzed elsewhere. */
! if (virtual_operand_p (def))
continue;
STMT_VINFO_DEF_TYPE (stmt_vinfo) = vect_unknown_def_type;
*************** vect_analyze_scalar_cycles_1 (loop_vec_i
*** 604,611 ****
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);
nested_cycle = (loop != LOOP_VINFO_LOOP (loop_vinfo));
reduc_stmt = vect_force_simple_reduction (loop_vinfo, phi, !nested_cycle,
--- 604,611 ----
print_gimple_stmt (vect_dump, phi, 0, TDF_SLIM);
}
! 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,
Index: trunk/gcc/tree-vrp.c
===================================================================
*** trunk.orig/gcc/tree-vrp.c 2012-08-14 10:25:05.000000000 +0200
--- trunk/gcc/tree-vrp.c 2012-08-14 14:32:26.520837006 +0200
*************** remove_range_assertions (void)
*** 6142,6152 ****
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;
else if (is_gimple_assign (stmt) || is_gimple_call (stmt))
{
tree lhs = gimple_get_lhs (stmt);
--- 6142,6154 ----
static bool
stmt_interesting_for_vrp (gimple stmt)
{
! 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);
Index: trunk/gcc/value-prof.c
===================================================================
*** trunk.orig/gcc/value-prof.c 2012-08-10 11:21:02.000000000 +0200
--- trunk/gcc/value-prof.c 2012-08-14 13:55:24.370913885 +0200
*************** gimple_divmod_values_to_profile (gimple
*** 1669,1675 ****
VEC_reserve (histogram_value, heap, *values, 3);
! if (is_gimple_reg (divisor))
/* Check for the case where the divisor is the same value most
of the time. */
VEC_quick_push (histogram_value, *values,
--- 1669,1675 ----
VEC_reserve (histogram_value, heap, *values, 3);
! 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,