From 934b9a7fdee6aebfcae2203a0894fde6f3affd84 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Christian=20W=C3=BCrdig?= Date: Mon, 10 Apr 2006 09:24:16 +0000 Subject: [PATCH] fixed be_sched_ready statistics --- ir/be/bestat.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ir/be/bestat.c b/ir/be/bestat.c index 030d8cf12..ab415d61a 100644 --- a/ir/be/bestat.c +++ b/ir/be/bestat.c @@ -10,6 +10,9 @@ #include "belive_t.h" #include "besched.h" +#undef MIN +#define MIN(a, b) (a < b ? a : b) + /** * Collect reg pressure statistics per block and per class. */ @@ -49,5 +52,5 @@ void be_do_stat_reg_pressure(be_irg_t *birg) { * Notify statistic module about amount of ready nodes. */ void be_do_stat_sched_ready(ir_node *block, nodeset *ready_set) { - hook_be_block_sched_ready(block, get_irn_irg(block), nodeset_count(ready_set)); + hook_be_block_sched_ready(block, get_irn_irg(block), MIN(nodeset_count(ready_set), 5)); } -- 2.20.1