From b04699046ef5719331e05f5f9bf41d44d3ea7a4e Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Sat, 11 Oct 2008 18:35:07 +0000 Subject: [PATCH] hooks are always enabled now -> one less option [r22705] --- configure.ac | 12 ------------ firm_config.h.in | 10 ---------- include/libfirm/irhooks.h | 8 -------- ir/ir/irhooks.c | 10 ---------- ir/opt/opt_inline.c | 4 ---- 5 files changed, 44 deletions(-) diff --git a/configure.ac b/configure.ac index 630745587..84e629300 100644 --- a/configure.ac +++ b/configure.ac @@ -69,17 +69,6 @@ AC_ARG_ENABLE([profile], AC_SUBST([enable_profile_libfirm]) -dnl enable Firm hooks -dnl ------------- -AC_ARG_ENABLE([hooks], -[AS_HELP_STRING([--disable-hooks], [disable Firm hooks])], -[enable_hooks="$enableval"], [enable_hooks="yes"]) - -if test "$enable_hooks" = yes; then - FIRMCONFIG_FIRM_ENABLE_HOOKS="#define FIRM_ENABLE_HOOKS" -fi -AC_SUBST([FIRMCONFIG_FIRM_ENABLE_HOOKS]) - dnl enable Firm statistics dnl ------------- AC_ARG_ENABLE([statistics], @@ -206,7 +195,6 @@ echo " backends $BACKENDS" echo " profiling $enable_profile_libfirm" echo " debug/verifiers $enable_debug_libfirm" echo " assertions $enable_assert" -echo " hooks $enable_hooks" echo " statistics $enable_statistics" echo " ilp $enable_ilp" echo " jvm $enable_jvm" diff --git a/firm_config.h.in b/firm_config.h.in index f6240c812..f6e63627c 100644 --- a/firm_config.h.in +++ b/firm_config.h.in @@ -1,12 +1,2 @@ /* define to 1 to have wchar_t support for identifiers */ @FIRMCONFIG_FIRM_ENABLE_WCHAR@ - -/* define to enable hooks */ -@FIRMCONFIG_FIRM_ENABLE_HOOKS@ - -/* Firm statistics need hooks */ -#ifdef FIRM_STATISTICS -#ifndef FIRM_ENABLE_HOOKS -#define FIRM_ENABLE_HOOKS -#endif -#endif diff --git a/include/libfirm/irhooks.h b/include/libfirm/irhooks.h index 595551f4d..e597fe5be 100644 --- a/include/libfirm/irhooks.h +++ b/include/libfirm/irhooks.h @@ -228,8 +228,6 @@ void register_hook(hook_type_t hook, hook_entry_t *entry); */ void unregister_hook(hook_type_t hook, hook_entry_t *entry); -#ifdef FIRM_ENABLE_HOOKS - extern hook_entry_t *hooks[hook_last]; /** @@ -244,12 +242,6 @@ extern hook_entry_t *hooks[hook_last]; } \ } while (0) -#else - -#define hook_exec(what, args) - -#endif /* FIRM_ENABLE_HOOKS */ - #define hook_new_ir_op(op) hook_exec(hook_new_ir_op, (ctx, op)) #define hook_free_ir_op(op) hook_exec(hook_free_ir_op, (ctx, op)) #define hook_new_node(graph, node) hook_exec(hook_new_node, (ctx, graph, node)) diff --git a/ir/ir/irhooks.c b/ir/ir/irhooks.c index 0401fdaef..fdc922808 100644 --- a/ir/ir/irhooks.c +++ b/ir/ir/irhooks.c @@ -29,8 +29,6 @@ #include "irhooks.h" -#ifdef FIRM_ENABLE_HOOKS - /* the hooks */ hook_entry_t *hooks[hook_last]; @@ -62,14 +60,6 @@ void unregister_hook(hook_type_t hook, hook_entry_t *entry) { } } - -#else - -void register_hook(hook_type_t hook, hook_entry_t *entry) {} -void unregister_hook(hook_type_t hook, hook_entry_t *entry) {} - -#endif /* FIRM_ENABLE_HOOKS */ - int firm_init_hooks(void) { /* this strange code assures that both functions are available in a shared library even if none of them is called. diff --git a/ir/opt/opt_inline.c b/ir/opt/opt_inline.c index 66a47d955..8f5339883 100644 --- a/ir/opt/opt_inline.c +++ b/ir/opt/opt_inline.c @@ -676,10 +676,6 @@ survive_dce_t *new_survive_dce(void) { res->dead_node_elim_subst.context = res; res->dead_node_elim_subst.next = NULL; -#ifndef FIRM_ENABLE_HOOKS - assert(0 && "need hooks enabled"); -#endif - register_hook(hook_dead_node_elim, &res->dead_node_elim); register_hook(hook_dead_node_elim_subst, &res->dead_node_elim_subst); return res; -- 2.20.1