tree-flow-inline.h (phi_arg_from_edge): Remove.

* tree-flow-inline.h (phi_arg_from_edge): Remove.
	* tree-flow.h: Remove the corresponding prototype.
	* tree-ssa-operands.h, tree-ssa-threadupdate.c, tree-ssa.c,
	tree-vectorizer.c: Use dest_idx instead of phi_arg_from_edge.

From-SVN: r94183
This commit is contained in:
Kazu Hirata 2005-01-24 20:47:43 +00:00 committed by Kazu Hirata
parent 2a4d062618
commit 3a2f1f0665
7 changed files with 15 additions and 23 deletions

View File

@ -1,3 +1,10 @@
2005-01-24 Kazu Hirata <kazu@cs.umass.edu>
* tree-flow-inline.h (phi_arg_from_edge): Remove.
* tree-flow.h: Remove the corresponding prototype.
* tree-ssa-operands.h, tree-ssa-threadupdate.c, tree-ssa.c,
tree-vectorizer.c: Use dest_idx instead of phi_arg_from_edge.
2005-01-24 Jakub Jelinek <jakub@redhat.com>
PR target/17751

View File

@ -389,15 +389,6 @@ set_phi_nodes (basic_block bb, tree l)
set_bb_for_stmt (phi, bb);
}
/* Return the phi index number for an edge. */
static inline int
phi_arg_from_edge (tree phi, edge e)
{
gcc_assert (phi);
gcc_assert (TREE_CODE (phi) == PHI_NODE);
return e->dest_idx;
}
/* Mark VAR as used, so that it'll be preserved during rtl expansion. */
static inline void

View File

@ -698,7 +698,6 @@ enum move_pos
extern enum move_pos movement_possibility (tree);
/* In tree-flow-inline.h */
static inline int phi_arg_from_edge (tree, edge);
static inline bool is_call_clobbered (tree);
static inline void mark_call_clobbered (tree);
static inline void set_is_used (tree);

View File

@ -175,11 +175,9 @@ typedef stmt_operands_t *stmt_operands_p;
#define SET_PHI_ARG_DEF(PHI, I, V) \
SET_USE (PHI_ARG_DEF_PTR ((PHI), (I)), (V))
#define PHI_ARG_DEF_FROM_EDGE(PHI, E) \
PHI_ARG_DEF ((PHI), \
phi_arg_from_edge ((PHI),(E)))
PHI_ARG_DEF ((PHI), (E)->dest_idx)
#define PHI_ARG_DEF_PTR_FROM_EDGE(PHI, E) \
PHI_ARG_DEF_PTR ((PHI), \
phi_arg_from_edge ((PHI),(E)))
PHI_ARG_DEF_PTR ((PHI), (E)->dest_idx)
extern void init_ssa_operands (void);

View File

@ -298,7 +298,7 @@ create_edge_and_update_destination_phis (struct redirection_data *rd)
associated with the outgoing edge stored in RD. */
for (phi = phi_nodes (e->dest); phi; phi = PHI_CHAIN (phi))
{
int indx = phi_arg_from_edge (phi, rd->outgoing_edge);
int indx = rd->outgoing_edge->dest_idx;
add_phi_arg (phi, PHI_ARG_DEF_TREE (phi, indx), e);
}
}

View File

@ -56,18 +56,16 @@ ssa_redirect_edge (edge e, basic_block dest)
tree phi, next;
tree list = NULL, *last = &list;
tree src, dst, node;
int i;
/* Remove the appropriate PHI arguments in E's destination block. */
for (phi = phi_nodes (e->dest); phi; phi = next)
{
next = PHI_CHAIN (phi);
i = phi_arg_from_edge (phi, e);
if (PHI_ARG_DEF (phi, i) == NULL_TREE)
if (PHI_ARG_DEF (phi, e->dest_idx) == NULL_TREE)
continue;
src = PHI_ARG_DEF (phi, i);
src = PHI_ARG_DEF (phi, e->dest_idx);
dst = PHI_RESULT (phi);
node = build_tree_list (dst, src);
*last = node;

View File

@ -523,7 +523,7 @@ slpeel_update_phis_for_duplicate_loop (struct loop *orig_loop,
{
gcc_assert (new_loop_exit_e == orig_entry_e);
SET_PHI_ARG_DEF (phi_orig,
phi_arg_from_edge (phi_orig, new_loop_exit_e),
new_loop_exit_e->dest_idx,
new_ssa_name);
}
}
@ -639,8 +639,7 @@ slpeel_update_phi_nodes_for_guard (edge guard_edge,
/* 3. Update phi in successor block. */
gcc_assert (PHI_ARG_DEF_FROM_EDGE (update_phi, e) == loop_arg
|| PHI_ARG_DEF_FROM_EDGE (update_phi, e) == guard_arg);
SET_PHI_ARG_DEF (update_phi, phi_arg_from_edge (update_phi, e),
PHI_RESULT (new_phi));
SET_PHI_ARG_DEF (update_phi, e->dest_idx, PHI_RESULT (new_phi));
}
set_phi_nodes (new_merge_bb, phi_reverse (phi_nodes (new_merge_bb)));
@ -3188,7 +3187,7 @@ vect_update_ivs_after_vectorizer (struct loop *loop, tree niters, edge update_e)
/* Fix phi expressions in the successor bb. */
gcc_assert (PHI_ARG_DEF_FROM_EDGE (phi1, update_e) ==
PHI_ARG_DEF_FROM_EDGE (phi, EDGE_SUCC (loop->latch, 0)));
SET_PHI_ARG_DEF (phi1, phi_arg_from_edge (phi1, update_e), ni_name);
SET_PHI_ARG_DEF (phi1, update_e->dest_idx, ni_name);
}
}