From 15f5fef710e24321a27905b26a5dc1fcbabd9b1f Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Sun, 28 Sep 2008 18:12:08 +0000 Subject: [PATCH] disable some expensive statevs [r22327] --- ir/ana/dfs.c | 2 ++ ir/be/becopyheur4.c | 2 ++ ir/be/beintlive_t.h | 5 +---- ir/be/belive.c | 3 +++ ir/stat/statev.c | 2 +- ir/stat/statev.h | 2 +- 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ir/ana/dfs.c b/ir/ana/dfs.c index 209ff084d..7374cf478 100644 --- a/ir/ana/dfs.c +++ b/ir/ana/dfs.c @@ -32,6 +32,8 @@ #include +#define DISABLE_STATEV + #include #include "irtools.h" #include "irprintf.h" diff --git a/ir/be/becopyheur4.c b/ir/be/becopyheur4.c index bfad18be7..e9d20a3f5 100644 --- a/ir/be/becopyheur4.c +++ b/ir/be/becopyheur4.c @@ -33,6 +33,8 @@ #include "config.h" #endif /* HAVE_CONFIG_H */ +#define DISABLE_STATEV + #include #include "array.h" diff --git a/ir/be/beintlive_t.h b/ir/be/beintlive_t.h index ee02f2143..b8eb841da 100644 --- a/ir/be/beintlive_t.h +++ b/ir/be/beintlive_t.h @@ -115,8 +115,6 @@ static INLINE int _lv_values_interfere(const be_lv_t *lv, const ir_node *a, cons int b2a = _value_dominates(b, a); int res = 0; - stat_ev_ctx_push("beintlive"); - /* * Adjust a and b so, that a dominates b if * a dominates b or vice versa. @@ -133,7 +131,7 @@ static INLINE int _lv_values_interfere(const be_lv_t *lv, const ir_node *a, cons const ir_edge_t *edge; ir_node *bb = get_nodes_block(b); - stat_ev_dbl("beintlive_ignore", arch_irn_is(lv->birg->main_env->arch_env, a, ignore)); + //stat_ev_dbl("beintlive_ignore", arch_irn_is(lv->birg->main_env->arch_env, a, ignore)); /* * If a is live end in b's block it is @@ -165,7 +163,6 @@ static INLINE int _lv_values_interfere(const be_lv_t *lv, const ir_node *a, cons } end: - stat_ev_ctx_pop("beintlive"); return res; } diff --git a/ir/be/belive.c b/ir/be/belive.c index 8a81f54dc..ead176e0e 100644 --- a/ir/be/belive.c +++ b/ir/be/belive.c @@ -28,6 +28,9 @@ #include "config.h" #endif +/* statev is expensive here, only enable when needed */ +#define DISABLE_STATEV + #include "impl.h" #include "iredges_t.h" #include "irgwalk.h" diff --git a/ir/stat/statev.c b/ir/stat/statev.c index b628ad1f9..8ca9a0f02 100644 --- a/ir/stat/statev.c +++ b/ir/stat/statev.c @@ -104,7 +104,7 @@ static INLINE int key_matches(const char *key) void stat_ev_printf(char ev, const char *key, const char *fmt, ...) { - if (ev == 'E' && !key_matches(key)) + if (!key_matches(key)) return; mfprintf(stat_ev_file, "%c;%s", ev, key); diff --git a/ir/stat/statev.h b/ir/stat/statev.h index 3f32e717d..7655394a1 100644 --- a/ir/stat/statev.h +++ b/ir/stat/statev.h @@ -28,7 +28,7 @@ #ifndef FIRM_STATEVENT_H #define FIRM_STATEVENT_H -#ifndef FIRM_STATISTICS +#if !defined(FIRM_STATISTICS) || defined(DISABLE_STATEV) #define stat_ev_do(expr) #define stat_ev_if if (0) -- 2.20.1