summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bespilldaemel.c
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2014-02-13 16:38:46 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2014-02-17 14:11:15 +0100
commit0ea8b7276a18cf5cdaa89cf6b054faa60086f9a0 (patch)
tree01d0462aed83d8b63097e7091b1feafde5f683b1 /ir/be/bespilldaemel.c
parentcc281f880e6e186609e3c0222dca4dfca968f1f6 (diff)
Add and use foreach_irn_pred{,_r}().
Diffstat (limited to 'ir/be/bespilldaemel.c')
-rw-r--r--ir/be/bespilldaemel.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/ir/be/bespilldaemel.c b/ir/be/bespilldaemel.c
index 53459d4..8fad8cb 100644
--- a/ir/be/bespilldaemel.c
+++ b/ir/be/bespilldaemel.c
@@ -188,9 +188,7 @@ static void do_spilling(ir_nodeset_t *live_nodes, ir_node *node)
/* make sure the node is not an argument of the instruction */
bool is_use = false;
- int arity = get_irn_arity(node);
- for (int i = 0; i < arity; ++i) {
- ir_node *in = get_irn_n(node, i);
+ foreach_irn_in(node, i, in) {
if (in == cand_node) {
is_use = true;
break;
@@ -220,10 +218,7 @@ static void remove_defs(ir_node *node, ir_nodeset_t *nodeset)
static void add_uses(ir_node *node, ir_nodeset_t *nodeset)
{
- int arity = get_irn_arity(node);
- for (int i = 0; i < arity; ++i) {
- ir_node *op = get_irn_n(node, i);
-
+ foreach_irn_in(node, i, op) {
if (arch_irn_consider_in_reg_alloc(cls, op) &&
!bitset_is_set(spilled_nodes, get_irn_idx(op))) {
ir_nodeset_insert(nodeset, op);