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
806e4c72
Commit
806e4c72
authored
Jul 13, 2012
by
Christoph Mallon
Browse files
Use foreach_ir_nodeset() instead of reimplementing it.
parent
406d820e
Changes
2
Hide whitespace changes
Inline
Side-by-side
ir/be/beschedrand.c
View file @
806e4c72
...
...
@@ -43,8 +43,7 @@ static ir_node *random_select(void *block_env, ir_nodeset_t *ready_set)
(
void
)
block_env
;
/* assure that branches and constants are executed last */
ir_nodeset_iterator_init
(
&
iter
,
ready_set
);
while
(
(
irn
=
ir_nodeset_iterator_next
(
&
iter
))
!=
NULL
)
{
foreach_ir_nodeset
(
ready_set
,
irn
,
iter
)
{
if
(
!
is_cfop
(
irn
))
{
only_branches_left
=
0
;
break
;
...
...
@@ -60,8 +59,7 @@ static ir_node *random_select(void *block_env, ir_nodeset_t *ready_set)
/* take 1 random node */
int
n
=
rand
()
%
ir_nodeset_size
(
ready_set
);
int
i
=
0
;
ir_nodeset_iterator_init
(
&
iter
,
ready_set
);
while
((
irn
=
ir_nodeset_iterator_next
(
&
iter
))
!=
NULL
)
{
foreach_ir_nodeset
(
ready_set
,
irn
,
iter
)
{
if
(
i
==
n
)
{
break
;
}
...
...
ir/be/beschedregpress.c
View file @
806e4c72
...
...
@@ -266,8 +266,7 @@ static ir_node *reg_pressure_select(void *block_env, ir_nodeset_t *ready_set)
assert
(
ir_nodeset_size
(
ready_set
)
>
0
);
ir_nodeset_iterator_init
(
&
iter
,
ready_set
);
while
(
(
irn
=
ir_nodeset_iterator_next
(
&
iter
))
!=
NULL
)
{
foreach_ir_nodeset
(
ready_set
,
irn
,
iter
)
{
/*
Ignore branch instructions for the time being.
They should only be scheduled if there is nothing else.
...
...
Write
Preview
Supports
Markdown
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