mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-23 21:21:31 +08:00
cfgexpand.c (expand_used_vars): Use virtual_operand_p.
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. From-SVN: r190385
This commit is contained in:
parent
1c8f737738
commit
ea057359a7
@ -1,3 +1,93 @@
|
||||
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
|
||||
|
@ -1471,7 +1471,7 @@ expand_used_vars (void)
|
||||
{
|
||||
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). */
|
||||
|
@ -2128,7 +2128,7 @@ dump_phi_nodes (pretty_printer *buffer, basic_block bb, int indent, int flags)
|
||||
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, "# ");
|
||||
|
@ -210,7 +210,7 @@ output_bb (struct output_block *ob, basic_block bb, struct function *fn)
|
||||
/* 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);
|
||||
}
|
||||
|
||||
|
@ -2110,7 +2110,7 @@ static bool
|
||||
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
|
||||
@ -2318,7 +2318,7 @@ rewrite_reductions_out_of_ssa (scop_p scop)
|
||||
{
|
||||
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;
|
||||
@ -3079,7 +3079,7 @@ rewrite_commutative_reductions_out_of_ssa_loop (scop_p scop,
|
||||
|
||||
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));
|
||||
|
@ -258,7 +258,7 @@ verify_non_ssa_vars (struct split_point *current, bitmap non_ssa_vars,
|
||||
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))
|
||||
@ -402,7 +402,7 @@ consider_split (struct split_point *current, bitmap 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++)
|
||||
{
|
||||
@ -553,7 +553,7 @@ consider_split (struct split_point *current, bitmap non_ssa_vars,
|
||||
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
|
||||
@ -804,9 +804,7 @@ visit_bb (basic_block bb, basic_block return_bb,
|
||||
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)));
|
||||
@ -830,9 +828,7 @@ visit_bb (basic_block bb, basic_block return_bb,
|
||||
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));
|
||||
@ -1158,7 +1154,7 @@ split_function (struct split_point *split_point)
|
||||
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;
|
||||
@ -1275,7 +1271,7 @@ split_function (struct split_point *split_point)
|
||||
/* 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. */
|
||||
|
@ -613,7 +613,7 @@ output_ssa_names (struct output_block *ob, struct function *fn)
|
||||
|
||||
if (ptr == NULL_TREE
|
||||
|| SSA_NAME_IN_FREE_LIST (ptr)
|
||||
|| !is_gimple_reg (ptr))
|
||||
|| virtual_operand_p (ptr))
|
||||
continue;
|
||||
|
||||
streamer_write_uhwi (ob, i);
|
||||
|
@ -480,14 +480,13 @@ rename_uses (gimple copy, htab_t rename_map, gimple_stmt_iterator *gsi_tgt,
|
||||
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;
|
||||
|
||||
@ -499,8 +498,7 @@ rename_uses (gimple copy, htab_t rename_map, gimple_stmt_iterator *gsi_tgt,
|
||||
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");
|
||||
|
||||
|
@ -1589,7 +1589,7 @@ replace_uses_by (tree name, tree val)
|
||||
/* 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;
|
||||
}
|
||||
}
|
||||
@ -1664,21 +1664,21 @@ gimple_merge_blocks (basic_block a, basic_block b)
|
||||
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
|
||||
@ -1693,7 +1693,7 @@ gimple_merge_blocks (basic_block a, basic_block b)
|
||||
/* 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;
|
||||
@ -4357,7 +4357,7 @@ verify_gimple_phi (gimple phi)
|
||||
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)))
|
||||
@ -4379,7 +4379,7 @@ verify_gimple_phi (gimple phi)
|
||||
/* 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)))
|
||||
@ -5948,7 +5948,7 @@ replace_ssa_name (tree name, struct pointer_map_t *vars_map,
|
||||
void **loc;
|
||||
tree new_name;
|
||||
|
||||
gcc_assert (is_gimple_reg (name));
|
||||
gcc_assert (!virtual_operand_p (name));
|
||||
|
||||
loc = pointer_map_contains (vars_map, name);
|
||||
|
||||
@ -6235,7 +6235,7 @@ move_block_to_fn (struct function *dest_cfun, basic_block bb,
|
||||
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). */
|
||||
|
@ -3857,7 +3857,7 @@ cleanup_empty_eh_merge_phis (basic_block new_bb, basic_block old_bb,
|
||||
}
|
||||
/* 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
|
||||
|
@ -410,7 +410,7 @@ if_convertible_phi_p (struct loop *loop, basic_block bb, gimple phi)
|
||||
/* 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;
|
||||
@ -1262,7 +1262,7 @@ predicate_scalar_phi (gimple phi, tree cond,
|
||||
|
||||
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);
|
||||
|
@ -1830,7 +1830,7 @@ update_ssa_across_abnormal_edges (basic_block bb, basic_block ret_bb,
|
||||
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;
|
||||
@ -1970,7 +1970,7 @@ copy_phis_for_bb (basic_block bb, copy_body_data *id)
|
||||
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);
|
||||
|
@ -288,7 +288,7 @@ generate_loops_for_partition (struct loop *loop, partition_t partition,
|
||||
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);
|
||||
}
|
||||
@ -492,7 +492,7 @@ destroy_loop (struct loop *loop)
|
||||
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))
|
||||
|
@ -762,7 +762,7 @@ eliminate_useless_phis (void)
|
||||
{
|
||||
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;
|
||||
@ -772,7 +772,7 @@ eliminate_useless_phis (void)
|
||||
{
|
||||
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);
|
||||
@ -1032,7 +1032,7 @@ insert_backedge_copies (void)
|
||||
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++)
|
||||
|
@ -1517,7 +1517,7 @@ transform_to_exit_first_loop (struct loop *loop, htab_t reduction_list, tree nit
|
||||
{
|
||||
phi = gsi_stmt (gsi);
|
||||
res = PHI_RESULT (phi);
|
||||
if (!is_gimple_reg (res))
|
||||
if (virtual_operand_p (res))
|
||||
{
|
||||
gsi_next (&gsi);
|
||||
continue;
|
||||
@ -1953,7 +1953,7 @@ gather_scalar_reductions (loop_p loop, htab_t reduction_list)
|
||||
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)
|
||||
@ -2019,7 +2019,7 @@ try_create_reduction_list (loop_p loop, htab_t reduction_list)
|
||||
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))
|
||||
{
|
||||
@ -2074,7 +2074,7 @@ try_create_reduction_list (loop_p loop, htab_t reduction_list)
|
||||
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;
|
||||
|
||||
|
@ -3039,7 +3039,7 @@ analyze_scalar_evolution_for_all_loop_phi_nodes (VEC(gimple,heap) **exit_conditi
|
||||
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,
|
||||
@ -3328,7 +3328,7 @@ scev_const_prop (void)
|
||||
phi = gsi_stmt (psi);
|
||||
name = PHI_RESULT (phi);
|
||||
|
||||
if (!is_gimple_reg (name))
|
||||
if (virtual_operand_p (name))
|
||||
continue;
|
||||
|
||||
type = TREE_TYPE (name);
|
||||
@ -3404,7 +3404,7 @@ scev_const_prop (void)
|
||||
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;
|
||||
|
@ -236,7 +236,6 @@ debug_lattice_value (prop_value_t val)
|
||||
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;
|
||||
|
||||
@ -248,8 +247,8 @@ get_default_value (tree var)
|
||||
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
|
||||
{
|
||||
@ -762,7 +761,7 @@ ccp_initialize (void)
|
||||
{
|
||||
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);
|
||||
|
@ -1101,7 +1101,7 @@ create_outofssa_var_map (coalesce_list_p cl, bitmap used_in_copy)
|
||||
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)
|
||||
|
@ -74,10 +74,10 @@ may_propagate_copy (tree dest, tree orig)
|
||||
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;
|
||||
}
|
||||
@ -713,7 +713,7 @@ init_copy_prop (void)
|
||||
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);
|
||||
|
@ -720,7 +720,7 @@ propagate_necessity (struct edge_list *el)
|
||||
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
|
||||
@ -1052,7 +1052,7 @@ remove_dead_phis (basic_block bb)
|
||||
|
||||
/* 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. */
|
||||
@ -1130,7 +1130,7 @@ forward_edge_to_pdom (edge e, basic_block post_dom_bb)
|
||||
|
||||
/* 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);
|
||||
@ -1391,7 +1391,7 @@ eliminate_unnecessary_stmts (void)
|
||||
|| !(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;
|
||||
|
@ -240,7 +240,7 @@ partition_view_init (var_map map)
|
||||
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);
|
||||
@ -750,7 +750,7 @@ remove_unused_locals (void)
|
||||
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);
|
||||
@ -1216,7 +1216,7 @@ void
|
||||
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);
|
||||
|
@ -356,7 +356,7 @@ movement_possibility (gimple stmt)
|
||||
|
||||
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;
|
||||
|
||||
@ -1327,7 +1327,7 @@ move_computations_stmt (struct dom_walk_data *dw_data,
|
||||
!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;
|
||||
|
@ -980,7 +980,7 @@ determine_biv_step (gimple phi)
|
||||
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))
|
||||
@ -1225,7 +1225,7 @@ record_invariant (struct ivopts_data *data, tree op, bool nonlinear_use)
|
||||
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));
|
||||
@ -1927,7 +1927,7 @@ find_interesting_uses_outside (struct ivopts_data *data, edge exit)
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
@ -5048,7 +5048,7 @@ determine_set_costs (struct ivopts_data *data)
|
||||
phi = gsi_stmt (psi);
|
||||
op = PHI_RESULT (phi);
|
||||
|
||||
if (!is_gimple_reg (op))
|
||||
if (virtual_operand_p (op))
|
||||
continue;
|
||||
|
||||
if (get_iv (data, op))
|
||||
|
@ -169,7 +169,7 @@ add_exit_phis_var (tree var, bitmap livein, bitmap exits)
|
||||
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);
|
||||
@ -243,7 +243,7 @@ find_uses_to_rename_use (basic_block bb, tree use, bitmap *use_blocks,
|
||||
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);
|
||||
@ -417,7 +417,7 @@ check_loop_closed_ssa_use (basic_block bb, tree 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);
|
||||
@ -1121,7 +1121,7 @@ rewrite_phi_with_iv (loop_p loop,
|
||||
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;
|
||||
@ -1205,7 +1205,7 @@ canonicalize_loop_ivs (struct loop *loop, tree *nit, bool bump_in_latch)
|
||||
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)
|
||||
|
@ -531,8 +531,8 @@ execute_cse_reciprocals (void)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -1820,7 +1820,8 @@ hoist_adjacent_loads (basic_block bb0, basic_block bb1,
|
||||
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);
|
||||
@ -1829,9 +1830,7 @@ hoist_adjacent_loads (basic_block bb0, basic_block bb1,
|
||||
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);
|
||||
|
@ -3803,7 +3803,7 @@ make_values_for_phi (gimple phi, basic_block block)
|
||||
|
||||
/* 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);
|
||||
@ -3853,7 +3853,7 @@ compute_avail (void)
|
||||
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);
|
||||
@ -4456,7 +4456,7 @@ eliminate (void)
|
||||
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;
|
||||
|
@ -1028,7 +1028,7 @@ substitute_and_fold (ssa_prop_get_value_fn get_value_fn,
|
||||
gimple_stmt_iterator gsi;
|
||||
|
||||
if (!name
|
||||
|| !is_gimple_reg (name))
|
||||
|| virtual_operand_p (name))
|
||||
continue;
|
||||
|
||||
def_stmt = SSA_NAME_DEF_STMT (name);
|
||||
|
@ -234,7 +234,7 @@ phi_rank (gimple stmt)
|
||||
|
||||
/* 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
|
||||
|
@ -1890,7 +1890,7 @@ strlen_enter_block (struct dom_walk_data *walk_data ATTRIBUTE_UNUSED,
|
||||
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;
|
||||
@ -1908,7 +1908,7 @@ strlen_enter_block (struct dom_walk_data *walk_data ATTRIBUTE_UNUSED,
|
||||
{
|
||||
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)
|
||||
|
@ -6589,7 +6589,7 @@ compute_points_to_sets (void)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
@ -6966,7 +6966,7 @@ ipa_pta_execute (void)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -480,7 +480,7 @@ same_succ_hash (const void *ve)
|
||||
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);
|
||||
}
|
||||
@ -834,7 +834,7 @@ release_last_vdef (basic_block bb)
|
||||
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);
|
||||
@ -1252,7 +1252,7 @@ same_phi_alternatives_1 (basic_block dest, edge e1, edge e2)
|
||||
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))
|
||||
@ -1310,7 +1310,7 @@ bb_has_non_vop_phi (basic_block bb)
|
||||
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
|
||||
@ -1432,7 +1432,7 @@ vop_phi (basic_block bb)
|
||||
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;
|
||||
}
|
||||
|
@ -204,7 +204,7 @@ record_temporary_equivalences_from_phis (edge e, VEC(tree, heap) **stack)
|
||||
|
||||
/* 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);
|
||||
|
@ -1923,8 +1923,8 @@ warn_uninitialized_phi (gimple phi, VEC(gimple, heap) **worklist,
|
||||
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);
|
||||
@ -1988,8 +1988,8 @@ execute_late_warn_uninitialized (void)
|
||||
|
||||
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)
|
||||
|
@ -642,7 +642,7 @@ verify_ssa_name (tree ssa_name, bool is_virtual)
|
||||
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;
|
||||
@ -654,7 +654,7 @@ verify_ssa_name (tree ssa_name, bool is_virtual)
|
||||
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;
|
||||
@ -864,7 +864,7 @@ verify_phi_args (gimple phi, basic_block bb, basic_block *definition_block)
|
||||
|
||||
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);
|
||||
}
|
||||
@ -938,14 +938,14 @@ verify_ssa (bool check_modified_stmt)
|
||||
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));
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -791,7 +791,7 @@ execute_optimize_stdarg (void)
|
||||
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)
|
||||
|
@ -545,7 +545,7 @@ slpeel_update_phi_nodes_for_guard1 (edge guard_edge, struct loop *loop,
|
||||
|
||||
/** 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: */
|
||||
@ -1176,12 +1176,12 @@ slpeel_tree_peel_loop_to_edge (struct loop *loop,
|
||||
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))
|
||||
{
|
||||
@ -1659,7 +1659,7 @@ vect_can_advance_ivs_p (loop_vec_info loop_vinfo)
|
||||
/* 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.");
|
||||
@ -1789,7 +1789,7 @@ vect_update_ivs_after_vectorizer (loop_vec_info loop_vinfo, tree niters,
|
||||
}
|
||||
|
||||
/* 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.");
|
||||
|
@ -555,7 +555,7 @@ vect_analyze_scalar_cycles_1 (loop_vec_info loop_vinfo, struct loop *loop)
|
||||
|
||||
/* 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;
|
||||
@ -604,8 +604,8 @@ vect_analyze_scalar_cycles_1 (loop_vec_info loop_vinfo, struct loop *loop)
|
||||
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,
|
||||
|
@ -6142,11 +6142,13 @@ remove_range_assertions (void)
|
||||
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);
|
||||
|
@ -1669,7 +1669,7 @@ gimple_divmod_values_to_profile (gimple stmt, histogram_values *values)
|
||||
|
||||
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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user