summaryrefslogtreecommitdiffhomepage
path: root/ir/stat
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2013-05-15 12:53:31 +0200
committerMatthias Braun <matze@braunis.de>2013-05-15 13:10:38 +0200
commit1d13a49e733997e6c8c2e3ca7494963ca3c74264 (patch)
tree1a4af101e65de1fa13cddcfcc3ea33e72270038b /ir/stat
parent3b01f130b7de226f90b9aab4a2832254d8c9cf92 (diff)
remove overly complicate pass management code
Nobody uses it currently, and it is a burden for everyone writing a new pass.
Diffstat (limited to 'ir/stat')
-rw-r--r--ir/stat/firmstat.c57
1 files changed, 0 insertions, 57 deletions
diff --git a/ir/stat/firmstat.c b/ir/stat/firmstat.c
index 25bdb56..1254403 100644
--- a/ir/stat/firmstat.c
+++ b/ir/stat/firmstat.c
@@ -16,7 +16,6 @@
#include "irdump.h"
#include "hashptr.h"
#include "firmstat_t.h"
-#include "irpass_t.h"
#include "pattern.h"
#include "dags.h"
#include "stat_dmp.h"
@@ -2116,62 +2115,6 @@ void stat_dump_snapshot(const char *name, const char *phase)
STAT_LEAVE;
}
-typedef struct pass_t {
- ir_prog_pass_t pass;
- const char *fname;
- const char *phase;
-} pass_t;
-
-/**
- * Wrapper to run stat_dump_snapshot() as a ir_prog wrapper.
- */
-static int stat_dump_snapshot_wrapper(ir_prog *irp, void *context)
-{
- pass_t *pass = (pass_t*)context;
-
- (void)irp;
- stat_dump_snapshot(pass->fname, pass->phase);
- return 0;
-}
-
-/**
- * Ensure that no verifier is run from the wrapper.
- */
-static int no_verify(ir_prog *prog, void *ctx)
-{
- (void)prog;
- (void)ctx;
- return 0;
-}
-
-/**
- * Ensure that no dumper is run from the wrapper.
- */
-static void no_dump(ir_prog *prog, void *ctx, unsigned idx)
-{
- (void)prog;
- (void)ctx;
- (void)idx;
-}
-
-/* create an ir_pog pass */
-ir_prog_pass_t *stat_dump_snapshot_pass(
- const char *name, const char *fname, const char *phase)
-{
- pass_t *pass = XMALLOCZ(pass_t);
-
- def_prog_pass_constructor(
- &pass->pass, name ? name : "stat_snapshot", stat_dump_snapshot_wrapper);
- pass->fname = fname;
- pass->phase = phase;
-
- /* no dump/verify */
- pass->pass.dump_irprog = no_dump;
- pass->pass.verify_irprog = no_verify;
-
- return &pass->pass;
-}
-
/** the hook entries for the Firm statistics module */
static hook_entry_t stat_hooks[hook_last];