summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beschedtrivial.c
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2007-03-26 10:47:47 +0200
committerMatthias Braun <matze@braunis.de>2007-03-26 10:47:47 +0200
commit311439dee8e33414f35d7b262c5c49c52f4108d6 (patch)
treea0fa01f9541254b1bd092b54a1a6c5eab98e2402 /ir/be/beschedtrivial.c
parent998d700931b44a15f1d20dad120d1c47c3c1cbb5 (diff)
use ir_nodeset in scheduler
Diffstat (limited to 'ir/be/beschedtrivial.c')
-rw-r--r--ir/be/beschedtrivial.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ir/be/beschedtrivial.c b/ir/be/beschedtrivial.c
index 80f1156..645fe18 100644
--- a/ir/be/beschedtrivial.c
+++ b/ir/be/beschedtrivial.c
@@ -5,7 +5,7 @@
* @cvs-id $Id$
*/
#ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
#endif
#include <stdlib.h>
@@ -18,22 +18,22 @@
* Just assure that branches are executed last, otherwise select
* the first node ready.
*/
-static ir_node *trivial_select(void *block_env, nodeset *ready_set, nodeset *live_set)
+static ir_node *trivial_select(void *block_env, ir_nodeset_t *ready_set, ir_nodeset_t *live_set)
{
const arch_env_t *arch_env = block_env;
ir_node *irn = NULL;
+ ir_nodeset_iterator_t iter;
/* assure that branches and constants are executed last */
- for (irn = nodeset_first(ready_set); irn; irn = nodeset_next(ready_set)) {
+ foreach_ir_nodeset(ready_set, irn, iter) {
if (! arch_irn_class_is(arch_env, irn, branch)) {
- nodeset_break(ready_set);
return irn;
}
}
/* at last: schedule branches */
- irn = nodeset_first(ready_set);
- nodeset_break(ready_set);
+ ir_nodeset_iterator_init(&iter, ready_set);
+ irn = ir_nodeset_iterator_next(&iter);
return irn;
}