summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bechordal_common.c
diff options
context:
space:
mode:
authorMatthias Braun <matthias.braun@kit.edu>2012-07-13 23:04:41 +0200
committerMatthias Braun <matthias.braun@kit.edu>2012-07-16 15:50:30 +0200
commit3c2c8da0b29805ca3ce8a17cc23a60ffaa6e0ec1 (patch)
tree1cbdfa0a6226caa0f9a17411679d102e6f499822 /ir/be/bechordal_common.c
parent3d61544bd177bdb8c880ee87f5cdad2b7d1606e5 (diff)
simplify + optimize be_lv_foreach
Diffstat (limited to 'ir/be/bechordal_common.c')
-rw-r--r--ir/be/bechordal_common.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/ir/be/bechordal_common.c b/ir/be/bechordal_common.c
index 648df2d..2d60273 100644
--- a/ir/be/bechordal_common.c
+++ b/ir/be/bechordal_common.c
@@ -116,7 +116,6 @@ void create_borders(ir_node *block, void *env_ptr)
bitset_t *live = bitset_malloc(get_irg_last_idx(env->irg));
be_lv_t *lv = be_get_irg_liveness(env->irg);
- int i, n;
unsigned step = 0;
unsigned pressure = 0;
struct list_head *head;
@@ -133,8 +132,7 @@ void create_borders(ir_node *block, void *env_ptr)
* Make final uses of all values live out of the block.
* They are necessary to build up real intervals.
*/
- be_lv_foreach(lv, block, be_lv_state_end, i) {
- ir_node *irn = be_lv_get_irn(lv, block, i);
+ be_lv_foreach(lv, block, be_lv_state_end, irn) {
if (has_reg_class(env, irn)) {
DBG((dbg, LEVEL_3, "\tMaking live: %+F/%d\n", irn, get_irn_idx(irn)));
bitset_set(live, get_irn_idx(irn));
@@ -183,7 +181,7 @@ void create_borders(ir_node *block, void *env_ptr)
* If the node is no phi node we can examine the uses.
*/
if (!is_Phi(irn)) {
- for (i = 0, n = get_irn_arity(irn); i < n; ++i) {
+ for (int i = 0, n = get_irn_arity(irn); i < n; ++i) {
ir_node *op = get_irn_n(irn, i);
if (has_reg_class(env, op)) {