aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/tree-flow-inline.h9
-rw-r--r--gcc/tree-flow.h1
-rw-r--r--gcc/tree-ssa-operands.h6
-rw-r--r--gcc/tree-ssa-threadupdate.c2
-rw-r--r--gcc/tree-ssa.c6
-rw-r--r--gcc/tree-vectorizer.c7
7 files changed, 15 insertions, 23 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d0ecd6e..b701448 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h
index b6bcb65..e2204d5 100644
--- a/gcc/tree-flow-inline.h
+++ b/gcc/tree-flow-inline.h
@@ -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
diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h
index f97435a..55ff2e7 100644
--- a/gcc/tree-flow.h
+++ b/gcc/tree-flow.h
@@ -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);
diff --git a/gcc/tree-ssa-operands.h b/gcc/tree-ssa-operands.h
index c5e6220..aa36943 100644
--- a/gcc/tree-ssa-operands.h
+++ b/gcc/tree-ssa-operands.h
@@ -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);
diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c
index d5272d5..92436a9 100644
--- a/gcc/tree-ssa-threadupdate.c
+++ b/gcc/tree-ssa-threadupdate.c
@@ -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);
}
}
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c
index aa6f523..d7fa593 100644
--- a/gcc/tree-ssa.c
+++ b/gcc/tree-ssa.c
@@ -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;
diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c
index 7b0e3f3..d0892bc 100644
--- a/gcc/tree-vectorizer.c
+++ b/gcc/tree-vectorizer.c
@@ -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);
}
}