From: Christian Würdig Date: Tue, 18 Apr 2006 17:10:05 +0000 (+0000) Subject: removed MIN/MAX macros (in irtools.h now) X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=53fa28a8a2f2d5a66b260ff6e36dd090c5ea1c2b;p=libfirm removed MIN/MAX macros (in irtools.h now) --- diff --git a/ir/be/belistsched.c b/ir/be/belistsched.c index bffc8855a..aecf3201a 100644 --- a/ir/be/belistsched.c +++ b/ir/be/belistsched.c @@ -28,6 +28,7 @@ #include "irprintf_t.h" #include "array.h" #include "debug.h" +#include "irtools.h" #include "besched_t.h" #include "beutil.h" @@ -37,9 +38,6 @@ #include "bearch.h" #include "bestat.h" -#define MAX(x,y) ((x) > (y) ? (x) : (y)) -#define MIN(x,y) ((x) < (y) ? (x) : (y)) - /** * All scheduling info needed per node. */ diff --git a/ir/be/bestat.c b/ir/be/bestat.c index cb47c077a..c7d181b40 100644 --- a/ir/be/bestat.c +++ b/ir/be/bestat.c @@ -15,14 +15,12 @@ #include "irhooks.h" #include "dbginfo_t.h" #include "firmstat_t.h" +#include "irtools.h" #include "bestat.h" #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,7 +47,7 @@ static void stat_reg_pressure_block(ir_node *block, void *env) { max_live = cnt < max_live ? max_live : cnt; } - stat_be_block_regpressure(birg->irg, block, max_live, cls->name); + stat_be_block_regpressure(birg->irg, block, MIN(max_live, 5), cls->name); } }