Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
b88b4cf8
Commit
b88b4cf8
authored
Jul 22, 2014
by
Matthias Braun
Browse files
remove get_first_block_succ() function
parent
dfefa17e
Changes
3
Hide whitespace changes
Inline
Side-by-side
ir/be/beuses.c
View file @
b88b4cf8
...
...
@@ -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
))
...
...
ir/be/beutil.c
View file @
b88b4cf8
...
...
@@ -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
);
}
ir/be/beutil.h
View file @
b88b4cf8
...
...
@@ -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
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment