Commit b88b4cf8 authored by Matthias Braun's avatar Matthias Braun
Browse files

remove get_first_block_succ() function

parent dfefa17e
......@@ -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))
......
......@@ -67,10 +67,3 @@ ir_node **be_get_cfgpostorder(ir_graph *irg)
return list;
}
ir_node *get_first_block_succ(const ir_node *block)
{
const ir_edge_t *edge = get_irn_out_edge_first_kind(block, EDGE_KIND_BLOCK);
assert(edge != NULL);
return get_edge_src_irn(edge);
}
......@@ -50,12 +50,6 @@ ir_node *be_get_Proj_for_pn(const ir_node *irn, long pn);
*/
ir_node **be_get_cfgpostorder(ir_graph *irg);
/**
* convenience function to return the first successor block
* (it is often known that there is exactly 1 successor anyway)
*/
ir_node *get_first_block_succ(const ir_node *block);
static inline bool is_tls_entity(ir_entity *const ent)
{
return get_entity_owner(ent) == get_tls_type();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment