summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bestat.c
diff options
context:
space:
mode:
authorChristoph Mallon <mallon@cs.uni-saarland.de>2015-07-07 03:04:54 +0200
committerChristoph Mallon <mallon@cs.uni-saarland.de>2015-07-07 14:33:19 +0200
commit2f0eeca3751e8628584a6a51c40c4a71b6051c37 (patch)
tree144955a169e33dbbe03e144200679ae859a5a48c /ir/be/bestat.c
parent605f090a89439312aefdc8e01b209a6596ae9390 (diff)
be: Add and use macros to iterate only/all nodes except Phis in the schedule.
Diffstat (limited to 'ir/be/bestat.c')
-rw-r--r--ir/be/bestat.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/ir/be/bestat.c b/ir/be/bestat.c
index 579c9ea..e114fa2 100644
--- a/ir/be/bestat.c
+++ b/ir/be/bestat.c
@@ -46,14 +46,9 @@ static void check_reg_pressure_class(pressure_walker_env_t *env,
unsigned max_live = ir_nodeset_size(&live_nodes);
env->regpressure += max_live;
- sched_foreach_reverse(block, irn) {
- size_t cnt;
-
- if (is_Phi(irn))
- break;
-
+ sched_foreach_non_phi_reverse(block, irn) {
be_liveness_transfer(cls, irn, &live_nodes);
- cnt = ir_nodeset_size(&live_nodes);
+ size_t const cnt = ir_nodeset_size(&live_nodes);
max_live = MAX(max_live, cnt);
env->regpressure += cnt;
env->insn_count++;