summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beuses.c
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2014-07-22 17:48:34 +0200
committerMatthias Braun <matze@braunis.de>2014-07-22 17:53:25 +0200
commitb88b4cf89357b1762e6588ba77490a8bababc476 (patch)
tree8b6cd0a3c575887f935a34927c8ddf3f93bb6197 /ir/be/beuses.c
parentdfefa17ee279670b58f13031c78387a3ded34af1 (diff)
remove get_first_block_succ() function
Diffstat (limited to 'ir/be/beuses.c')
-rw-r--r--ir/be/beuses.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/ir/be/beuses.c b/ir/be/beuses.c
index ede56b9..6e7b319 100644
--- a/ir/be/beuses.c
+++ b/ir/be/beuses.c
@@ -127,18 +127,16 @@ static bool be_is_phi_argument(const ir_node *block, const ir_node *def)
if (get_irn_n_edges_kind(block, EDGE_KIND_BLOCK) < 1)
return false;
- ir_node *const succ_block = get_first_block_succ(block);
+ const ir_edge_t *edge = get_irn_out_edge_first_kind(block, EDGE_KIND_BLOCK);
+ ir_node *const succ_block = get_edge_src_irn(edge);
if (get_Block_n_cfgpreds(succ_block) <= 1) {
/* no Phis in the successor */
return false;
}
- /* find the index of block in its successor */
- int const i = get_Block_cfgpred_pos(succ_block, block);
- assert(i >= 0);
-
/* iterate over the Phi nodes in the successor and check if def is
* one of its arguments */
+ const int i = get_edge_src_pos(edge);
sched_foreach(succ_block, node) {
/* we can stop the search on the first non-phi node */
if (!is_Phi(node))