remove impl.h - stupid concept leading to unreadable code which was only used in...
authorMatthias Braun <matze@braunis.de>
Wed, 19 May 2010 12:03:55 +0000 (12:03 +0000)
committerMatthias Braun <matze@braunis.de>
Wed, 19 May 2010 12:03:55 +0000 (12:03 +0000)
[r27547]

include/libfirm/adt/impl.h [deleted file]
ir/be/belive.c
ir/be/bera.c
ir/be/besched.c

diff --git a/include/libfirm/adt/impl.h b/include/libfirm/adt/impl.h
deleted file mode 100644 (file)
index 6fc029d..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
- *
- * This file is part of libFirm.
- *
- * This file may be distributed and/or modified under the terms of the
- * GNU General Public License version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * Licensees holding valid libFirm Professional Edition licenses may use
- * this file in accordance with the libFirm Commercial License.
- * Agreement provided with the Software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE.
- */
-
-/**
- * @file
- * @brief  Some macros for wrapper function implementation. (WARNING deprecated)
- * @author Sebastian Hack
- * @date   9.12.2004
- *
- * Please don't use these macros, they make the code unnecessarily unreadable!
- */
-#ifndef FIRM_ADT_IMPL_H
-#define FIRM_ADT_IMPL_H
-
-#define _MANGLE(prefix,name)           prefix ## name
-
-#define INTERNAL(name)                                 _MANGLE(_, name)
-
-
-#define _HEAD1(name,res,t1) \
-       res (name)(t1 p1)
-
-#define _HEAD2(name,res,t1,t2) \
-       res (name)(t1 p1, t2 p2)
-
-#define _HEAD3(name,res,t1,t2,t3) \
-       res (name)(t1 p1, t2 p2, t3 p3)
-
-#define _HEAD4(name,res,t1,t2,t3,t4) \
-       res (name)(t1 p1, t2 p2, t3 p3, t4 p4)
-
-
-#define _IMPL1(name,prefix,ret,res,t1) \
-_HEAD1(name, res, t1) { \
-       ret prefix ## name (p1); \
-}
-
-#define _IMPL2(name,prefix,ret,res,t1,t2) \
-_HEAD2(name, res, t1, t2) { \
-       ret prefix ## name (p1, p2); \
-}
-
-#define _IMPL3(name,prefix,ret,res,t1,t2,t3) \
-_HEAD3(name, res, t1, t2, t3) { \
-       ret prefix ## name (p1, p2, p3); \
-}
-
-#define _IMPL4(name,prefix,ret,res,t1,t2,t3,t4) \
-_HEAD4(name, res, t1, t2, t3, t4) { \
-       ret prefix ## name (p1, p2, p3, p4); \
-}
-
-#define IMPL1_VOID(name,prefix,t1) \
-  _IMPL1(name, prefix, (void), void, t1)
-
-#define IMPL2_VOID(name,prefix,t1,t2) \
-  _IMPL2(name, prefix, (void), void, t1, t2)
-
-#define IMPL3_VOID(name,prefix,t1,t2,t3) \
-  _IMPL3(name, prefix, (void), void, t1, t2, t3)
-
-#define IMPL4_VOID(name,prefix,t1,t2,t3,t4) \
-  _IMPL4(name, prefix, (void), void, t1, t2, t3, t4)
-
-
-#define IMPL1(name,type,prefix,t1) \
-  _IMPL1(name, prefix, return, type, t1)
-
-#define IMPL2(name,type,prefix,t1,t2) \
-  _IMPL2(name, prefix, return, type, t1, t2)
-
-#define IMPL3(name,type,prefix,t1,t2,t3) \
-  _IMPL3(name, prefix, return, type, t1, t2, t3)
-
-#define IMPL4(name,type,prefix,t1,t2,t3,t4) \
-  _IMPL4(name, prefix, return, type, t1, t2, t3, t4)
-
-
-#define FIRM_IMPL1(name,type,t1) \
-  _IMPL1(name, _, return, type, t1)
-
-#define FIRM_IMPL2(name,type,t1,t2) \
-  _IMPL2(name, _, return, type, t1, t2)
-
-#define FIRM_IMPL3(name,type,t1,t2,t3) \
-  _IMPL3(name, _, return, type, t1, t2, t3)
-
-#define FIRM_IMPL4(name,type,t1,t2,t3,t4) \
-  _IMPL4(name, _, return, type, t1, t2, t3, t4)
-
-
-#define FIRM_IMPL1_VOID(name,t1) \
-  _IMPL1(name, _, (void), void, t1)
-
-#define FIRM_IMPL2_VOID(name,t1,t2) \
-  _IMPL2(name, _, (void), void, t1, t2)
-
-#define FIRM_IMPL3_VOID(name,t1,t2,t3) \
-  _IMPL3(name, _, (void), void, t1, t2, t3)
-
-#define FIRM_IMPL4_VOID(name,t1,t2,t3,t4) \
-  _IMPL4(name, _, (void), void, t1, t2, t3, t4)
-
-#define FIRM_PROTO1(name,type,t1)                                              _HEAD1(name, type, t1)
-#define FIRM_PROTO2(name,type,t1,t2)                                   _HEAD2(name, type, t1, t2)
-#define FIRM_PROTO3(name,type,t1,t2,t3)                        _HEAD3(name, type, t1, t2, t3)
-#define FIRM_PROTO4(name,type,t1,t2,t3,t4)             _HEAD4(name, type, t1, t2, t3, t4)
-
-#endif
index 198c98e..22dde36 100644 (file)
@@ -29,7 +29,6 @@
 /* statev is expensive here, only enable when needed */
 #define DISABLE_STATEV
 
-#include "impl.h"
 #include "iredges_t.h"
 #include "irgwalk.h"
 #include "irprintf_t.h"
index 4e408d8..1b333fd 100644 (file)
@@ -29,7 +29,6 @@
 #include <stdlib.h>
 
 #include "pset.h"
-#include "impl.h"
 
 #include "irnode.h"
 #include "irmode.h"
index 3bf0b69..fbe6599 100644 (file)
@@ -27,7 +27,6 @@
 
 #include <stdlib.h>
 
-#include "impl.h"
 #include "irprintf.h"
 #include "irgwalk.h"
 #include "firm_types.h"
 #include "belistsched.h"
 #include "belive.h"
 
-FIRM_IMPL1(have_sched_info, int, const ir_graph *)
-FIRM_IMPL1(sched_get_time_step, int, const ir_node *)
-FIRM_IMPL1(sched_has_next, int, const ir_node *)
-FIRM_IMPL1(sched_has_prev, int, const ir_node *)
-FIRM_IMPL1(sched_next, ir_node *, const ir_node *)
-FIRM_IMPL1(sched_prev, ir_node *, const ir_node *)
-FIRM_IMPL1(sched_is_scheduled, int, const ir_node *)
-FIRM_IMPL1(sched_first, ir_node *, const ir_node *)
-FIRM_IMPL1(sched_last, ir_node *, const ir_node *)
-FIRM_IMPL2_VOID(sched_add_after, ir_node *, ir_node *)
-FIRM_IMPL2_VOID(sched_add_before, ir_node *, ir_node *)
-FIRM_IMPL1_VOID(sched_init_block, ir_node *)
-FIRM_IMPL1_VOID(sched_remove, ir_node *)
-FIRM_IMPL1_VOID(sched_reset, ir_node *)
-FIRM_IMPL2(sched_comes_after, int, const ir_node *, const ir_node *)
-
 size_t sched_irn_data_offset = 0;
 
 static void block_sched_dumper(ir_node *block, void *env)
@@ -188,3 +171,78 @@ void be_remove_dead_nodes_from_schedule(be_irg_t *birg)
        // walk schedule and remove non-marked nodes
        irg_block_walk_graph(irg, remove_dead_nodes_walker, NULL, &env);
 }
+
+int (have_sched_info)(const ir_graph *irg)
+{
+       return _have_sched_info(irg);
+}
+
+int (sched_get_time_step)(const ir_node *node)
+{
+       return _sched_get_time_step(node);
+}
+
+int (sched_has_next)(const ir_node *node)
+{
+       return _sched_has_next(node);
+}
+
+int (sched_has_prev)(const ir_node *node)
+{
+       return _sched_has_prev(node);
+}
+
+ir_node *(sched_next)(const ir_node *node)
+{
+       return _sched_next(node);
+}
+
+ir_node *(sched_prev)(const ir_node *node)
+{
+       return _sched_prev(node);
+}
+
+int (sched_is_scheduled)(const ir_node *node)
+{
+       return _sched_is_scheduled(node);
+}
+
+ir_node *(sched_first)(const ir_node *node)
+{
+       return _sched_first(node);
+}
+
+ir_node *(sched_last)(const ir_node *node)
+{
+       return _sched_last(node);
+}
+
+void (sched_add_after)(ir_node *after, ir_node *node)
+{
+       _sched_add_after(after, node);
+}
+
+void (sched_add_before)(ir_node *before, ir_node *node)
+{
+       _sched_add_before(before, node);
+}
+
+void (sched_init_block)(ir_node *block)
+{
+       _sched_init_block(block);
+}
+
+void (sched_remove)(ir_node *node)
+{
+       _sched_remove(node);
+}
+
+void (sched_reset)(ir_node *node)
+{
+       _sched_reset(node);
+}
+
+int (sched_comes_after)(const ir_node *n1, const ir_node *n2)
+{
+       return _sched_comes_after(n1, n2);
+}