* 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
+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
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
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);
#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);
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);
}
}
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;
{
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);
}
}
/* 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)));
/* 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);
}
}