reorganize backend headers (kill some _t variants in favor of a be_types.h)
authorMatthias Braun <matze@braunis.de>
Wed, 5 Aug 2009 10:53:46 +0000 (10:53 +0000)
committerMatthias Braun <matze@braunis.de>
Wed, 5 Aug 2009 10:53:46 +0000 (10:53 +0000)
[r26317]

118 files changed:
ir/be/TEMPLATE/TEMPLATE_emitter.h
ir/be/TEMPLATE/TEMPLATE_map_regs.h
ir/be/TEMPLATE/TEMPLATE_new_nodes.c
ir/be/TEMPLATE/TEMPLATE_nodes_attr.h
ir/be/TEMPLATE/bearch_TEMPLATE.c
ir/be/TEMPLATE/bearch_TEMPLATE.h
ir/be/arm/arm_emitter.c
ir/be/arm/arm_emitter.h
ir/be/arm/arm_map_regs.h
ir/be/arm/arm_new_nodes.c
ir/be/arm/arm_nodes_attr.h
ir/be/arm/arm_transform.c
ir/be/arm/bearch_arm.c
ir/be/arm/bearch_arm.h
ir/be/be_dbgout_t.h
ir/be/be_t.h
ir/be/be_types.h [new file with mode: 0644]
ir/be/beabi.c
ir/be/beabi.h
ir/be/beabi_t.h [deleted file]
ir/be/bearch.c
ir/be/bearch.h
ir/be/bearch_t.h [deleted file]
ir/be/bechordal.c
ir/be/bechordal_draw.c
ir/be/bechordal_main.c
ir/be/becopyheur.c
ir/be/becopyheur2.c
ir/be/becopyilp.c
ir/be/becopyilp2.c
ir/be/becopyopt.c
ir/be/becopyopt_t.h
ir/be/becopystat.c
ir/be/becopystat.h
ir/be/bedomfront.h
ir/be/beflags.c
ir/be/beifg.c
ir/be/beifg_clique.c
ir/be/beifg_list.c
ir/be/beifg_std.c
ir/be/beilpsched.c
ir/be/beilpsched.h
ir/be/beinfo.c
ir/be/beinfo.h
ir/be/beinsn.c
ir/be/beintlive_t.h
ir/be/beirg.c
ir/be/beirg.h
ir/be/beirg_t.h [deleted file]
ir/be/beirgmod.c
ir/be/belistsched.c
ir/be/belistsched.h
ir/be/belive.c
ir/be/belive.h
ir/be/beloopana.c
ir/be/belower.c
ir/be/bemachine.h
ir/be/bemain.c
ir/be/benewalloc.c
ir/be/benode.c
ir/be/bepeephole.c
ir/be/bepeephole.h
ir/be/bepressurestat.c
ir/be/bera.c
ir/be/besched.c
ir/be/besched.h
ir/be/besched_t.h [deleted file]
ir/be/beschedmris.c
ir/be/beschednormal.c
ir/be/beschedrand.c
ir/be/beschedregpress.c
ir/be/beschedrss.c
ir/be/beschedtrace.c
ir/be/bespill.c
ir/be/bespillbelady.c
ir/be/bespillbelady2.c
ir/be/bespillbelady3.c
ir/be/bespilldaemel.c
ir/be/bespilloptions.c
ir/be/bespillslots.c
ir/be/bessaconstr.c
ir/be/bessadestr.c
ir/be/bestat.c
ir/be/bestate.c
ir/be/bestate.h
ir/be/betranshlp.c
ir/be/beuses.c
ir/be/beutil.c
ir/be/beutil.h
ir/be/beverify.c
ir/be/ia32/bearch_ia32.c
ir/be/ia32/ia32_address_mode.c
ir/be/ia32/ia32_common_transform.c
ir/be/ia32/ia32_emitter.c
ir/be/ia32/ia32_finish.c
ir/be/ia32/ia32_fpu.c
ir/be/ia32/ia32_map_regs.h
ir/be/ia32/ia32_new_nodes.c
ir/be/ia32/ia32_nodes_attr.h
ir/be/ia32/ia32_optimize.c
ir/be/ia32/ia32_spec.pl
ir/be/ia32/ia32_transform.c
ir/be/ia32/ia32_x87.c
ir/be/mips/bearch_mips.c
ir/be/mips/bearch_mips.h
ir/be/mips/mips_map_regs.h
ir/be/mips/mips_new_nodes.c
ir/be/mips/mips_nodes_attr.h
ir/be/mips/mips_scheduler.c
ir/be/mips/mips_scheduler.h
ir/be/mips/mips_transform.c
ir/be/ppc32/bearch_ppc32.c
ir/be/ppc32/bearch_ppc32.h
ir/be/ppc32/ppc32_emitter.c
ir/be/ppc32/ppc32_emitter.h
ir/be/ppc32/ppc32_map_regs.h
ir/be/ppc32/ppc32_new_nodes.c
ir/be/ppc32/ppc32_nodes_attr.h

index 4ec68ae..5e5715c 100644 (file)
@@ -29,7 +29,7 @@
 #include "irnode.h"
 #include "debug.h"
 
-#include "../bearch_t.h"
+#include "../bearch.h"
 #include "../beemitter.h"
 
 #include "bearch_TEMPLATE_t.h"
index 8528877..c23f8ed 100644 (file)
@@ -28,7 +28,7 @@
 #include "irnode.h"
 #include "set.h"
 
-#include "../bearch_t.h"
+#include "../bearch.h"
 #include "TEMPLATE_nodes_attr.h"
 
 int  TEMPLATE_cmp_irn_reg_assoc(const void *a, const void *b, size_t len);
index 2bd153e..be6f09b 100644 (file)
@@ -39,7 +39,7 @@
 #include "irprintf.h"
 #include "xmalloc.h"
 
-#include "../bearch_t.h"
+#include "../bearch.h"
 
 #include "TEMPLATE_nodes_attr.h"
 #include "TEMPLATE_new_nodes.h"
index d1fda2f..fece347 100644 (file)
@@ -25,7 +25,7 @@
 #ifndef FIRM_BE_TEMPLATE_TEMPLATE_NODES_ATTR_H
 #define FIRM_BE_TEMPLATE_TEMPLATE_NODES_ATTR_H
 
-#include "../bearch_t.h"
+#include "../bearch.h"
 
 typedef struct TEMPLATE_attr_t  TEMPLATE_attr_t;
 
index 1ab3ca6..bf6a46d 100644 (file)
 #include "bitset.h"
 #include "debug.h"
 
-#include "../bearch_t.h"
+#include "be.h"
+#include "../bearch.h"
 #include "../benode_t.h"
 #include "../belower.h"
-#include "../besched_t.h"
-#include "be.h"
+#include "../besched.h"
 #include "../beabi.h"
 #include "../bemodule.h"
 #include "../begnuas.h"
+#include "../belistsched.h"
 
 #include "bearch_TEMPLATE_t.h"
 
index febb721..5682122 100644 (file)
@@ -25,7 +25,7 @@
 #ifndef FIRM_BE_TEMPLATE_BEARCH_TEMPLATE_H
 #define FIRM_BE_TEMPLATE_BEARCH_TEMPLATE_H
 
-#include "../bearch_t.h"
+#include "../bearch.h"
 
 extern const arch_isa_if_t TEMPLATE_isa_if;
 
index 4832823..b22754e 100644 (file)
@@ -45,7 +45,7 @@
 
 #include "../besched.h"
 #include "../beblocksched.h"
-#include "../beirg_t.h"
+#include "../beirg.h"
 #include "../begnuas.h"
 #include "../be_dbgout.h"
 
index 5da5aa9..0048dd3 100644 (file)
@@ -31,7 +31,7 @@
 #include "irargs_t.h"
 #include "debug.h"
 
-#include "../bearch_t.h"
+#include "../bearch.h"
 
 #include "bearch_arm_t.h"
 
index 9b41302..f9fb6fc 100644 (file)
@@ -29,7 +29,7 @@
 #include "irnode.h"
 #include "set.h"
 
-#include "../bearch_t.h"
+#include "../bearch.h"
 #include "arm_nodes_attr.h"
 
 const arch_register_t *arm_get_RegParam_reg(int n);
index 4416c21..9d2108a 100644 (file)
@@ -40,7 +40,7 @@
 #include "irprintf.h"
 #include "xmalloc.h"
 
-#include "../bearch_t.h"
+#include "../bearch.h"
 
 #include "arm_nodes_attr.h"
 #include "arm_new_nodes.h"
index a5ac347..02bb3e0 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "firm_types.h"
 #include "irnode_t.h"
-#include "../bearch_t.h"
+#include "../bearch.h"
 
 /**
  * Possible ARM register shift types.
index 56cb331..74900ac 100644 (file)
@@ -39,7 +39,7 @@
 #include "error.h"
 
 #include "../benode_t.h"
-#include "../beirg_t.h"
+#include "../beirg.h"
 #include "../beutil.h"
 #include "../betranshlp.h"
 #include "bearch_arm_t.h"
index 5bd0c03..ed79a55 100644 (file)
 #include "array_t.h"
 #include "irtools.h"
 
-#include "../bearch_t.h"                /* the general register allocator interface */
+#include "../bearch.h"                /* the general register allocator interface */
 #include "../benode_t.h"
 #include "../belower.h"
-#include "../besched_t.h"
+#include "../besched.h"
 #include "be.h"
 #include "../beabi.h"
 #include "../bemachine.h"
 #include "../beilpsched.h"
 #include "../bemodule.h"
-#include "../beirg_t.h"
+#include "../beirg.h"
 #include "../bespillslots.h"
 #include "../begnuas.h"
+#include "../belistsched.h"
 
 #include "bearch_arm_t.h"
 
index 4895fab..35595ed 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef FIRM_BE_ARM_BEARCH_ARM_H
 #define FIRM_BE_ARM_BEARCH_ARM_H
 
-#include "../bearch_t.h"
+#include "../bearch.h"
 
 extern const arch_isa_if_t arm_isa_if;
 
index caf0301..a885835 100644 (file)
@@ -28,8 +28,8 @@
 #define FIRM_BE_BE_DBGOUT_T_H
 
 #include "obst.h"
-#include "beabi_t.h"
 #include "firm_types.h"
+#include "be_types.h"
 
 typedef struct dbg_handle dbg_handle;
 
index 3360157..7c6283e 100644 (file)
@@ -34,8 +34,7 @@
 #include "pmap.h"
 
 #include "be.h"
-#include "bearch_t.h"
-#include "beirg.h"
+#include "be_types.h"
 
 #define DUMP_NONE       0
 #define DUMP_INITIAL    (1 << 0)
diff --git a/ir/be/be_types.h b/ir/be/be_types.h
new file mode 100644 (file)
index 0000000..2040bbc
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * 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       Forward declarations of backend types
+ * @author      Matthias Braun
+ * @version     $Id: besched.h 25982 2009-05-15 22:09:38Z matze $
+ */
+#ifndef FIRM_BE_TYPES_H
+#define FIRM_BE_TYPES_H
+
+typedef unsigned int sched_timestep_t;
+typedef struct be_irg_t be_irg_t;
+
+typedef struct arch_register_class_t     arch_register_class_t;
+typedef struct arch_register_req_t       arch_register_req_t;
+typedef struct arch_register_t           arch_register_t;
+typedef struct arch_flag_t               arch_flag_t;
+typedef struct arch_inverse_t            arch_inverse_t;
+typedef struct arch_isa_if_t             arch_isa_if_t;
+typedef struct arch_env_t                arch_env_t;
+typedef struct arch_code_generator_t     arch_code_generator_t;
+typedef struct arch_code_generator_if_t  arch_code_generator_if_t;
+
+/**
+ * Some flags describing a node in more detail.
+ */
+typedef enum arch_irn_flags_t {
+       arch_irn_flags_none             = 0,       /**< Node flags. */
+       arch_irn_flags_dont_spill       = 1U << 0, /**< This must not be spilled. */
+       arch_irn_flags_rematerializable = 1U << 1, /**< This can be replicated instead of spilled/reloaded. */
+       arch_irn_flags_modify_flags     = 1U << 2  /**< I modify flags. */
+} arch_irn_flags_t;
+
+typedef struct _be_lv_t                  be_lv_t;
+typedef struct _be_lv_info_t             be_lv_info_t;
+
+typedef struct _be_abi_call_flags_bits_t be_abi_call_flags_bits_t;
+typedef union  _be_abi_call_flags_t      be_abi_call_flags_t;
+typedef struct _be_abi_callbacks_t       be_abi_callbacks_t;
+typedef struct _be_abi_call_t            be_abi_call_t;
+typedef struct _be_abi_irg_t             be_abi_irg_t;
+typedef struct _be_stack_layout_t        be_stack_layout_t;
+
+typedef struct _be_dom_front_info_t      be_dom_front_info_t;
+
+typedef struct _list_sched_selector_t    list_sched_selector_t;
+
+typedef struct _ilp_sched_selector_t     ilp_sched_selector_t;
+typedef struct _ilp_sched_selector_if_t  ilp_sched_selector_if_t;
+
+typedef struct _be_execution_unit_type_t be_execution_unit_type_t;
+typedef struct _be_execution_unit_t      be_execution_unit_t;
+typedef struct _be_machine_t             be_machine_t;
+
+typedef struct backend_info_t            backend_info_t;
+typedef struct sched_info_t              sched_info_t;
+typedef struct reg_out_info_t            reg_out_info_t;
+
+#endif
index 1a6a3e3..bc8660e 100644 (file)
 
 #include "be.h"
 #include "beabi.h"
-#include "bearch_t.h"
+#include "bearch.h"
 #include "benode_t.h"
 #include "belive_t.h"
-#include "besched_t.h"
-#include "beirg_t.h"
+#include "besched.h"
+#include "beirg.h"
 #include "bessaconstr.h"
 
 typedef struct _be_abi_call_arg_t {
index b911ed0..b307fe9 100644 (file)
@@ -35,7 +35,7 @@
 #include "be.h"
 #include "beirg.h"
 #include "bearch.h"
-#include "beabi_t.h"
+#include "beabi.h"
 
 struct _be_abi_call_flags_bits_t {
        unsigned left_to_right          : 1;  /**< Arguments are from left to right. */
diff --git a/ir/be/beabi_t.h b/ir/be/beabi_t.h
deleted file mode 100644 (file)
index f3fc276..0000000
+++ /dev/null
@@ -1,36 +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       Type declarations for the ABI module.
- * @author      Sebastian Hack
- * @version     $Id$
- */
-#ifndef FIRM_BE_BEABI_T_H
-#define FIRM_BE_BEABI_T_H
-
-typedef struct _be_abi_call_flags_bits_t be_abi_call_flags_bits_t;
-typedef union  _be_abi_call_flags_t      be_abi_call_flags_t;
-typedef struct _be_abi_callbacks_t       be_abi_callbacks_t;
-typedef struct _be_abi_call_t            be_abi_call_t;
-typedef struct _be_abi_irg_t             be_abi_irg_t;
-typedef struct _be_stack_layout_t        be_stack_layout_t;
-
-#endif /* FIRM_BE_BEABI_T_H */
index 700115c..dfe5047 100644 (file)
@@ -27,7 +27,7 @@
 
 #include <string.h>
 
-#include "bearch_t.h"
+#include "bearch.h"
 #include "benode_t.h"
 #include "beinfo.h"
 #include "ircons_t.h"
index e72e5bf..cdc14f3 100644 (file)
 
 #include "firm_types.h"
 #include "bitset.h"
-#include "be.h"
 #include "obst.h"
+#include "raw_bitset.h"
 
-typedef struct arch_register_class_t     arch_register_class_t;
-typedef struct arch_register_req_t       arch_register_req_t;
-typedef struct arch_register_t           arch_register_t;
-typedef struct arch_flag_t               arch_flag_t;
-typedef struct arch_inverse_t            arch_inverse_t;
-typedef struct arch_isa_if_t             arch_isa_if_t;
-typedef struct arch_env_t                arch_env_t;
-typedef struct arch_code_generator_t     arch_code_generator_t;
-typedef struct arch_code_generator_if_t  arch_code_generator_if_t;
+#include "be_types.h"
+#include "beinfo.h"
+#include "be.h"
+#include "beirg.h"
 
 typedef enum arch_register_class_flags_t {
        arch_register_class_flag_none      = 0,
@@ -102,16 +97,6 @@ typedef enum arch_irn_class_t {
        arch_irn_class_branch     = 1 << 5
 } arch_irn_class_t;
 
-/**
- * Some flags describing a node in more detail.
- */
-typedef enum arch_irn_flags_t {
-       arch_irn_flags_none             = 0,       /**< Node flags. */
-       arch_irn_flags_dont_spill       = 1U << 0, /**< This must not be spilled. */
-       arch_irn_flags_rematerializable = 1U << 1, /**< This can be replicated instead of spilled/reloaded. */
-       arch_irn_flags_modify_flags     = 1U << 2  /**< I modify flags. */
-} arch_irn_flags_t;
-
 void arch_set_frame_offset(ir_node *irn, int bias);
 
 ir_entity *arch_get_frame_entity(const ir_node *irn);
@@ -223,4 +208,537 @@ extern arch_env_t *arch_env_init(const arch_isa_if_t *isa,
  */
 void be_register_isa_if(const char *name, const arch_isa_if_t *isa);
 
+/**
+ * A register.
+ */
+struct arch_register_t {
+       const char                  *name;        /**< The name of the register. */
+       const arch_register_class_t *reg_class;   /**< The class the register belongs to. */
+       unsigned                    index;        /**< The index of the register in the class. */
+       arch_register_type_t        type;         /**< The type of the register. */
+};
+
+static inline const arch_register_class_t *
+_arch_register_get_class(const arch_register_t *reg)
+{
+       return reg->reg_class;
+}
+
+static inline
+unsigned _arch_register_get_index(const arch_register_t *reg)
+{
+       return reg->index;
+}
+
+static inline
+const char *_arch_register_get_name(const arch_register_t *reg)
+{
+       return reg->name;
+}
+
+#define arch_register_get_class(reg)      _arch_register_get_class(reg)
+#define arch_register_get_index(reg)      _arch_register_get_index(reg)
+#define arch_register_get_name(reg)       _arch_register_get_name(reg)
+
+/**
+ * Convenience macro to check for register type.
+ * @param req   A pointer to register.
+ * @param kind  The kind of type to check for (see arch_register_type_t).
+ * @return      1, If register is of given kind, 0 if not.
+ */
+#define arch_register_type_is(reg, kind) \
+  (((reg)->type & arch_register_type_ ## kind) != 0)
+
+/**
+ * A class of registers.
+ * Like general purpose or floating point.
+ */
+struct arch_register_class_t {
+       unsigned                     index;  /**< index of this register class */
+       const char                  *name;   /**< The name of the register class.*/
+       unsigned                     n_regs; /**< Number of registers in this
+                                                 class. */
+       ir_mode                     *mode;   /**< The mode of the register class.*/
+       const arch_register_t       *regs;   /**< The array of registers. */
+       arch_register_class_flags_t  flags;  /**< register class flags. */
+};
+
+/** return the number of registers in this register class */
+#define arch_register_class_n_regs(cls) ((cls)->n_regs)
+
+/** return the largest mode of this register class */
+#define arch_register_class_mode(cls) ((cls)->mode)
+
+/** return the name of this register class */
+#define arch_register_class_name(cls) ((cls)->name)
+
+/** return the index of this register class */
+#define arch_register_class_index(cls)  ((cls)->index)
+
+/** return the register class flags */
+#define arch_register_class_flags(cls) ((cls)->flags)
+
+static inline const arch_register_t *
+_arch_register_for_index(const arch_register_class_t *cls, unsigned idx)
+{
+       assert(idx < cls->n_regs);
+       return &cls->regs[idx];
+}
+
+#define arch_register_for_index(cls, idx)   _arch_register_for_index(cls, idx)
+
+/**
+ * Convenience macro to check for set constraints.
+ * @param req   A pointer to register requirements.
+ * @param kind  The kind of constraint to check for (see arch_register_req_type_t).
+ * @return      1, If the kind of constraint is present, 0 if not.
+ */
+#define arch_register_req_is(req, kind) \
+       (((req)->type & (arch_register_req_type_ ## kind)) != 0)
+
+/**
+ * Expresses requirements to register allocation for an operand.
+ */
+struct arch_register_req_t {
+       arch_register_req_type_t type;      /**< The type of the constraint. */
+       const arch_register_class_t *cls;   /**< The register class this constraint belongs to. */
+
+       const unsigned *limited;            /**< allowed register bitset */
+
+       unsigned other_same;                /**< Bitmask of ins which should use the
+                                                same register (should_be_same). */
+       unsigned other_different;           /**< Bitmask of ins which shall use a
+                                                different register
+                                                (must_be_different) */
+};
+
+static inline int reg_reqs_equal(const arch_register_req_t *req1,
+                                 const arch_register_req_t *req2)
+{
+       if (req1 == req2)
+               return 1;
+
+       if (req1->type != req2->type
+                       || req1->cls != req2->cls
+                       || req1->other_same != req2->other_same
+                       || req1->other_different != req2->other_different)
+               return 0;
+
+       if (req1->limited != NULL) {
+               size_t n_regs;
+
+               if (req2->limited == NULL)
+                       return 0;
+
+               n_regs = arch_register_class_n_regs(req1->cls);
+               if (!rbitset_equal(req1->limited, req2->limited, n_regs))
+                       return 0;
+       }
+
+       return 1;
+}
+
+/**
+ * An inverse operation returned by the backend
+ */
+struct arch_inverse_t {
+       int      n;       /**< count of nodes returned in nodes array */
+       int      costs;   /**< costs of this remat */
+
+       /**< nodes for this inverse operation. shall be in
+        *  schedule order. last element is the target value
+        */
+       ir_node  **nodes;
+};
+
+struct arch_irn_ops_t {
+
+       /**
+        * Get the register requirements for a given operand.
+        * @param self The self pointer.
+        * @param irn The node.
+        * @param pos The operand's position (0..n for the input operands).
+        * @return    The register requirements for the selected operand.
+        *            The pointer returned is never NULL.
+        */
+       const arch_register_req_t *(*get_irn_reg_req)(const ir_node *irn, int pos);
+
+       /**
+        * Classify the node.
+        * @param irn The node.
+        * @return A classification.
+        */
+       arch_irn_class_t (*classify)(const ir_node *irn);
+
+       /**
+        * Get the entity on the stack frame this node depends on.
+        * @param self The this pointer.
+        * @param irn  The node in question.
+        * @return The entity on the stack frame or NULL, if the node does not have a
+        *         stack frame entity.
+        */
+       ir_entity *(*get_frame_entity)(const ir_node *irn);
+
+       /**
+        * Set the entity on the stack frame this node depends on.
+        * @param self The this pointer.
+        * @param irn  The node in question.
+        * @param ent  The entity to set
+        */
+       void (*set_frame_entity)(ir_node *irn, ir_entity *ent);
+
+       /**
+        * Set the offset of a node carrying an entity on the stack frame.
+        * @param self The this pointer.
+        * @param irn  The node.
+        * @param offset The offset of the node's stack frame entity.
+        */
+       void (*set_frame_offset)(ir_node *irn, int offset);
+
+       /**
+        * Returns the delta of the stackpointer for nodes that increment or
+        * decrement the stackpointer with a constant value. (push, pop
+        * nodes on most architectures).
+        * A positive value stands for an expanding stack area, a negative value for
+        * a shrinking one.
+        *
+        * @param self      The this pointer
+        * @param irn       The node
+        * @return          0 if the stackpointer is not modified with a constant
+        *                  value, otherwise the increment/decrement value
+        */
+       int (*get_sp_bias)(const ir_node *irn);
+
+       /**
+        * Returns an inverse operation which yields the i-th argument
+        * of the given node as result.
+        *
+        * @param self      The this pointer.
+        * @param irn       The original operation
+        * @param i         Index of the argument we want the inverse operation to yield
+        * @param inverse   struct to be filled with the resulting inverse op
+        * @param obstack   The obstack to use for allocation of the returned nodes array
+        * @return          The inverse operation or NULL if operation invertible
+        */
+       arch_inverse_t *(*get_inverse)(const ir_node *irn, int i, arch_inverse_t *inverse, struct obstack *obstack);
+
+       /**
+        * Get the estimated cycle count for @p irn.
+        *
+        * @param self The this pointer.
+        * @param irn  The node.
+        *
+        * @return     The estimated cycle count for this operation
+        */
+       int (*get_op_estimated_cost)(const ir_node *irn);
+
+       /**
+        * Asks the backend whether operand @p i of @p irn can be loaded form memory internally
+        *
+        * @param self The this pointer.
+        * @param irn  The node.
+        * @param i    Index of the argument we would like to know whether @p irn can load it form memory internally
+        *
+        * @return     nonzero if argument can be loaded or zero otherwise
+        */
+       int (*possible_memory_operand)(const ir_node *irn, unsigned int i);
+
+       /**
+        * Ask the backend to assimilate @p reload of operand @p i into @p irn.
+        *
+        * @param self   The this pointer.
+        * @param irn    The node.
+        * @param spill  The spill.
+        * @param i      The position of the reload.
+        */
+       void (*perform_memory_operand)(ir_node *irn, ir_node *spill, unsigned int i);
+};
+
+/**
+ * The code generator interface.
+ */
+struct arch_code_generator_if_t {
+       /**
+        * Initialize the code generator.
+        * @param birg A backend IRG session.
+        * @return     A newly created code generator.
+        */
+       void *(*init)(be_irg_t *birg);
+
+       /**
+        * return node used as base in pic code addresses
+        */
+       ir_node* (*get_pic_base)(void *self);
+
+       /**
+        * Called before abi introduce.
+        */
+       void (*before_abi)(void *self);
+
+       /**
+        * Called, when the graph is being normalized.
+        */
+       void (*prepare_graph)(void *self);
+
+       /**
+        * Backend may provide an own spiller.
+        * This spiller needs to spill all register classes.
+        */
+       void (*spill)(void *self, be_irg_t *birg);
+
+       /**
+        * Called before register allocation.
+        */
+       void (*before_ra)(void *self);
+
+       /**
+        * Called after register allocation.
+        */
+       void (*after_ra)(void *self);
+
+       /**
+        * Called directly before done is called. This should be the last place
+        * where the irg is modified.
+        */
+       void (*finish)(void *self);
+
+       /**
+        * Called after everything happened. This call should emit the final
+        * assembly code but avoid changing the irg.
+        * The code generator must also be de-allocated here.
+        */
+       void (*done)(void *self);
+};
+
+/**
+ * helper macro: call function func from the code generator
+ * if it's implemented.
+ */
+#define _arch_cg_call(cg, func) \
+do { \
+       if((cg)->impl->func) \
+               (cg)->impl->func(cg); \
+} while(0)
+
+#define _arch_cg_call_env(cg, env, func) \
+do { \
+       if((cg)->impl->func) \
+               (cg)->impl->func(cg, env); \
+} while(0)
+
+#define arch_code_generator_before_abi(cg)      _arch_cg_call(cg, before_abi)
+#define arch_code_generator_prepare_graph(cg)   _arch_cg_call(cg, prepare_graph)
+#define arch_code_generator_before_ra(cg)       _arch_cg_call(cg, before_ra)
+#define arch_code_generator_after_ra(cg)        _arch_cg_call(cg, after_ra)
+#define arch_code_generator_finish(cg)          _arch_cg_call(cg, finish)
+#define arch_code_generator_done(cg)            _arch_cg_call(cg, done)
+#define arch_code_generator_spill(cg, birg)     _arch_cg_call_env(cg, birg, spill)
+#define arch_code_generator_has_spiller(cg)     ((cg)->impl->spill != NULL)
+#define arch_code_generator_get_pic_base(cg)    \
+       ((cg)->impl->get_pic_base != NULL ? (cg)->impl->get_pic_base(cg) : NULL)
+
+/**
+ * Code generator base class.
+ */
+struct arch_code_generator_t {
+       const arch_code_generator_if_t *impl;
+};
+
+/**
+ * Architecture interface.
+ */
+struct arch_isa_if_t {
+       /**
+        * Initialize the isa interface.
+        * @param file_handle  the file handle to write the output to
+        * @return a new isa instance
+        */
+       arch_env_t *(*init)(FILE *file_handle);
+
+       /**
+        * Free the isa instance.
+        */
+       void (*done)(void *self);
+
+       /**
+        * Called directly after initialization. Backend should handle all
+        * intrinsics here.
+        */
+       void (*handle_intrinsics)(void);
+
+       /**
+        * Get the the number of register classes in the isa.
+        * @return The number of register classes.
+        */
+       unsigned (*get_n_reg_class)(const void *self);
+
+       /**
+        * Get the i-th register class.
+        * @param i The number of the register class.
+        * @return The register class.
+        */
+       const arch_register_class_t *(*get_reg_class)(const void *self, unsigned i);
+
+       /**
+        * Get the register class which shall be used to store a value of a given mode.
+        * @param self The this pointer.
+        * @param mode The mode in question.
+        * @return A register class which can hold values of the given mode.
+        */
+       const arch_register_class_t *(*get_reg_class_for_mode)(const void *self, const ir_mode *mode);
+
+       /**
+        * Get the ABI restrictions for procedure calls.
+        * @param self        The this pointer.
+        * @param call_type   The call type of the method (procedure) in question.
+        * @param p           The array of parameter locations to be filled.
+        */
+       void (*get_call_abi)(const void *self, ir_type *call_type, be_abi_call_t *abi);
+
+       /**
+        * Get the code generator interface.
+        * @param self The this pointer.
+        * @return     Some code generator interface.
+        */
+       const arch_code_generator_if_t *(*get_code_generator_if)(void *self);
+
+       /**
+        * Get the list scheduler to use. There is already a selector given, the
+        * backend is free to modify and/or ignore it.
+        *
+        * @param self     The isa object.
+        * @param selector The selector given by options.
+        * @return         The list scheduler selector.
+        */
+       const list_sched_selector_t *(*get_list_sched_selector)(const void *self, list_sched_selector_t *selector);
+
+       /**
+        * Get the ILP scheduler to use.
+        * @param self  The isa object.
+        * @return      The ILP scheduler selector
+        */
+       const ilp_sched_selector_t *(*get_ilp_sched_selector)(const void *self);
+
+       /**
+        * Get the necessary alignment for storing a register of given class.
+        * @param self  The isa object.
+        * @param cls   The register class.
+        * @return      The alignment in bytes.
+        */
+       int (*get_reg_class_alignment)(const void *self, const arch_register_class_t *cls);
+
+       /**
+        * A "static" function, returns the frontend settings
+        * needed for this backend.
+        */
+       const backend_params *(*get_params)(void);
+
+       /**
+        * Returns an 2-dim array of execution units, @p irn can be executed on.
+        * The first dimension is the type, the second the allowed units of this
+        * type.
+        * Each dimension is a NULL terminated list.
+        * @param self  The isa object.
+        * @param irn   The node.
+        * @return An array of allowed execution units.
+        *         exec_unit = {
+        *                       { unit1_of_tp1, ..., unitX1_of_tp1, NULL },
+        *                       ...,
+        *                       { unit1_of_tpY, ..., unitXn_of_tpY, NULL },
+        *                       NULL
+        *                     };
+        */
+       const be_execution_unit_t ***(*get_allowed_execution_units)(const void *self, const ir_node *irn);
+
+       /**
+        * Return the abstract machine for this isa.
+        * @param self  The isa object.
+        */
+       const be_machine_t *(*get_machine)(const void *self);
+
+       /**
+        * Return an ordered list of irgs where code should be generated for.
+        * If NULL is returned, all irg will be taken into account and they will be
+        * generated in an arbitrary order.
+        * @param self   The isa object.
+        * @param irgs   A flexible array ARR_F of length 0 where the backend can append the desired irgs.
+        * @return A flexible array ARR_F containing all desired irgs in the desired order.
+        */
+       ir_graph **(*get_backend_irg_list)(const void *self, ir_graph ***irgs);
+
+       /**
+        * mark node as rematerialized
+        */
+       void (*mark_remat)(const void *self, ir_node *node);
+
+       /**
+        * parse an assembler constraint part and set flags according to its nature
+        * advances the *c pointer to point to the last parsed character (so if you
+        * parse a single character don't advance c)
+        */
+       asm_constraint_flags_t (*parse_asm_constraint)(const void *self, const char **c);
+
+       /**
+        * returns true if the string is a valid clobbered (register) in this
+        * backend
+        */
+       int (*is_valid_clobber)(const void *self, const char *clobber);
+};
+
+#define arch_env_done(env)                             ((env)->impl->done(env))
+#define arch_env_handle_intrinsics(env)                \
+       do { if((env)->impl->handle_intrinsics != NULL) (env)->impl->handle_intrinsics(); } while(0)
+#define arch_env_get_n_reg_class(env)                  ((env)->impl->get_n_reg_class(env))
+#define arch_env_get_reg_class(env,i)                  ((env)->impl->get_reg_class(env, i))
+#define arch_env_get_reg_class_for_mode(env,mode)      ((env)->impl->get_reg_class_for_mode((env), (mode)))
+#define arch_env_get_call_abi(env,tp,abi)              ((env)->impl->get_call_abi((env), (tp), (abi)))
+#define arch_env_get_code_generator_if(env)            ((env)->impl->get_code_generator_if((env)))
+#define arch_env_get_list_sched_selector(env,selector) ((env)->impl->get_list_sched_selector((env), (selector)))
+#define arch_env_get_ilp_sched_selector(env)           ((env)->impl->get_ilp_sched_selector(env))
+#define arch_env_get_reg_class_alignment(env,cls)      ((env)->impl->get_reg_class_alignment((env), (cls)))
+#define arch_env_get_params(env)                       ((env)->impl->get_params())
+#define arch_env_get_allowed_execution_units(env,irn)  ((env)->impl->get_allowed_execution_units((env), (irn)))
+#define arch_env_get_machine(env)                      ((env)->impl->get_machine(env))
+#define arch_env_get_backend_irg_list(env,irgs)        ((env)->impl->get_backend_irg_list((env), (irgs)))
+#define arch_env_parse_asm_constraint(env,c)           ((env)->impl->parse_asm_constraint((env), (c))
+#define arch_env_is_valid_clobber(env,clobber)         ((env)->impl->is_valid_clobber((env), (clobber))
+#define arch_env_mark_remat(env,node) \
+       do { if ((env)->impl->mark_remat != NULL) (env)->impl->mark_remat((env), (node)); } while(0)
+
+/**
+ * ISA base class.
+ */
+struct arch_env_t {
+       const arch_isa_if_t   *impl;
+       const arch_register_t *sp;               /** The stack pointer register. */
+       const arch_register_t *bp;               /** The base pointer register. */
+       const arch_register_class_t *link_class; /** The static link pointer register class. */
+       int                    stack_dir;        /** -1 for decreasing, 1 for increasing. */
+       int                    stack_alignment;  /** power of 2 stack alignment */
+       const be_main_env_t   *main_env;         /** the be main environment */
+       int                    spill_cost;       /** cost for a be_Spill node */
+       int                    reload_cost;      /** cost for a be_Reload node */
+};
+
+static inline unsigned arch_irn_get_n_outs(const ir_node *node)
+{
+       backend_info_t *info = be_get_info(node);
+       return ARR_LEN(info->out_infos);
+}
+
+static inline bool arch_irn_consider_in_reg_alloc(
+               const arch_register_class_t *cls, const ir_node *node)
+{
+       const arch_register_req_t *req = arch_get_register_req_out(node);
+       return
+               req->cls == cls &&
+               !(req->type & arch_register_req_type_ignore);
+}
+
+static inline bool arch_irn_is_ignore(const ir_node *irn)
+{
+       const arch_register_req_t *req = arch_get_register_req_out(irn);
+       return !!(req->type & arch_register_req_type_ignore);
+}
+
 #endif /* FIRM_BE_BEARCH_H */
diff --git a/ir/be/bearch_t.h b/ir/be/bearch_t.h
deleted file mode 100644 (file)
index e7c0320..0000000
+++ /dev/null
@@ -1,572 +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       Processor architecture specification - internal data structures.
- * @author      Sebastian Hack
- * @version     $Id$
- */
-#ifndef FIRM_BE_BEARCH_T_H
-#define FIRM_BE_BEARCH_T_H
-
-#include "bearch.h"
-
-#include "belistsched.h"
-#include "beilpsched.h"
-#include "bemachine.h"
-#include "beirg.h"
-#include "beinfo.h"
-#include "beabi.h"
-#include "raw_bitset.h"
-
-/**
- * A register.
- */
-struct arch_register_t {
-       const char                  *name;        /**< The name of the register. */
-       const arch_register_class_t *reg_class;   /**< The class the register belongs to. */
-       unsigned                    index;        /**< The index of the register in the class. */
-       arch_register_type_t        type;         /**< The type of the register. */
-};
-
-static inline const arch_register_class_t *
-_arch_register_get_class(const arch_register_t *reg)
-{
-       return reg->reg_class;
-}
-
-static inline
-unsigned _arch_register_get_index(const arch_register_t *reg)
-{
-       return reg->index;
-}
-
-static inline
-const char *_arch_register_get_name(const arch_register_t *reg)
-{
-       return reg->name;
-}
-
-#define arch_register_get_class(reg)      _arch_register_get_class(reg)
-#define arch_register_get_index(reg)      _arch_register_get_index(reg)
-#define arch_register_get_name(reg)       _arch_register_get_name(reg)
-
-/**
- * Convenience macro to check for register type.
- * @param req   A pointer to register.
- * @param kind  The kind of type to check for (see arch_register_type_t).
- * @return      1, If register is of given kind, 0 if not.
- */
-#define arch_register_type_is(reg, kind) \
-  (((reg)->type & arch_register_type_ ## kind) != 0)
-
-/**
- * A class of registers.
- * Like general purpose or floating point.
- */
-struct arch_register_class_t {
-       unsigned                     index;  /**< index of this register class */
-       const char                  *name;   /**< The name of the register class.*/
-       unsigned                     n_regs; /**< Number of registers in this
-                                                 class. */
-       ir_mode                     *mode;   /**< The mode of the register class.*/
-       const arch_register_t       *regs;   /**< The array of registers. */
-       arch_register_class_flags_t  flags;  /**< register class flags. */
-};
-
-/** return the number of registers in this register class */
-#define arch_register_class_n_regs(cls) ((cls)->n_regs)
-
-/** return the largest mode of this register class */
-#define arch_register_class_mode(cls) ((cls)->mode)
-
-/** return the name of this register class */
-#define arch_register_class_name(cls) ((cls)->name)
-
-/** return the index of this register class */
-#define arch_register_class_index(cls)  ((cls)->index)
-
-/** return the register class flags */
-#define arch_register_class_flags(cls) ((cls)->flags)
-
-static inline const arch_register_t *
-_arch_register_for_index(const arch_register_class_t *cls, unsigned idx)
-{
-       assert(idx < cls->n_regs);
-       return &cls->regs[idx];
-}
-
-#define arch_register_for_index(cls, idx)   _arch_register_for_index(cls, idx)
-
-/**
- * Convenience macro to check for set constraints.
- * @param req   A pointer to register requirements.
- * @param kind  The kind of constraint to check for (see arch_register_req_type_t).
- * @return      1, If the kind of constraint is present, 0 if not.
- */
-#define arch_register_req_is(req, kind) \
-       (((req)->type & (arch_register_req_type_ ## kind)) != 0)
-
-/**
- * Expresses requirements to register allocation for an operand.
- */
-struct arch_register_req_t {
-       arch_register_req_type_t type;      /**< The type of the constraint. */
-       const arch_register_class_t *cls;   /**< The register class this constraint belongs to. */
-
-       const unsigned *limited;            /**< allowed register bitset */
-
-       unsigned other_same;                /**< Bitmask of ins which should use the
-                                                same register (should_be_same). */
-       unsigned other_different;           /**< Bitmask of ins which shall use a
-                                                different register
-                                                (must_be_different) */
-};
-
-static inline int reg_reqs_equal(const arch_register_req_t *req1,
-                                 const arch_register_req_t *req2)
-{
-       if (req1 == req2)
-               return 1;
-
-       if (req1->type != req2->type
-                       || req1->cls != req2->cls
-                       || req1->other_same != req2->other_same
-                       || req1->other_different != req2->other_different)
-               return 0;
-
-       if (req1->limited != NULL) {
-               size_t n_regs;
-
-               if (req2->limited == NULL)
-                       return 0;
-
-               n_regs = arch_register_class_n_regs(req1->cls);
-               if (!rbitset_equal(req1->limited, req2->limited, n_regs))
-                       return 0;
-       }
-
-       return 1;
-}
-
-/**
- * An inverse operation returned by the backend
- */
-struct arch_inverse_t {
-       int      n;       /**< count of nodes returned in nodes array */
-       int      costs;   /**< costs of this remat */
-
-       /**< nodes for this inverse operation. shall be in
-        *  schedule order. last element is the target value
-        */
-       ir_node  **nodes;
-};
-
-struct arch_irn_ops_t {
-
-       /**
-        * Get the register requirements for a given operand.
-        * @param self The self pointer.
-        * @param irn The node.
-        * @param pos The operand's position (0..n for the input operands).
-        * @return    The register requirements for the selected operand.
-        *            The pointer returned is never NULL.
-        */
-       const arch_register_req_t *(*get_irn_reg_req)(const ir_node *irn, int pos);
-
-       /**
-        * Classify the node.
-        * @param irn The node.
-        * @return A classification.
-        */
-       arch_irn_class_t (*classify)(const ir_node *irn);
-
-       /**
-        * Get the entity on the stack frame this node depends on.
-        * @param self The this pointer.
-        * @param irn  The node in question.
-        * @return The entity on the stack frame or NULL, if the node does not have a
-        *         stack frame entity.
-        */
-       ir_entity *(*get_frame_entity)(const ir_node *irn);
-
-       /**
-        * Set the entity on the stack frame this node depends on.
-        * @param self The this pointer.
-        * @param irn  The node in question.
-        * @param ent  The entity to set
-        */
-       void (*set_frame_entity)(ir_node *irn, ir_entity *ent);
-
-       /**
-        * Set the offset of a node carrying an entity on the stack frame.
-        * @param self The this pointer.
-        * @param irn  The node.
-        * @param offset The offset of the node's stack frame entity.
-        */
-       void (*set_frame_offset)(ir_node *irn, int offset);
-
-       /**
-        * Returns the delta of the stackpointer for nodes that increment or
-        * decrement the stackpointer with a constant value. (push, pop
-        * nodes on most architectures).
-        * A positive value stands for an expanding stack area, a negative value for
-        * a shrinking one.
-        *
-        * @param self      The this pointer
-        * @param irn       The node
-        * @return          0 if the stackpointer is not modified with a constant
-        *                  value, otherwise the increment/decrement value
-        */
-       int (*get_sp_bias)(const ir_node *irn);
-
-       /**
-        * Returns an inverse operation which yields the i-th argument
-        * of the given node as result.
-        *
-        * @param self      The this pointer.
-        * @param irn       The original operation
-        * @param i         Index of the argument we want the inverse operation to yield
-        * @param inverse   struct to be filled with the resulting inverse op
-        * @param obstack   The obstack to use for allocation of the returned nodes array
-        * @return          The inverse operation or NULL if operation invertible
-        */
-       arch_inverse_t *(*get_inverse)(const ir_node *irn, int i, arch_inverse_t *inverse, struct obstack *obstack);
-
-       /**
-        * Get the estimated cycle count for @p irn.
-        *
-        * @param self The this pointer.
-        * @param irn  The node.
-        *
-        * @return     The estimated cycle count for this operation
-        */
-       int (*get_op_estimated_cost)(const ir_node *irn);
-
-       /**
-        * Asks the backend whether operand @p i of @p irn can be loaded form memory internally
-        *
-        * @param self The this pointer.
-        * @param irn  The node.
-        * @param i    Index of the argument we would like to know whether @p irn can load it form memory internally
-        *
-        * @return     nonzero if argument can be loaded or zero otherwise
-        */
-       int (*possible_memory_operand)(const ir_node *irn, unsigned int i);
-
-       /**
-        * Ask the backend to assimilate @p reload of operand @p i into @p irn.
-        *
-        * @param self   The this pointer.
-        * @param irn    The node.
-        * @param spill  The spill.
-        * @param i      The position of the reload.
-        */
-       void (*perform_memory_operand)(ir_node *irn, ir_node *spill, unsigned int i);
-};
-
-/**
- * The code generator interface.
- */
-struct arch_code_generator_if_t {
-       /**
-        * Initialize the code generator.
-        * @param birg A backend IRG session.
-        * @return     A newly created code generator.
-        */
-       void *(*init)(be_irg_t *birg);
-
-       /**
-        * return node used as base in pic code addresses
-        */
-       ir_node* (*get_pic_base)(void *self);
-
-       /**
-        * Called before abi introduce.
-        */
-       void (*before_abi)(void *self);
-
-       /**
-        * Called, when the graph is being normalized.
-        */
-       void (*prepare_graph)(void *self);
-
-       /**
-        * Backend may provide an own spiller.
-        * This spiller needs to spill all register classes.
-        */
-       void (*spill)(void *self, be_irg_t *birg);
-
-       /**
-        * Called before register allocation.
-        */
-       void (*before_ra)(void *self);
-
-       /**
-        * Called after register allocation.
-        */
-       void (*after_ra)(void *self);
-
-       /**
-        * Called directly before done is called. This should be the last place
-        * where the irg is modified.
-        */
-       void (*finish)(void *self);
-
-       /**
-        * Called after everything happened. This call should emit the final
-        * assembly code but avoid changing the irg.
-        * The code generator must also be de-allocated here.
-        */
-       void (*done)(void *self);
-};
-
-/**
- * helper macro: call function func from the code generator
- * if it's implemented.
- */
-#define _arch_cg_call(cg, func) \
-do { \
-       if((cg)->impl->func) \
-               (cg)->impl->func(cg); \
-} while(0)
-
-#define _arch_cg_call_env(cg, env, func) \
-do { \
-       if((cg)->impl->func) \
-               (cg)->impl->func(cg, env); \
-} while(0)
-
-#define arch_code_generator_before_abi(cg)      _arch_cg_call(cg, before_abi)
-#define arch_code_generator_prepare_graph(cg)   _arch_cg_call(cg, prepare_graph)
-#define arch_code_generator_before_ra(cg)       _arch_cg_call(cg, before_ra)
-#define arch_code_generator_after_ra(cg)        _arch_cg_call(cg, after_ra)
-#define arch_code_generator_finish(cg)          _arch_cg_call(cg, finish)
-#define arch_code_generator_done(cg)            _arch_cg_call(cg, done)
-#define arch_code_generator_spill(cg, birg)     _arch_cg_call_env(cg, birg, spill)
-#define arch_code_generator_has_spiller(cg)     ((cg)->impl->spill != NULL)
-#define arch_code_generator_get_pic_base(cg)    \
-       ((cg)->impl->get_pic_base != NULL ? (cg)->impl->get_pic_base(cg) : NULL)
-
-/**
- * Code generator base class.
- */
-struct arch_code_generator_t {
-       const arch_code_generator_if_t *impl;
-};
-
-/**
- * Architecture interface.
- */
-struct arch_isa_if_t {
-       /**
-        * Initialize the isa interface.
-        * @param file_handle  the file handle to write the output to
-        * @return a new isa instance
-        */
-       arch_env_t *(*init)(FILE *file_handle);
-
-       /**
-        * Free the isa instance.
-        */
-       void (*done)(void *self);
-
-       /**
-        * Called directly after initialization. Backend should handle all
-        * intrinsics here.
-        */
-       void (*handle_intrinsics)(void);
-
-       /**
-        * Get the the number of register classes in the isa.
-        * @return The number of register classes.
-        */
-       unsigned (*get_n_reg_class)(const void *self);
-
-       /**
-        * Get the i-th register class.
-        * @param i The number of the register class.
-        * @return The register class.
-        */
-       const arch_register_class_t *(*get_reg_class)(const void *self, unsigned i);
-
-       /**
-        * Get the register class which shall be used to store a value of a given mode.
-        * @param self The this pointer.
-        * @param mode The mode in question.
-        * @return A register class which can hold values of the given mode.
-        */
-       const arch_register_class_t *(*get_reg_class_for_mode)(const void *self, const ir_mode *mode);
-
-       /**
-        * Get the ABI restrictions for procedure calls.
-        * @param self        The this pointer.
-        * @param call_type   The call type of the method (procedure) in question.
-        * @param p           The array of parameter locations to be filled.
-        */
-       void (*get_call_abi)(const void *self, ir_type *call_type, be_abi_call_t *abi);
-
-       /**
-        * Get the code generator interface.
-        * @param self The this pointer.
-        * @return     Some code generator interface.
-        */
-       const arch_code_generator_if_t *(*get_code_generator_if)(void *self);
-
-       /**
-        * Get the list scheduler to use. There is already a selector given, the
-        * backend is free to modify and/or ignore it.
-        *
-        * @param self     The isa object.
-        * @param selector The selector given by options.
-        * @return         The list scheduler selector.
-        */
-       const list_sched_selector_t *(*get_list_sched_selector)(const void *self, list_sched_selector_t *selector);
-
-       /**
-        * Get the ILP scheduler to use.
-        * @param self  The isa object.
-        * @return      The ILP scheduler selector
-        */
-       const ilp_sched_selector_t *(*get_ilp_sched_selector)(const void *self);
-
-       /**
-        * Get the necessary alignment for storing a register of given class.
-        * @param self  The isa object.
-        * @param cls   The register class.
-        * @return      The alignment in bytes.
-        */
-       int (*get_reg_class_alignment)(const void *self, const arch_register_class_t *cls);
-
-       /**
-        * A "static" function, returns the frontend settings
-        * needed for this backend.
-        */
-       const backend_params *(*get_params)(void);
-
-       /**
-        * Returns an 2-dim array of execution units, @p irn can be executed on.
-        * The first dimension is the type, the second the allowed units of this
-        * type.
-        * Each dimension is a NULL terminated list.
-        * @param self  The isa object.
-        * @param irn   The node.
-        * @return An array of allowed execution units.
-        *         exec_unit = {
-        *                       { unit1_of_tp1, ..., unitX1_of_tp1, NULL },
-        *                       ...,
-        *                       { unit1_of_tpY, ..., unitXn_of_tpY, NULL },
-        *                       NULL
-        *                     };
-        */
-       const be_execution_unit_t ***(*get_allowed_execution_units)(const void *self, const ir_node *irn);
-
-       /**
-        * Return the abstract machine for this isa.
-        * @param self  The isa object.
-        */
-       const be_machine_t *(*get_machine)(const void *self);
-
-       /**
-        * Return an ordered list of irgs where code should be generated for.
-        * If NULL is returned, all irg will be taken into account and they will be
-        * generated in an arbitrary order.
-        * @param self   The isa object.
-        * @param irgs   A flexible array ARR_F of length 0 where the backend can append the desired irgs.
-        * @return A flexible array ARR_F containing all desired irgs in the desired order.
-        */
-       ir_graph **(*get_backend_irg_list)(const void *self, ir_graph ***irgs);
-
-       /**
-        * mark node as rematerialized
-        */
-       void (*mark_remat)(const void *self, ir_node *node);
-
-       /**
-        * parse an assembler constraint part and set flags according to its nature
-        * advances the *c pointer to point to the last parsed character (so if you
-        * parse a single character don't advance c)
-        */
-       asm_constraint_flags_t (*parse_asm_constraint)(const void *self, const char **c);
-
-       /**
-        * returns true if the string is a valid clobbered (register) in this
-        * backend
-        */
-       int (*is_valid_clobber)(const void *self, const char *clobber);
-};
-
-#define arch_env_done(env)                             ((env)->impl->done(env))
-#define arch_env_handle_intrinsics(env)                \
-       do { if((env)->impl->handle_intrinsics != NULL) (env)->impl->handle_intrinsics(); } while(0)
-#define arch_env_get_n_reg_class(env)                  ((env)->impl->get_n_reg_class(env))
-#define arch_env_get_reg_class(env,i)                  ((env)->impl->get_reg_class(env, i))
-#define arch_env_get_reg_class_for_mode(env,mode)      ((env)->impl->get_reg_class_for_mode((env), (mode)))
-#define arch_env_get_call_abi(env,tp,abi)              ((env)->impl->get_call_abi((env), (tp), (abi)))
-#define arch_env_get_code_generator_if(env)            ((env)->impl->get_code_generator_if((env)))
-#define arch_env_get_list_sched_selector(env,selector) ((env)->impl->get_list_sched_selector((env), (selector)))
-#define arch_env_get_ilp_sched_selector(env)           ((env)->impl->get_ilp_sched_selector(env))
-#define arch_env_get_reg_class_alignment(env,cls)      ((env)->impl->get_reg_class_alignment((env), (cls)))
-#define arch_env_get_params(env)                       ((env)->impl->get_params())
-#define arch_env_get_allowed_execution_units(env,irn)  ((env)->impl->get_allowed_execution_units((env), (irn)))
-#define arch_env_get_machine(env)                      ((env)->impl->get_machine(env))
-#define arch_env_get_backend_irg_list(env,irgs)        ((env)->impl->get_backend_irg_list((env), (irgs)))
-#define arch_env_parse_asm_constraint(env,c)           ((env)->impl->parse_asm_constraint((env), (c))
-#define arch_env_is_valid_clobber(env,clobber)         ((env)->impl->is_valid_clobber((env), (clobber))
-#define arch_env_mark_remat(env,node) \
-       do { if ((env)->impl->mark_remat != NULL) (env)->impl->mark_remat((env), (node)); } while(0)
-
-/**
- * ISA base class.
- */
-struct arch_env_t {
-       const arch_isa_if_t   *impl;
-       const arch_register_t *sp;               /** The stack pointer register. */
-       const arch_register_t *bp;               /** The base pointer register. */
-       const arch_register_class_t *link_class; /** The static link pointer register class. */
-       int                    stack_dir;        /** -1 for decreasing, 1 for increasing. */
-       int                    stack_alignment;  /** power of 2 stack alignment */
-       const be_main_env_t   *main_env;         /** the be main environment */
-       int                    spill_cost;       /** cost for a be_Spill node */
-       int                    reload_cost;      /** cost for a be_Reload node */
-};
-
-static inline unsigned arch_irn_get_n_outs(const ir_node *node)
-{
-       backend_info_t *info = be_get_info(node);
-       return ARR_LEN(info->out_infos);
-}
-
-static inline bool arch_irn_consider_in_reg_alloc(
-               const arch_register_class_t *cls, const ir_node *node)
-{
-       const arch_register_req_t *req = arch_get_register_req_out(node);
-       return
-               req->cls == cls &&
-               !(req->type & arch_register_req_type_ignore);
-}
-
-static inline bool arch_irn_is_ignore(const ir_node *irn)
-{
-       const arch_register_req_t *req = arch_get_register_req_out(irn);
-       return !!(req->type & arch_register_req_type_ignore);
-}
-
-#endif
index 36d472c..8ad71c1 100644 (file)
 
 #include "beutil.h"
 #include "besched.h"
-#include "besched_t.h"
+#include "besched.h"
 #include "belive_t.h"
 #include "benode_t.h"
-#include "bearch_t.h"
+#include "bearch.h"
 #include "beirgmod.h"
 #include "beifg.h"
 #include "beinsn_t.h"
 #include "bestatevent.h"
-#include "beirg_t.h"
+#include "beirg.h"
 #include "beintlive_t.h"
 #include "bera.h"
 #include "bechordal_t.h"
index fdcff5c..f349a76 100644 (file)
@@ -38,9 +38,9 @@
 
 #include "belive_t.h"
 #include "bechordal_t.h"
-#include "besched_t.h"
+#include "besched.h"
 #include "bechordal_draw.h"
-#include "beirg_t.h"
+#include "beirg.h"
 
 typedef struct {
        be_chordal_env_t *env;
index e633def..4cc4c30 100644 (file)
@@ -58,9 +58,9 @@
 #include "beabi.h"
 #include "beutil.h"
 #include "besched.h"
-#include "besched_t.h"
+#include "besched.h"
 #include "belive_t.h"
-#include "bearch_t.h"
+#include "bearch.h"
 #include "beifg_t.h"
 #include "beifg_impl.h"
 #include "benode_t.h"
@@ -69,7 +69,7 @@
 #include "bemodule.h"
 #include "be_t.h"
 #include "bera.h"
-#include "beirg_t.h"
+#include "beirg.h"
 
 #include "bespillslots.h"
 #include "bespilloptions.h"
index 49bec0a..ca7fc8b 100644 (file)
@@ -42,7 +42,7 @@
 #include "becopyopt_t.h"
 #include "becopystat.h"
 #include "beintlive_t.h"
-#include "beirg_t.h"
+#include "beirg.h"
 
 DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;)
 
index 8f257c0..801f673 100644 (file)
@@ -52,7 +52,7 @@
 #include "becopyopt.h"
 #include "becopyopt_t.h"
 #include "bechordal_t.h"
-#include "beirg_t.h"
+#include "beirg.h"
 
 #define DUMP_BEFORE 1
 #define DUMP_AFTER  2
index b4242fe..3a9446a 100644 (file)
@@ -30,7 +30,7 @@
 #include "irprintf.h"
 
 #include "bestatevent.h"
-#include "beirg_t.h"
+#include "beirg.h"
 #include "bemodule.h"
 #include "error.h"
 
index e3d7963..2dd2ae5 100644 (file)
@@ -56,7 +56,7 @@
 #include "irgwalk.h"
 #include "becopyilp_t.h"
 #include "beifg_t.h"
-#include "besched_t.h"
+#include "besched.h"
 
 #define DEBUG_LVL 1
 
index 03502b3..6c0da07 100644 (file)
@@ -48,7 +48,7 @@
 #include "irprintf_t.h"
 
 #include "bemodule.h"
-#include "bearch_t.h"
+#include "bearch.h"
 #include "benode_t.h"
 #include "beutil.h"
 #include "beifg_t.h"
@@ -57,9 +57,9 @@
 #include "becopystat.h"
 #include "belive_t.h"
 #include "beinsn_t.h"
-#include "besched_t.h"
+#include "besched.h"
 #include "bestatevent.h"
-#include "beirg_t.h"
+#include "beirg.h"
 #include "error.h"
 
 #include "lc_opts.h"
index 2519c64..89d5748 100644 (file)
@@ -32,7 +32,7 @@
 #include "set.h"
 #include "irnode_t.h"
 
-#include "bearch_t.h"
+#include "bearch.h"
 #include "bechordal_t.h"
 #include "becopyopt.h"
 
index 666d245..bbd72f0 100644 (file)
@@ -41,7 +41,7 @@
 #include "beutil.h"
 #include "becopyopt_t.h"
 #include "becopystat.h"
-#include "beirg_t.h"
+#include "beirg.h"
 #include "bemodule.h"
 #include "beintlive_t.h"
 
index ed41dfc..a341430 100644 (file)
@@ -28,7 +28,7 @@
 #define FIRM_BE_BECOPYSTAT_H
 
 #include "firm_types.h"
-#include "bearch_t.h"
+#include "bearch.h"
 #include "bechordal_t.h"
 
 void copystat_add_max_costs(int costs);
index 5bd9ea1..be8dadc 100644 (file)
 #define FIRM_BE_BEDOMFRONT_H
 
 #include "firm_types.h"
-
-/*
- * Forward type declaration.
- */
-typedef struct _be_dom_front_info_t be_dom_front_info_t;
+#include "be_types.h"
 
 /**
  * Compute the dominance frontiers for a given graph.
index 43d7138..2da9bcd 100644 (file)
 #include "error.h"
 
 #include "beflags.h"
-#include "bearch_t.h"
-#include "beirg_t.h"
-#include "besched_t.h"
+#include "bearch.h"
+#include "beirg.h"
+#include "besched.h"
 #include "benode_t.h"
+#include "belive.h"
 
 static const arch_register_class_t *flag_class = NULL;
 static const arch_register_t       *flags_reg  = NULL;
index f7f173c..c047a14 100644 (file)
@@ -46,7 +46,7 @@
 
 #include "becopystat.h"
 #include "becopyopt.h"
-#include "beirg_t.h"
+#include "beirg.h"
 #include "bemodule.h"
 
 /** Defines values for the ifg performance test */
index 1100878..4fe6412 100644 (file)
@@ -36,7 +36,7 @@
 #include "irgwalk.h"
 #include "irbitset.h"
 
-#include "bearch_t.h"
+#include "bearch.h"
 #include "be_t.h"
 #include "beintlive_t.h"
 #include "beifg_t.h"
index 5482104..fb81c27 100644 (file)
@@ -34,7 +34,7 @@
 #include "irgraph_t.h"
 #include "irgwalk.h"
 
-#include "bearch_t.h"
+#include "bearch.h"
 #include "be_t.h"
 #include "bera.h"
 #include "beifg_t.h"
index 21a6c78..e9330a1 100644 (file)
 #include "irgwalk.h"
 #include "irtools.h"
 
-#include "bearch_t.h"
+#include "bearch.h"
 #include "be_t.h"
 #include "belive_t.h"
 #include "bera.h"
 #include "beifg_t.h"
 #include "bechordal_t.h"
-#include "beirg_t.h"
+#include "beirg.h"
 #include "beintlive_t.h"
 
 typedef struct _ifg_std_t ifg_std_t;
index 4381594..105e139 100644 (file)
 
 #include "be.h"
 #include "benode_t.h"
-#include "besched_t.h"
+#include "besched.h"
 #include "beilpsched.h"
 #include "beutil.h"
 #include "bestat.h"
-#include "beirg_t.h"
+#include "beirg.h"
+#include "bemachine.h"
+#include "belistsched.h"
 
 typedef struct _ilpsched_options_t {
        unsigned regpress;
index 6b23d0b..fed571d 100644 (file)
@@ -34,9 +34,7 @@
 
 #include "irgraph.h"
 #include "irnode.h"
-
-typedef struct _ilp_sched_selector_t    ilp_sched_selector_t;
-typedef struct _ilp_sched_selector_if_t ilp_sched_selector_if_t;
+#include "be_types.h"
 
 /**
  * A selector interface which is used by the ILP schedule framework.
index e18baff..a72c4ea 100644 (file)
@@ -25,7 +25,7 @@
 #include "config.h"
 
 #include "beinfo.h"
-#include "bearch_t.h"
+#include "bearch.h"
 #include "irgwalk.h"
 #include "irnode_t.h"
 #include "error.h"
index 9599648..a7a4a0c 100644 (file)
 #ifndef FIRM_BE_BEINFO_H
 #define FIRM_BE_BEINFO_H
 
-#include "bearch.h"
-#include "irphase_t.h"
-#include "irphases_t.h"
-
-typedef unsigned int sched_timestep_t;
+#include "be_types.h"
+#include "irnode_t.h"
 
 /**
  * The schedule structure which is present at each ir node.
@@ -38,23 +35,23 @@ typedef unsigned int sched_timestep_t;
  * Currently, only basic blocks are scheduled. The list head of
  * every block schedule list is the Block list.
  */
-typedef struct sched_info_t {
+struct sched_info_t {
        ir_node          *next;
        ir_node          *prev;
        sched_timestep_t  time_step;    /**< If a is after b in a schedule, its time step is larger than b's. */
-} sched_info_t;
+};
 
-typedef struct reg_out_info_t {
+struct reg_out_info_t {
        const arch_register_t     *reg;
        const arch_register_req_t *req;
-} reg_out_info_t;
+};
 
-typedef struct backend_info_t {
+struct backend_info_t {
        sched_info_t                sched_info;
        const arch_register_req_t **in_reqs;
        reg_out_info_t             *out_infos;
        arch_irn_flags_t            flags;
-} backend_info_t;
+};
 
 static inline backend_info_t *be_get_info(const ir_node *node)
 {
index 6ae5612..b8bc71c 100644 (file)
@@ -30,9 +30,9 @@
 #include "irnode_t.h"
 #include "iredges.h"
 
-#include "besched_t.h"
+#include "besched.h"
 #include "beinsn_t.h"
-#include "beirg_t.h"
+#include "beirg.h"
 #include "beabi.h"
 #include "raw_bitset.h"
 
index eca135b..e694d01 100644 (file)
@@ -18,8 +18,8 @@
 
 #include "statev.h"
 
-#include "beirg_t.h"
-#include "besched_t.h"
+#include "beirg.h"
+#include "besched.h"
 #include "belive_t.h"
 
 /**
index 4416228..c19bac6 100644 (file)
 #include "config.h"
 
 #include "execfreq.h"
-#include "beirg_t.h"
+#include "beirg.h"
 #include "absgraph.h"
+#include "belive.h"
+#include "bedomfront.h"
 
 be_lv_t *be_assure_liveness(be_irg_t *birg)
 {
@@ -69,28 +71,3 @@ void be_free_birg(be_irg_t *birg)
                birg->lv = NULL;
        }
 }
-
-ir_graph *(be_get_birg_irg)(const be_irg_t *birg)
-{
-       return _be_get_birg_irg(birg);
-}
-
-ir_exec_freq *(be_get_birg_exec_freq)(const be_irg_t *birg)
-{
-       return _be_get_birg_exec_freq(birg);
-}
-
-be_lv_t *(be_get_birg_liveness)(const be_irg_t *birg)
-{
-       return _be_get_birg_liveness(birg);
-}
-
-be_dom_front_info_t *(be_get_birg_dom_front)(const be_irg_t *birg)
-{
-       return _be_get_birg_dom_front(birg);
-}
-
-const arch_env_t *(be_get_birg_arch_env)(const be_irg_t *birg)
-{
-       return _be_get_birg_arch_env(birg);
-}
index 9bc2c0f..fcfa26b 100644 (file)
 #ifndef FIRM_BE_BEIRG_H
 #define FIRM_BE_BEIRG_H
 
-#include "belive.h"
-#include "bedomfront.h"
-
-typedef struct be_irg_t be_irg_t;
-
-ir_graph *be_get_birg_irg(const be_irg_t *birg);
+#include "be.h"
+#include "be_types.h"
+#include "be_t.h"
 
 be_lv_t *be_assure_liveness(be_irg_t *birg);
-be_lv_t *be_get_birg_liveness(const be_irg_t *birg);
 
 void be_assure_dom_front(be_irg_t *birg);
 void be_invalidate_dom_front(be_irg_t *birg);
-be_dom_front_info_t *be_get_birg_dom_front(const be_irg_t *birg);
-
-const arch_env_t *be_get_birg_arch_env(const be_irg_t *birg);
-
-ir_exec_freq *be_get_birg_exec_freq(const be_irg_t *birg);
 
 /**
  * frees all memory allocated by birg structures (liveness, dom_front, ...).
@@ -51,4 +42,43 @@ ir_exec_freq *be_get_birg_exec_freq(const be_irg_t *birg);
  */
 void be_free_birg(be_irg_t *birg);
 
+/**
+ * An ir_graph with additional analysis data about this irg. Also includes some
+ * backend structures
+ */
+struct be_irg_t {
+       ir_graph               *irg;
+       be_main_env_t          *main_env;
+       be_abi_irg_t           *abi;
+       arch_code_generator_t  *cg;
+       ir_exec_freq           *exec_freq;
+       be_dom_front_info_t    *dom_front;
+       be_lv_t                *lv;
+};
+
+static inline be_lv_t *
+be_get_birg_liveness(const be_irg_t *birg) {
+       return birg->lv;
+}
+
+static inline ir_exec_freq *
+be_get_birg_exec_freq(const be_irg_t *birg) {
+       return birg->exec_freq;
+}
+
+static inline be_dom_front_info_t *
+be_get_birg_dom_front(const be_irg_t *birg) {
+       return birg->dom_front;
+}
+
+static inline ir_graph *
+be_get_birg_irg(const be_irg_t *birg) {
+       return birg->irg;
+}
+
+static inline const arch_env_t *
+be_get_birg_arch_env(const be_irg_t *birg) {
+       return birg->main_env->arch_env;
+}
+
 #endif /* FIRM_BE_BEIRG_H */
diff --git a/ir/be/beirg_t.h b/ir/be/beirg_t.h
deleted file mode 100644 (file)
index c2e3437..0000000
+++ /dev/null
@@ -1,79 +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       Backend irg - a ir_graph with additional analysis information.
- * @author      Matthias Braun
- * @date        05.05.2006
- * @version     $Id$
- */
-#ifndef FIRM_BE_BEIRG_T_H
-#define FIRM_BE_BEIRG_T_H
-
-#include "beirg.h"
-#include "be_t.h"
-#include "beabi.h"
-#include "irlivechk.h"
-
-/**
- * An ir_graph with additional analysis data about this irg. Also includes some
- * backend structures
- */
-struct be_irg_t {
-       ir_graph               *irg;
-       be_main_env_t          *main_env;
-       be_abi_irg_t           *abi;
-       arch_code_generator_t  *cg;
-       ir_exec_freq           *exec_freq;
-       be_dom_front_info_t    *dom_front;
-       be_lv_t                *lv;
-};
-
-static inline be_lv_t *
-_be_get_birg_liveness(const be_irg_t *birg) {
-       return birg->lv;
-}
-
-static inline ir_exec_freq *
-_be_get_birg_exec_freq(const be_irg_t *birg) {
-       return birg->exec_freq;
-}
-
-static inline be_dom_front_info_t *
-_be_get_birg_dom_front(const be_irg_t *birg) {
-       return birg->dom_front;
-}
-
-static inline ir_graph *
-_be_get_birg_irg(const be_irg_t *birg) {
-       return birg->irg;
-}
-
-static inline const arch_env_t *
-_be_get_birg_arch_env(const be_irg_t *birg) {
-       return birg->main_env->arch_env;
-}
-
-#define be_get_birg_exec_freq(birg)        _be_get_birg_exec_freq(birg)
-#define be_get_birg_liveness(birg)         _be_get_birg_liveness(birg)
-#define be_get_birg_dom_front(birg)        _be_get_birg_dom_front(birg)
-#define be_get_birg_irg(birg)              _be_get_birg_irg(birg)
-
-#endif /* FIRM_BE_BEIRG_T_H */
index 393ba58..35549b9 100644 (file)
 
 #include "be_t.h"
 #include "bechordal_t.h"
-#include "bearch_t.h"
-#include "besched_t.h"
+#include "bearch.h"
+#include "besched.h"
 #include "belive_t.h"
 #include "benode_t.h"
 #include "beutil.h"
 #include "beinsn_t.h"
 #include "bessaconstr.h"
-#include "beirg_t.h"
+#include "beirg.h"
 #include "beirgmod.h"
 #include "bemodule.h"
 
index 254da32..9af2a53 100644 (file)
 #include "irtools.h"
 
 #include "bemodule.h"
-#include "besched_t.h"
+#include "besched.h"
 #include "beutil.h"
 #include "belive_t.h"
 #include "belistsched.h"
 #include "beschedmris.h"
 #include "beschedrss.h"
-#include "bearch_t.h"
+#include "bearch.h"
 #include "bestat.h"
-#include "beirg_t.h"
+#include "beirg.h"
 
 #include "lc_opts.h"
 #include "lc_opts_enum.h"
index d98d3ed..f171575 100644 (file)
 #include "irnodeset.h"
 
 #include "be.h"
+#include "be_types.h"
 #include "bearch.h"
 #include "beirg.h"
 
-typedef struct _list_sched_selector_t list_sched_selector_t;
-
 /**
  * A selector interface which is used by the list schedule framework.
  * You can implement your own list scheduler by implementing these
index 1e3e7f4..267a4f5 100644 (file)
@@ -43,8 +43,8 @@
 
 #include "beutil.h"
 #include "belive_t.h"
-#include "beirg_t.h"
-#include "besched_t.h"
+#include "beirg.h"
+#include "besched.h"
 #include "bemodule.h"
 
 DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;)
index 360a56a..ffad8b0 100644 (file)
@@ -29,6 +29,8 @@
 
 #include <stdio.h>
 
+#include "be_types.h"
+
 #include "firm_types.h"
 #include "pset.h"
 
@@ -44,10 +46,6 @@ typedef enum {
        be_lv_state_out = 4,
 } be_lv_state_t;
 
-typedef struct _be_lv_t be_lv_t;
-
-typedef struct _be_lv_info_t be_lv_info_t;
-
 /**
  * Compute the inter block liveness for a graph.
  * @param irg The graph.
index f256bc3..76e0a63 100644 (file)
@@ -34,7 +34,7 @@
 #include "error.h"
 #include "debug.h"
 
-#include "bearch_t.h"
+#include "bearch.h"
 #include "belive.h"
 #include "besched.h"
 #include "beloopana.h"
index 306f06e..a3751c6 100644 (file)
 #include "irgwalk.h"
 #include "array_t.h"
 
-#include "bearch_t.h"
+#include "bearch.h"
 #include "belower.h"
 #include "benode_t.h"
-#include "besched_t.h"
+#include "besched.h"
 #include "bestat.h"
 #include "bessaconstr.h"
 #include "beintlive_t.h"
index 75ddc28..31922d1 100644 (file)
@@ -27,9 +27,7 @@
 #ifndef FIRM_BE_BEMACHINE_H
 #define FIRM_BE_BEMACHINE_H
 
-typedef struct _be_execution_unit_type_t be_execution_unit_type_t;
-typedef struct _be_execution_unit_t      be_execution_unit_t;
-typedef struct _be_machine_t             be_machine_t;
+#include "be_types.h"
 
 struct _be_execution_unit_t {
        be_execution_unit_type_t *tp;
index 8400749..7d5d04c 100644 (file)
 #include "execfreq.h"
 #include "irprofile.h"
 
-#include "bearch_t.h"
+#include "bearch.h"
 #include "be_t.h"
 #include "bemodule.h"
 #include "beutil.h"
 #include "benode_t.h"
 #include "beirgmod.h"
-#include "besched_t.h"
+#include "besched.h"
 #include "belistsched.h"
 #include "belive_t.h"
 #include "bera.h"
@@ -73,7 +73,7 @@
 #include "bestat.h"
 #include "beverify.h"
 #include "be_dbgout.h"
-#include "beirg_t.h"
+#include "beirg.h"
 
 #define NEW_ID(s) new_id_from_chars(s, sizeof(s) - 1)
 
index 858c980..e29fffc 100644 (file)
  *    add copies and split live-ranges.
  *
  * TODO:
+ *  - make use of free registers in the permutate_values code
  *  - output constraints are not ensured. The algorithm fails to copy values
  *    away, so the registers for constrained outputs are free.
  *  - must_be_different constraint is not respected
- *  - No parallel copies at basic block borders are created, no additional phis
- *    created after copies have been inserted.
+ *  - We have to pessimistically construct Phi_0s when not all predecessors
+ *    of a block are known.
  *  - Phi color assignment should give bonus points towards registers already
  *    assigned at predecessors.
  *  - think about a smarter sequence of visiting the blocks. Sorted by
@@ -67,8 +68,8 @@
 #include "belive_t.h"
 #include "bemodule.h"
 #include "bechordal_t.h"
-#include "besched_t.h"
-#include "beirg_t.h"
+#include "besched.h"
+#include "beirg.h"
 #include "benode_t.h"
 #include "bespill.h"
 #include "bespilloptions.h"
@@ -481,7 +482,8 @@ static void assign_reg(const ir_node *block, ir_node *node)
                unsigned r = reg_prefs[i].num;
                /* ignores should be last and we should have a non-ignore left */
                assert(!bitset_is_set(ignore_regs, r));
-               /* already used? TODO: It might be better to copy the value occupying the register around here, find out when... */
+               /* already used?
+           TODO: It might be better to copy the value occupying the register around here, find out when... */
                if (assignments[r].value != NULL)
                        continue;
                reg = arch_register_for_index(cls, r);
@@ -1025,8 +1027,7 @@ static void allocate_coalesce_block(ir_node *block, void *data)
 
        /* assign regs for live-in values */
        foreach_ir_nodeset(&live_nodes, node, iter) {
-               const arch_register_t *reg;
-               reg = arch_get_irn_register(node);
+               const arch_register_t *reg = arch_get_irn_register(node);
                if (reg != NULL)
                        continue;
 
@@ -1063,6 +1064,7 @@ static void allocate_coalesce_block(ir_node *block, void *data)
                        }
                }
 
+               /* free registers of values last used at this instruction */
                free_last_uses(&live_nodes, node);
 
                /* assign output registers */
@@ -1192,11 +1194,18 @@ static void be_straight_alloc(be_irg_t *new_birg)
 
                bitset_free(ignore_regs);
 
-               /* TODO: dump intermediate results */
-
                stat_ev_ctx_pop("bestraight_cls");
        }
 
+       BE_TIMER_PUSH(t_verify);
+       if (birg->main_env->options->vrfy_option == BE_CH_VRFY_WARN) {
+               be_verify_register_allocation(birg);
+       } else if(birg->main_env->options->vrfy_option == BE_CH_VRFY_ASSERT) {
+               assert(be_verify_register_allocation(birg)
+                               && "Register allocation invalid");
+       }
+       BE_TIMER_POP(t_verify);
+
        obstack_free(&obst, NULL);
 }
 
index cbe54c0..d29e101 100644 (file)
@@ -53,9 +53,9 @@
 
 #include "be_t.h"
 #include "belive_t.h"
-#include "besched_t.h"
+#include "besched.h"
 #include "benode_t.h"
-#include "bearch_t.h"
+#include "bearch.h"
 
 #include "beirgmod.h"
 
index c8869dd..ca5bb2e 100644 (file)
 #include "irgmod.h"
 #include "error.h"
 
-#include "beirg_t.h"
+#include "beirg.h"
 #include "belive_t.h"
-#include "bearch_t.h"
+#include "bearch.h"
 #include "benode_t.h"
-#include "besched_t.h"
+#include "besched.h"
 #include "bemodule.h"
 
 DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;)
index cca76d9..c14c82e 100644 (file)
@@ -28,7 +28,7 @@
 #define BEPEEPHOLE_H
 
 #include "beirg.h"
-#include "bearch_t.h"
+#include "bearch.h"
 
 extern ir_node ***register_values;
 
index 90ad0a3..a9f723a 100644 (file)
 
 #include "be_t.h"
 #include "belive_t.h"
-#include "besched_t.h"
+#include "besched.h"
 #include "beirgmod.h"
-#include "bearch_t.h"
+#include "bearch.h"
 #include "benode_t.h"
 #include "beutil.h"
 #include "bespill.h"
-#include "beirg_t.h"
+#include "beirg.h"
 
 #define MAXPRESSURE 128
 
index 0997b0d..81bc21e 100644 (file)
@@ -38,7 +38,7 @@
 
 #include "bera.h"
 #include "beutil.h"
-#include "besched_t.h"
+#include "besched.h"
 #include "belive_t.h"
 #include "bemodule.h"
 
index 88d192a..9f5699e 100644 (file)
 #include "debug.h"
 
 #include "bemodule.h"
-#include "bearch_t.h"
-#include "besched_t.h"
+#include "bearch.h"
+#include "besched.h"
 #include "beutil.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 *)
index 398232f..b1e542f 100644 (file)
@@ -31,6 +31,8 @@
 #include "irgraph.h"
 #include "irnode.h"
 #include "beirg.h"
+#include "beinfo.h"
+#include "beutil.h"
 
 void be_sched_dump(FILE *f, ir_graph *irg);
 
@@ -93,4 +95,337 @@ void    sched_remove(ir_node *irn);
  */
 void be_remove_dead_nodes_from_schedule(be_irg_t *birg);
 
+#define SCHED_INITIAL_GRANULARITY (1 << 14)
+#define get_irn_sched_info(irn)             (&be_get_info(skip_Proj_const(irn))->sched_info)
+
+/**
+ * Returns non-zero if schedule information is available
+ * for a given graph.
+ * @param irg  The graph.
+ */
+static inline int _have_sched_info(const ir_graph *irg)
+{
+       return be_info_initialized(irg);
+}
+
+/**
+ * Check, if the node is scheduled.
+ * @param irn The node.
+ * @return 1, if the node is scheduled, 0 if not.
+ */
+static inline int _sched_is_scheduled(const ir_node *irn)
+{
+       return get_irn_sched_info(irn)->next != NULL;
+}
+
+/**
+ * Get the time step of an irn in a schedule.
+ * @param irn The node.
+ * @return The time step in the schedule.
+ */
+static inline int _sched_get_time_step(const ir_node *irn)
+{
+       assert(_sched_is_scheduled(irn));
+       return get_irn_sched_info(irn)->time_step;
+}
+
+/**
+ * Checks, if a node is to appear in a schedule. Such nodes either
+ * consume real data (mode datab) or produce such.
+ * @param irn The node to check for.
+ * @return 1, if the node consumes/produces data, false if not.
+ */
+static inline int to_appear_in_schedule(const ir_node *irn)
+{
+       switch(get_irn_opcode(irn)) {
+               case iro_Start:
+               case iro_Jmp:
+               case iro_Break:
+                       return 1;
+               case iro_Proj:
+                       return 0;
+               default:
+                       return is_data_node(irn);
+       }
+}
+
+/**
+ * Check, if an ir_node has a scheduling successor.
+ * @param irn The ir node.
+ * @return 1, if the node has a scheduling successor, 0 if not.
+ */
+static inline int _sched_has_next(const ir_node *irn)
+{
+       const sched_info_t *info  = get_irn_sched_info(irn);
+       const ir_node      *block = is_Block(irn) ? irn : get_nodes_block(irn);
+       return info->next != block;
+}
+
+/**
+ * Check, if an ir_node has a scheduling predecessor.
+ * @param irn The ir node.
+ * @return 1, if the node has a scheduling predecessor, 0 if not.
+ */
+static inline int _sched_has_prev(const ir_node *irn)
+{
+       const sched_info_t *info  = get_irn_sched_info(irn);
+       const ir_node      *block = is_Block(irn) ? irn : get_nodes_block(irn);
+       return info->prev != block;
+}
+
+/**
+ * Get the scheduling successor of a node.
+ * @param irn The node.
+ * @return The next ir node in the schedule or the block, if the node has no next node.
+ */
+static inline ir_node *_sched_next(const ir_node *irn)
+{
+       const sched_info_t *info = get_irn_sched_info(irn);
+       return info->next;
+}
+
+/**
+ * Get the scheduling predecessor of a node.
+ * @param irn The node.
+ * @return The next ir node in the schedule or the block, if the node has no predecessor.
+ * predecessor.
+ */
+static inline ir_node *_sched_prev(const ir_node *irn)
+{
+       const sched_info_t *info = get_irn_sched_info(irn);
+       return info->prev;
+}
+
+/**
+ * Get the first node in a block schedule.
+ * @param block The block of which to get the schedule.
+ * @return The first node in the schedule or the block itself
+ *         if there is no node in the schedule.
+ */
+static inline ir_node *_sched_first(const ir_node *block)
+{
+       assert(is_Block(block) && "Need a block here");
+       return _sched_next(block);
+}
+
+/**
+ * Get the last node in a schedule.
+ * @param  block The block to get the schedule for.
+ * @return The last ir node in a schedule, or the block itself
+ *         if there is no node in the schedule.
+ */
+static inline ir_node *_sched_last(const ir_node *block)
+{
+       assert(is_Block(block) && "Need a block here");
+       return _sched_prev(block);
+}
+
+/**
+ * Reassign the time steps in the schedule.
+ * @param block The schedule to update.
+ */
+void sched_renumber(const ir_node *block);
+
+static inline void _sched_set_time_stamp(const ir_node *irn)
+{
+       sched_info_t       *info      = get_irn_sched_info(irn);
+       const sched_info_t *prev_info = get_irn_sched_info(info->prev);
+       const sched_info_t *next_info = get_irn_sched_info(info->next);
+       sched_timestep_t    before_ts = prev_info->time_step;
+       sched_timestep_t    after_ts  = next_info->time_step;
+
+       /*
+        * If we are the last, we can give us a big time step,
+        * else we have to compute our time step from our
+        * neighbours.
+        */
+       if(before_ts >= after_ts) {
+               info->time_step = before_ts + SCHED_INITIAL_GRANULARITY;
+               /* overflow? */
+               if (info->time_step <= before_ts) {
+                       sched_renumber(get_nodes_block(irn));
+               }
+       } else {
+               sched_timestep_t ts = (before_ts + after_ts) / 2;
+
+               /*
+                * If the resolution went out, we have to renumber
+                * this block.
+                */
+               if(ts == before_ts || ts == after_ts)
+                       sched_renumber(get_nodes_block(irn));
+               else
+                       info->time_step = ts;
+       }
+}
+
+/**
+ * Add a node to a block schedule.
+ * @param block The block to whose schedule the node shall be added to.
+ * @param irn The node to add.
+ * @return The given node.
+ */
+static inline void _sched_add_before(ir_node *before, ir_node *irn)
+{
+       sched_info_t *info      = get_irn_sched_info(irn);
+       ir_node      *next      = before;
+       sched_info_t *next_info = get_irn_sched_info(next);
+       ir_node      *prev      = next_info->prev;
+       sched_info_t *prev_info = get_irn_sched_info(prev);
+       assert(_sched_is_scheduled(before));
+       assert(!_sched_is_scheduled(irn));
+       assert(!is_Proj(before));
+       assert(!is_Proj(irn));
+
+       info->prev = prev;
+       info->next = next;
+       prev_info->next = irn;
+       next_info->prev = irn;
+       _sched_set_time_stamp(irn);
+}
+
+/**
+ * Add a node to a block schedule.
+ * @param block The block to whose schedule the node shall be added to.
+ * @param irn The node to add.
+ * @return The given node.
+ */
+static inline void _sched_add_after(ir_node *after, ir_node *irn)
+{
+       sched_info_t *info      = get_irn_sched_info(irn);
+       ir_node      *prev      = after;
+       sched_info_t *prev_info = get_irn_sched_info(prev);
+       ir_node      *next      = prev_info->next;
+       sched_info_t *next_info = get_irn_sched_info(next);
+       assert(_sched_is_scheduled(after));
+       assert(!_sched_is_scheduled(irn));
+       assert(!is_Proj(after));
+       assert(!is_Proj(irn));
+
+       info->prev = prev;
+       info->next = next;
+       prev_info->next = irn;
+       next_info->prev = irn;
+       _sched_set_time_stamp(irn);
+}
+
+static inline void _sched_init_block(ir_node *block)
+{
+       sched_info_t *info = get_irn_sched_info(block);
+       assert(info->next == NULL && info->time_step == 0);
+       info->next = block;
+       info->prev = block;
+}
+
+static inline void _sched_reset(ir_node *node)
+{
+       sched_info_t *info = get_irn_sched_info(node);
+       info->next = NULL;
+       info->prev = NULL;
+}
+
+/**
+ * Remove a node from the scheduled.
+ * @param irn The node.
+ */
+static inline void _sched_remove(ir_node *irn)
+{
+       sched_info_t *info      = get_irn_sched_info(irn);
+       ir_node      *prev      = info->prev;
+       ir_node      *next      = info->next;
+       sched_info_t *prev_info = get_irn_sched_info(prev);
+       sched_info_t *next_info = get_irn_sched_info(next);
+       assert(_sched_is_scheduled(irn));
+
+       prev_info->next = next;
+       next_info->prev = prev;
+       info->next      = NULL;
+       info->prev      = NULL;
+}
+
+/**
+ * Compare two nodes according to their position in the schedule.
+ * @param a The first node.
+ * @param b The second node.
+ * @return A number smaller, equals to or larger than 0, if a is
+ *         before, the same, or after b in the schedule.
+ */
+static inline int _sched_cmp(const ir_node *a, const ir_node *b)
+{
+       assert(_sched_is_scheduled(a) && _sched_is_scheduled(b));
+       assert(get_nodes_block(a) == get_nodes_block(b));
+
+       return get_irn_sched_info(a)->time_step - get_irn_sched_info(b)->time_step;
+}
+
+/**
+ * Checks, if one node is scheduled before another.
+ * @param n1   A node.
+ * @param n2   Another node.
+ * @return     1, if n1 is in front of n2 in the schedule, 0 else.
+ * @note       Both nodes must be in the same block.
+ */
+static inline int _sched_comes_after(const ir_node *n1, const ir_node *n2)
+{
+       assert(_sched_is_scheduled(n1));
+       assert(_sched_is_scheduled(n2));
+       assert((is_Block(n1) ? n1 : get_nodes_block(n1)) == (is_Block(n2) ? n2 : get_nodes_block(n2)));
+       return _sched_get_time_step(n1) < _sched_get_time_step(n2);
+}
+
+/**
+ * A predicate for a node.
+ * @param irn The node.
+ * @param data The custom data.
+ * @return 1 if irn should be skipped. Else 0.
+ */
+typedef int (sched_predicator_t)(const ir_node *irn, void *data);
+
+/**
+ * Predicate for sched_skip(), returns non-zero if irn is a control flow changing node.
+ *
+ * @param irn   the node to evaluate
+ * @param data  unused
+ */
+int sched_skip_cf_predicator(const ir_node *irn, void *data);
+
+/**
+ * Predicate for sched_skip(), returns non-zero if irn is a Phi node.
+ *
+ * Used with sched_skip().
+ *
+ * @param irn  the node to evaluate
+ * @param data unused
+ */
+int sched_skip_phi_predicator(const ir_node *irn, void *data);
+
+/**
+ * Skip nodes in a schedule.
+ * @param from        The node to start from.
+ * @param forward     The direction (1 for forward, 0 for backward).
+ * @param predicator  The predicator function which decides what is skipped.
+ * @param data        context parameter for the predicator.
+ *
+ * @return The first node not rejected by the predicator or the block
+ *         itself if all nodes were rejected.
+ */
+ir_node *sched_skip(ir_node *from, int forward, sched_predicator_t *predicator, void *data);
+
+#define have_sched_info(irg)            _have_sched_info(irg)
+#define sched_get_time_step(irn)        _sched_get_time_step(irn)
+#define sched_has_next(irn)             _sched_has_next(irn)
+#define sched_has_prev(irn)             _sched_has_prev(irn)
+#define sched_next(irn)                 _sched_next(irn)
+#define sched_prev(irn)                 _sched_prev(irn)
+#define sched_first(irn)                _sched_first(irn)
+#define sched_last(irn)                 _sched_last(irn)
+#define sched_add_before(before, irn)   _sched_add_before(before, irn)
+#define sched_add_after(after, irn)     _sched_add_after(after, irn)
+#define sched_remove(irn)               _sched_remove(irn)
+#define sched_is_scheduled(irn)         _sched_is_scheduled(irn)
+#define sched_comes_after(n1, n2)       _sched_comes_after(n1, n2)
+#define sched_cmp(a, b)                 _sched_cmp(a, b)
+
+
+
 #endif
diff --git a/ir/be/besched_t.h b/ir/be/besched_t.h
deleted file mode 100644 (file)
index ebba2d0..0000000
+++ /dev/null
@@ -1,371 +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       Scheduling utilities for nodes in Blocks and Blocks.
- * @author      Sebastian Hack, Matthias Braun
- * @version     $Id$
- */
-#ifndef FIRM_BE_BESCHED_T_H
-#define FIRM_BE_BESCHED_T_H
-
-#define SCHED_INITIAL_GRANULARITY (1 << 14)
-
-#include "list.h"
-#include "irnode_t.h"
-#include "irgraph_t.h"
-#include "irphase_t.h"
-#include "irphases_t.h"
-
-#include "beutil.h"
-#include "besched.h"
-#include "beinfo.h"
-
-#define get_irn_sched_info(irn)             (&be_get_info(skip_Proj_const(irn))->sched_info)
-
-/**
- * Returns non-zero if schedule information is available
- * for a given graph.
- * @param irg  The graph.
- */
-static inline int _have_sched_info(const ir_graph *irg)
-{
-       return be_info_initialized(irg);
-}
-
-/**
- * Check, if the node is scheduled.
- * @param irn The node.
- * @return 1, if the node is scheduled, 0 if not.
- */
-static inline int _sched_is_scheduled(const ir_node *irn)
-{
-       return get_irn_sched_info(irn)->next != NULL;
-}
-
-/**
- * Get the time step of an irn in a schedule.
- * @param irn The node.
- * @return The time step in the schedule.
- */
-static inline int _sched_get_time_step(const ir_node *irn)
-{
-       assert(_sched_is_scheduled(irn));
-       return get_irn_sched_info(irn)->time_step;
-}
-
-/**
- * Checks, if a node is to appear in a schedule. Such nodes either
- * consume real data (mode datab) or produce such.
- * @param irn The node to check for.
- * @return 1, if the node consumes/produces data, false if not.
- */
-static inline int to_appear_in_schedule(const ir_node *irn)
-{
-       switch(get_irn_opcode(irn)) {
-               case iro_Start:
-               case iro_Jmp:
-               case iro_Break:
-                       return 1;
-               case iro_Proj:
-                       return 0;
-               default:
-                       return is_data_node(irn);
-       }
-}
-
-/**
- * Check, if an ir_node has a scheduling successor.
- * @param irn The ir node.
- * @return 1, if the node has a scheduling successor, 0 if not.
- */
-static inline int _sched_has_next(const ir_node *irn)
-{
-       const sched_info_t *info  = get_irn_sched_info(irn);
-       const ir_node      *block = is_Block(irn) ? irn : get_nodes_block(irn);
-       return info->next != block;
-}
-
-/**
- * Check, if an ir_node has a scheduling predecessor.
- * @param irn The ir node.
- * @return 1, if the node has a scheduling predecessor, 0 if not.
- */
-static inline int _sched_has_prev(const ir_node *irn)
-{
-       const sched_info_t *info  = get_irn_sched_info(irn);
-       const ir_node      *block = is_Block(irn) ? irn : get_nodes_block(irn);
-       return info->prev != block;
-}
-
-/**
- * Get the scheduling successor of a node.
- * @param irn The node.
- * @return The next ir node in the schedule or the block, if the node has no next node.
- */
-static inline ir_node *_sched_next(const ir_node *irn)
-{
-       const sched_info_t *info = get_irn_sched_info(irn);
-       return info->next;
-}
-
-/**
- * Get the scheduling predecessor of a node.
- * @param irn The node.
- * @return The next ir node in the schedule or the block, if the node has no predecessor.
- * predecessor.
- */
-static inline ir_node *_sched_prev(const ir_node *irn)
-{
-       const sched_info_t *info = get_irn_sched_info(irn);
-       return info->prev;
-}
-
-/**
- * Get the first node in a block schedule.
- * @param block The block of which to get the schedule.
- * @return The first node in the schedule or the block itself
- *         if there is no node in the schedule.
- */
-static inline ir_node *_sched_first(const ir_node *block)
-{
-       assert(is_Block(block) && "Need a block here");
-       return _sched_next(block);
-}
-
-/**
- * Get the last node in a schedule.
- * @param  block The block to get the schedule for.
- * @return The last ir node in a schedule, or the block itself
- *         if there is no node in the schedule.
- */
-static inline ir_node *_sched_last(const ir_node *block)
-{
-       assert(is_Block(block) && "Need a block here");
-       return _sched_prev(block);
-}
-
-/**
- * Reassign the time steps in the schedule.
- * @param block The schedule to update.
- */
-void sched_renumber(const ir_node *block);
-
-static inline void _sched_set_time_stamp(const ir_node *irn)
-{
-       sched_info_t       *info      = get_irn_sched_info(irn);
-       const sched_info_t *prev_info = get_irn_sched_info(info->prev);
-       const sched_info_t *next_info = get_irn_sched_info(info->next);
-       sched_timestep_t    before_ts = prev_info->time_step;
-       sched_timestep_t    after_ts  = next_info->time_step;
-
-       /*
-        * If we are the last, we can give us a big time step,
-        * else we have to compute our time step from our
-        * neighbours.
-        */
-       if(before_ts >= after_ts) {
-               info->time_step = before_ts + SCHED_INITIAL_GRANULARITY;
-               /* overflow? */
-               if (info->time_step <= before_ts) {
-                       sched_renumber(get_nodes_block(irn));
-               }
-       } else {
-               sched_timestep_t ts = (before_ts + after_ts) / 2;
-
-               /*
-                * If the resolution went out, we have to renumber
-                * this block.
-                */
-               if(ts == before_ts || ts == after_ts)
-                       sched_renumber(get_nodes_block(irn));
-               else
-                       info->time_step = ts;
-       }
-}
-
-/**
- * Add a node to a block schedule.
- * @param block The block to whose schedule the node shall be added to.
- * @param irn The node to add.
- * @return The given node.
- */
-static inline void _sched_add_before(ir_node *before, ir_node *irn)
-{
-       sched_info_t *info      = get_irn_sched_info(irn);
-       ir_node      *next      = before;
-       sched_info_t *next_info = get_irn_sched_info(next);
-       ir_node      *prev      = next_info->prev;
-       sched_info_t *prev_info = get_irn_sched_info(prev);
-       assert(_sched_is_scheduled(before));
-       assert(!_sched_is_scheduled(irn));
-       assert(!is_Proj(before));
-       assert(!is_Proj(irn));
-
-       info->prev = prev;
-       info->next = next;
-       prev_info->next = irn;
-       next_info->prev = irn;
-       _sched_set_time_stamp(irn);
-}
-
-/**
- * Add a node to a block schedule.
- * @param block The block to whose schedule the node shall be added to.
- * @param irn The node to add.
- * @return The given node.
- */
-static inline void _sched_add_after(ir_node *after, ir_node *irn)
-{
-       sched_info_t *info      = get_irn_sched_info(irn);
-       ir_node      *prev      = after;
-       sched_info_t *prev_info = get_irn_sched_info(prev);
-       ir_node      *next      = prev_info->next;
-       sched_info_t *next_info = get_irn_sched_info(next);
-       assert(_sched_is_scheduled(after));
-       assert(!_sched_is_scheduled(irn));
-       assert(!is_Proj(after));
-       assert(!is_Proj(irn));
-
-       info->prev = prev;
-       info->next = next;
-       prev_info->next = irn;
-       next_info->prev = irn;
-       _sched_set_time_stamp(irn);
-}
-
-static inline void _sched_init_block(ir_node *block)
-{
-       sched_info_t *info = get_irn_sched_info(block);
-       assert(info->next == NULL && info->time_step == 0);
-       info->next = block;
-       info->prev = block;
-}
-
-static inline void _sched_reset(ir_node *node)
-{
-       sched_info_t *info = get_irn_sched_info(node);
-       info->next = NULL;
-       info->prev = NULL;
-}
-
-/**
- * Remove a node from the scheduled.
- * @param irn The node.
- */
-static inline void _sched_remove(ir_node *irn)
-{
-       sched_info_t *info      = get_irn_sched_info(irn);
-       ir_node      *prev      = info->prev;
-       ir_node      *next      = info->next;
-       sched_info_t *prev_info = get_irn_sched_info(prev);
-       sched_info_t *next_info = get_irn_sched_info(next);
-       assert(_sched_is_scheduled(irn));
-
-       prev_info->next = next;
-       next_info->prev = prev;
-       info->next      = NULL;
-       info->prev      = NULL;
-}
-
-/**
- * Compare two nodes according to their position in the schedule.
- * @param a The first node.
- * @param b The second node.
- * @return A number smaller, equals to or larger than 0, if a is
- *         before, the same, or after b in the schedule.
- */
-static inline int _sched_cmp(const ir_node *a, const ir_node *b)
-{
-       assert(_sched_is_scheduled(a) && _sched_is_scheduled(b));
-       assert(get_nodes_block(a) == get_nodes_block(b));
-
-       return get_irn_sched_info(a)->time_step - get_irn_sched_info(b)->time_step;
-}
-
-/**
- * Checks, if one node is scheduled before another.
- * @param n1   A node.
- * @param n2   Another node.
- * @return     1, if n1 is in front of n2 in the schedule, 0 else.
- * @note       Both nodes must be in the same block.
- */
-static inline int _sched_comes_after(const ir_node *n1, const ir_node *n2)
-{
-       assert(_sched_is_scheduled(n1));
-       assert(_sched_is_scheduled(n2));
-       assert((is_Block(n1) ? n1 : get_nodes_block(n1)) == (is_Block(n2) ? n2 : get_nodes_block(n2)));
-       return _sched_get_time_step(n1) < _sched_get_time_step(n2);
-}
-
-/**
- * A predicate for a node.
- * @param irn The node.
- * @param data The custom data.
- * @return 1 if irn should be skipped. Else 0.
- */
-typedef int (sched_predicator_t)(const ir_node *irn, void *data);
-
-/**
- * Predicate for sched_skip(), returns non-zero if irn is a control flow changing node.
- *
- * @param irn   the node to evaluate
- * @param data  unused
- */
-int sched_skip_cf_predicator(const ir_node *irn, void *data);
-
-/**
- * Predicate for sched_skip(), returns non-zero if irn is a Phi node.
- *
- * Used with sched_skip().
- *
- * @param irn  the node to evaluate
- * @param data unused
- */
-int sched_skip_phi_predicator(const ir_node *irn, void *data);
-
-/**
- * Skip nodes in a schedule.
- * @param from        The node to start from.
- * @param forward     The direction (1 for forward, 0 for backward).
- * @param predicator  The predicator function which decides what is skipped.
- * @param data        context parameter for the predicator.
- *
- * @return The first node not rejected by the predicator or the block
- *         itself if all nodes were rejected.
- */
-ir_node *sched_skip(ir_node *from, int forward, sched_predicator_t *predicator, void *data);
-
-#define have_sched_info(irg)            _have_sched_info(irg)
-#define sched_get_time_step(irn)        _sched_get_time_step(irn)
-#define sched_has_next(irn)             _sched_has_next(irn)
-#define sched_has_prev(irn)             _sched_has_prev(irn)
-#define sched_next(irn)                 _sched_next(irn)
-#define sched_prev(irn)                 _sched_prev(irn)
-#define sched_first(irn)                _sched_first(irn)
-#define sched_last(irn)                 _sched_last(irn)
-#define sched_add_before(before, irn)   _sched_add_before(before, irn)
-#define sched_add_after(after, irn)     _sched_add_after(after, irn)
-#define sched_remove(irn)               _sched_remove(irn)
-#define sched_is_scheduled(irn)         _sched_is_scheduled(irn)
-#define sched_comes_after(n1, n2)       _sched_comes_after(n1, n2)
-#define sched_cmp(a, b)                 _sched_cmp(a, b)
-
-#endif /* FIRM_BE_BESCHED_T_H */
index eba8e5d..1203347 100644 (file)
 #include "irgwalk.h"
 #include "irtools.h"
 #include "irbitset.h"
+#include "irnodeset.h"
 #include "height.h"
 
 #include "benode_t.h"
-#include "besched_t.h"
+#include "besched.h"
 #include "beschedmris.h"
 #include "beirg.h"
 
@@ -85,54 +86,6 @@ static void *mris_irn_data_init(ir_phase *ph, const ir_node *irn, void *data)
        return mi;
 }
 
-#if 0
-static int compute_height(mris_env_t *env, ir_node *irn, ir_visited_t visited)
-{
-       mris_irn_t *mi = get_mris_irn(env, irn);
-
-       if(get_irn_visited(irn) >= visited) {
-               DBG((env->dbg, LEVEL_3, "\theight of %+F = %d\n", irn, mi->height));
-               return mi->height;
-       }
-
-       else {
-               const ir_edge_t *edge;
-
-               set_irn_visited(irn, visited);
-               mi->height  = 0;
-
-               foreach_out_edge(irn, edge) {
-                       ir_node *dep = get_edge_src_irn(edge);
-
-                       if(!is_Block(dep) && get_nodes_block(dep) == env->bl) {
-                               int dep_height = compute_height(env, dep, visited);
-                               mi->height     = MAX(mi->height, dep_height);
-                       }
-               }
-
-               mi->height++;
-               DBG((env->dbg, LEVEL_3, "\tsetting height of %+F = %d\n", irn, mi->height));
-       }
-
-       return mi->height;
-}
-
-static void compute_heights(mris_env_t *env)
-{
-       const ir_edge_t *edge;
-       ir_visited_t visited;
-
-       visited = get_irg_visited(env->irg) + 1;
-       set_irg_visited(env->irg, visited);
-
-       foreach_out_edge(env->bl, edge) {
-               ir_node *dep = get_edge_src_irn(edge);
-               if(to_appear(env, dep))
-                       compute_height(env, dep, visited);
-       }
-}
-#endif
-
 #define valid_node(env, dep) (to_appear(env, dep) && !be_is_Keep(dep))
 
 static void grow_all_descendands(mris_env_t *env, ir_node *irn, bitset_t *visited)
@@ -205,72 +158,11 @@ static ir_node *put_lowest_in_front(mris_env_t *env, ir_node **in)
        return in[0];
 }
 
-#if 0
-static void reaches_walker(mris_env_t *env, ir_node *irn, ir_node *tgt, int *found, ir_visited_t visited)
-{
-       if(get_irn_visited(irn) < visited && get_nodes_block(irn) == env->bl) {
-
-               set_irn_visited(irn, visited);
-
-               if(irn == tgt)
-                       *found = 1;
-               else {
-                       int i, n;
-
-                       for(i = 0, n = get_irn_arity(irn); i < n; ++i) {
-                               ir_node *op = get_irn_n(irn, i);
-                               if(!*found)
-                                       reaches_walker(env, op, tgt, found, visited);
-                       }
-               }
-       }
-}
-
-static int reaches(mris_env_t *env, ir_node *src, ir_node *tgt)
-{
-       int found = 0;
-       ir_visited_t visited = get_irg_visited(env->irg) + 1;
-
-       set_irg_visited(env->irg, visited);
-       reaches_walker(env, src, tgt, &found, visited);
-       return found;
-}
-#endif
-
 static inline ir_node *skip_Projs(ir_node *irn)
 {
        return is_Proj(irn) ? skip_Projs(get_Proj_pred(irn)) : irn;
 }
 
-#if 0
-static void replace_tuple_by_repr_proj(mris_env_t *env, ir_node **in)
-{
-       int i;
-
-       for(i = 0; in[i]; ++i) {
-               if(get_irn_mode(in[i]) == mode_T) {
-                       const ir_edge_t *edge;
-                       ir_node *proj  = NULL;
-                       ir_node *first = NULL;
-
-                       foreach_out_edge(in[i], edge) {
-                               ir_node *desc = get_edge_src_irn(edge);
-
-                               first = first ? first : desc;
-                               if(get_irn_mode(desc) == mode_M) {
-                                       proj = desc;
-                                       break;
-                               }
-                       }
-
-                       proj = proj ? proj : first;
-                       assert(proj);
-                       in[i] = proj;
-               }
-       }
-}
-#endif
-
 static void lineage_formation(mris_env_t *env)
 {
        DEBUG_ONLY(firm_dbg_module_t *dbg = env->dbg);
index 842c332..d505350 100644 (file)
@@ -26,7 +26,7 @@
 
 #include <stdlib.h>
 
-#include "besched_t.h"
+#include "besched.h"
 #include "belistsched.h"
 #include "belive_t.h"
 #include "beutil.h"
index 6f7e38f..88c5478 100644 (file)
@@ -28,7 +28,7 @@
 
 #include <stdlib.h>
 
-#include "besched_t.h"
+#include "besched.h"
 #include "belistsched.h"
 
 /**
index 5f5e659..e86c99a 100644 (file)
@@ -32,7 +32,7 @@
 #include "irgwalk.h"
 #include "irtools.h"
 
-#include "besched_t.h"
+#include "besched.h"
 #include "belistsched.h"
 #include "benode_t.h"
 
index 8521d6a..5ab8513 100644 (file)
@@ -45,6 +45,7 @@
 #include "irtools.h"
 #include "irbitset.h"
 #include "irprintf.h"
+#include "irnodeset.h"
 #include "bipartite.h"
 #include "hungarian.h"
 #include "plist.h"
@@ -55,8 +56,9 @@
 #include "beabi.h"
 #include "bemodule.h"
 #include "benode_t.h"
-#include "besched_t.h"
-#include "beirg_t.h"
+#include "besched.h"
+#include "beirg.h"
+#include "belive.h"
 
 #include "lc_opts.h"
 #include "lc_opts_enum.h"
index ba149cc..13bc645 100644 (file)
 
 #include "iredges_t.h"
 
-#include "besched_t.h"
+#include "besched.h"
 #include "belistsched.h"
 #include "benode_t.h"
+#include "belive.h"
 
 /* we need a special mark */
 static char _mark;
index 648dd71..1453688 100644 (file)
@@ -46,9 +46,9 @@
 #include "irnodeset.h"
 #include "error.h"
 
-#include "bearch_t.h"
+#include "bearch.h"
 #include "belive_t.h"
-#include "besched_t.h"
+#include "besched.h"
 #include "bespill.h"
 #include "belive_t.h"
 #include "benode_t.h"
@@ -56,7 +56,7 @@
 #include "bespilloptions.h"
 #include "bestatevent.h"
 #include "bessaconstr.h"
-#include "beirg_t.h"
+#include "beirg.h"
 #include "beintlive_t.h"
 #include "bemodule.h"
 #include "be_t.h"
index 768ece1..e883849 100644 (file)
 #include "irnodeset.h"
 
 #include "beutil.h"
-#include "bearch_t.h"
+#include "bearch.h"
 #include "beuses.h"
-#include "besched_t.h"
+#include "besched.h"
 #include "beirgmod.h"
 #include "belive_t.h"
 #include "benode_t.h"
 #include "bechordal_t.h"
 #include "bespilloptions.h"
 #include "beloopana.h"
-#include "beirg_t.h"
+#include "beirg.h"
 #include "bespill.h"
 #include "bemodule.h"
 
index cf2c4db..cf425be 100644 (file)
 #include "dfs_t.h"
 
 #include "beutil.h"
-#include "bearch_t.h"
-#include "besched_t.h"
+#include "bearch.h"
+#include "besched.h"
 #include "beirgmod.h"
 #include "belive_t.h"
 #include "benode_t.h"
 #include "bechordal_t.h"
 #include "bespilloptions.h"
 #include "beloopana.h"
-#include "beirg_t.h"
+#include "beirg.h"
 #include "bemodule.h"
 #include "bespill.h"
 
index 3ad663c..8f7c9c3 100644 (file)
@@ -48,7 +48,7 @@
 #include "bespill.h"
 #include "beutil.h"
 #include "bespilloptions.h"
-#include "besched_t.h"
+#include "besched.h"
 #include "be_t.h"
 
 #ifndef NDEBUG
index 047fab5..f1a1d0e 100644 (file)
 #include "bespill.h"
 #include "bemodule.h"
 #include "besched.h"
-#include "bearch_t.h"
+#include "bearch.h"
 #include "be_t.h"
 #include "benode_t.h"
 #include "beirg.h"
+#include "belive.h"
 
 DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;)
 
index 4186e4b..f409091 100644 (file)
 #include "bemodule.h"
 #include "be.h"
 #include "belive_t.h"
-#include "beirg_t.h"
+#include "beirg.h"
 #include "bearch.h"
 #include "benode_t.h"
-#include "besched_t.h"
+#include "besched.h"
 #include "bera.h"
 #include "beintlive_t.h"
 
index 026b087..5c53d4d 100644 (file)
@@ -45,8 +45,8 @@
 #include "bespilloptions.h"
 #include "bemodule.h"
 #include "beintlive_t.h"
-#include "beirg_t.h"
-#include "bearch_t.h"
+#include "beirg.h"
+#include "bearch.h"
 
 #define DBG_COALESCING         1
 #define DBG_INTERFERENCES      2
index 4b36701..6902d2f 100644 (file)
@@ -53,9 +53,9 @@
 
 #include "bessaconstr.h"
 #include "bemodule.h"
-#include "besched_t.h"
+#include "besched.h"
 #include "beintlive_t.h"
-#include "beirg_t.h"
+#include "beirg.h"
 #include "be_t.h"
 
 #include "debug.h"
index 3ac637f..e1c25e8 100644 (file)
 #include "be_t.h"
 #include "beutil.h"
 #include "bechordal_t.h"
-#include "bearch_t.h"
+#include "bearch.h"
 #include "belive_t.h"
 #include "benode_t.h"
-#include "besched_t.h"
+#include "besched.h"
 #include "bestatevent.h"
-#include "beirg_t.h"
+#include "beirg.h"
 #include "beintlive_t.h"
 
 DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;)
index 155ed40..d713ba8 100644 (file)
@@ -37,8 +37,8 @@
 #include "statev.h"
 #include "error.h"
 
-#include "bearch_t.h"
-#include "beirg_t.h"
+#include "bearch.h"
+#include "beirg.h"
 #include "bestat.h"
 #include "belive_t.h"
 #include "besched.h"
index 403810d..f42ba16 100644 (file)
@@ -41,9 +41,9 @@
 #include "irnodemap.h"
 #include "adt/cpset.h"
 
-#include "bearch_t.h"
+#include "bearch.h"
 #include "beuses.h"
-#include "besched_t.h"
+#include "besched.h"
 #include "belive_t.h"
 #include "bemodule.h"
 #include "benode_t.h"
index a0c43ab..42bae84 100644 (file)
@@ -30,7 +30,7 @@
 
 #include "firm_types.h"
 #include "beirg.h"
-#include "bearch_t.h"
+#include "bearch.h"
 
 /**
  * Callback that should create a spill for a certain value. Can return NULL
index bc316be..ad337cf 100644 (file)
@@ -39,8 +39,9 @@
 #include "cgana.h"
 #include "debug.h"
 
-#include "beirg_t.h"
+#include "beirg.h"
 #include "betranshlp.h"
+#include "belive.h"
 
 typedef struct be_transform_env_t {
        ir_graph *irg;         /**< The irg, the node should be created in */
index 7da6b4f..abe561d 100644 (file)
@@ -45,9 +45,9 @@
 #include "beutil.h"
 #include "belive_t.h"
 #include "benode_t.h"
-#include "besched_t.h"
+#include "besched.h"
 #include "beirgmod.h"
-#include "bearch_t.h"
+#include "bearch.h"
 #include "beuses.h"
 
 #define SCAN_INTERBLOCK_USES
index 1637c4d..4129bde 100644 (file)
@@ -41,8 +41,8 @@
 #include "iredges.h"
 
 #include "beutil.h"
-#include "besched_t.h"
-#include "bearch_t.h"
+#include "besched.h"
+#include "bearch.h"
 
 /* Get an always empty set. */
 pset *be_empty_set(void)
index 921f592..0bf0a1f 100644 (file)
@@ -31,7 +31,7 @@
 #include "firm_types.h"
 #include "pset.h"
 
-#include "bearch_t.h"
+#include "bearch.h"
 
 #ifdef _MSC_VER
 typedef          __int64 long64;
index cc7da11..c8d18b1 100644 (file)
@@ -41,9 +41,9 @@
 
 #include "beverify.h"
 #include "belive.h"
-#include "besched_t.h"
+#include "besched.h"
 #include "benode_t.h"
-#include "beirg_t.h"
+#include "beirg.h"
 #include "beintlive_t.h"
 
 static int my_values_interfere(const ir_node *a, const ir_node *b);
index 63e9a79..a160aba 100644 (file)
 #include "instrument.h"
 
 #include "../beabi.h"
-#include "../beirg_t.h"
+#include "../beirg.h"
 #include "../benode_t.h"
 #include "../belower.h"
-#include "../besched_t.h"
+#include "../besched.h"
 #include "be.h"
 #include "../be_t.h"
 #include "../beirgmod.h"
@@ -69,6 +69,7 @@
 #include "../bestate.h"
 #include "../beflags.h"
 #include "../betranshlp.h"
+#include "../belistsched.h"
 
 #include "bearch_ia32_t.h"
 
index 8acfdbf..c4efcc2 100644 (file)
@@ -37,6 +37,7 @@
 #include "irgwalk.h"
 
 #include "../benode_t.h"
+#include "../belive.h"
 
 #define AGGRESSIVE_AM
 
index cc6a7ae..b041952 100644 (file)
@@ -33,7 +33,8 @@
 #include "bitset.h"
 
 #include "../betranshlp.h"
-#include "../beirg_t.h"
+#include "../beirg.h"
+#include "../beabi.h"
 
 #include "ia32_architecture.h"
 #include "ia32_common_transform.h"
index b5b5abe..feb7200 100644 (file)
 #include "irargs_t.h"
 #include "irprog_t.h"
 #include "iredges_t.h"
+#include "irtools.h"
 #include "execfreq.h"
 #include "error.h"
 #include "raw_bitset.h"
 #include "dbginfo.h"
+#include "lc_opts.h"
 
-#include "../besched_t.h"
+#include "../besched.h"
 #include "../benode_t.h"
 #include "../beabi.h"
 #include "../be_dbgout.h"
 #include "../beemitter.h"
 #include "../begnuas.h"
-#include "../beirg_t.h"
+#include "../beirg.h"
 #include "../be_dbgout.h"
 
 #include "ia32_emitter.h"
index eb23d5a..768bb3b 100644 (file)
@@ -34,8 +34,8 @@
 #include "pdeq.h"
 #include "error.h"
 
-#include "../bearch_t.h"
-#include "../besched_t.h"
+#include "../bearch.h"
+#include "../besched.h"
 #include "../benode_t.h"
 
 #include "bearch_ia32_t.h"
index 8bf5064..c950d07 100644 (file)
 #include "array.h"
 
 #include "../beirgmod.h"
-#include "../bearch_t.h"
+#include "../bearch.h"
 #include "../besched.h"
 #include "../beabi.h"
 #include "../benode_t.h"
 #include "../bestate.h"
 #include "../beutil.h"
 #include "../bessaconstr.h"
-#include "../beirg_t.h"
+#include "../beirg.h"
 
 static ir_entity *fpcw_round    = NULL;
 static ir_entity *fpcw_truncate = NULL;
index 71d0755..395f891 100644 (file)
@@ -30,7 +30,7 @@
 #include "irmode.h"
 #include "set.h"
 
-#include "../bearch_t.h"
+#include "../bearch.h"
 #include "bearch_ia32_t.h"
 #include "gen_ia32_regalloc_if.h"
 
index 12d770f..910acd7 100644 (file)
@@ -45,7 +45,7 @@
 #include "raw_bitset.h"
 #include "xmalloc.h"
 
-#include "../bearch_t.h"
+#include "../bearch.h"
 #include "../beinfo.h"
 
 #include "bearch_ia32_t.h"
index c6d09d6..f9b2649 100644 (file)
@@ -27,7 +27,7 @@
 #define FIRM_BE_IA32_IA32_NODES_ATTR_H
 
 #include "firm_types.h"
-#include "../bearch_t.h"
+#include "../bearch.h"
 #include "../bemachine.h"
 #include "irnode_t.h"
 
index feb529b..99ffc74 100644 (file)
@@ -42,7 +42,7 @@
 #include "../be_t.h"
 #include "../beabi.h"
 #include "../benode_t.h"
-#include "../besched_t.h"
+#include "../besched.h"
 #include "../bepeephole.h"
 
 #include "ia32_new_nodes.h"
index c3ff823..c02325a 100644 (file)
@@ -2632,7 +2632,7 @@ fistp => {
        latency   => 2,
 },
 
-# SSE3 firsttp instruction
+# SSE3 fisttp instruction
 fisttp => {
        state     => "exc_pinned",
        rd_constructor => "NONE",
index dbad81e..3e3a43f 100644 (file)
@@ -52,7 +52,7 @@
 #include "../besched.h"
 #include "../beabi.h"
 #include "../beutil.h"
-#include "../beirg_t.h"
+#include "../beirg.h"
 #include "../betranshlp.h"
 #include "../be_t.h"
 
index ba97016..60e1228 100644 (file)
@@ -44,7 +44,7 @@
 #include "error.h"
 
 #include "../belive_t.h"
-#include "../besched_t.h"
+#include "../besched.h"
 #include "../benode_t.h"
 #include "bearch_ia32_t.h"
 #include "ia32_new_nodes.h"
index 7aabb5d..8043fd6 100644 (file)
 #include "bitset.h"
 #include "debug.h"
 
-#include "../bearch_t.h"
+#include "../bearch.h"
 #include "../benode_t.h"
 #include "../belower.h"
-#include "../besched_t.h"
+#include "../besched.h"
 #include "../beblocksched.h"
-#include "../beirg_t.h"
+#include "../beirg.h"
 #include "be.h"
 #include "../beabi.h"
 #include "../bemachine.h"
index 24403f1..2c16045 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef FIRM_BE_MIPS_BEARCH_MIPS_H
 #define FIRM_BE_MIPS_BEARCH_MIPS_H
 
-#include "../bearch_t.h"
+#include "../bearch.h"
 
 typedef struct mips_code_gen_t  mips_code_gen_t;
 
index bded3fa..7c2d10b 100644 (file)
@@ -29,7 +29,7 @@
 #include "irnode.h"
 #include "set.h"
 
-#include "../bearch_t.h"
+#include "../bearch.h"
 #include "mips_nodes_attr.h"
 
 int  mips_cmp_irn_reg_assoc(const void *a, const void *b, size_t len);
index 80e46d4..36f4a6b 100644 (file)
@@ -40,7 +40,7 @@
 #include "irprintf.h"
 #include "xmalloc.h"
 
-#include "../bearch_t.h"
+#include "../bearch.h"
 
 #include "mips_nodes_attr.h"
 #include "mips_new_nodes.h"
index ab4da23..2ca9189 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef FIRM_BE_MIPS_MIPS_NODES_ATTR_H
 #define FIRM_BE_MIPS_MIPS_NODES_ATTR_H
 
-#include "../bearch_t.h"
+#include "../bearch.h"
 #include "irmode_t.h"
 #include "irnode_t.h"
 
index 156d056..2fa3361 100644 (file)
 
 #include "mips_scheduler.h"
 
-#include "../besched_t.h"
+#include "../besched.h"
 #include "be.h"
 #include "../beabi.h"
+#include "../belistsched.h"
 #include "iredges.h"
 #include "ircons.h"
 #include "gen_mips_regalloc_if.h"
index a31b61d..19c8a5c 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef FIRM_BE_MIPS_MIPS_SCHEDULER_H
 #define FIRM_BE_MIPS_MIPS_SCHEDULER_H
 
-#include "../besched_t.h"
+#include "../besched.h"
 
 const list_sched_selector_t *mips_get_list_sched_selector(const void *self, list_sched_selector_t *selector);
 const ilp_sched_selector_t *mips_get_ilp_sched_selector(const void *self);
index 1b13cf8..7ec4436 100644 (file)
@@ -43,8 +43,8 @@
 #include "../benode_t.h"
 #include "../beabi.h"
 #include "../besched.h"
-#include "../besched_t.h"
-#include "../beirg_t.h"
+#include "../besched.h"
+#include "../beirg.h"
 #include "../betranshlp.h"
 #include "bearch_mips_t.h"
 
index be3b2b5..7579489 100644 (file)
 #include "debug.h"
 #include "error.h"
 
-#include "../bearch_t.h"                /* the general register allocator interface */
+#include "../bearch.h"                /* the general register allocator interface */
 #include "../benode_t.h"
 #include "../belower.h"
-#include "../besched_t.h"
+#include "../besched.h"
 #include "be.h"
 #include "../beabi.h"
 #include "../bemachine.h"
 #include "../bemodule.h"
 #include "../bespillslots.h"
 #include "../beblocksched.h"
-#include "../beirg_t.h"
+#include "../beirg.h"
 #include "../begnuas.h"
+#include "../belistsched.h"
 
 #include "pset.h"
 
index 0e29abb..41d9e37 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef FIRM_BE_PPC32_BEARCH_PPC32_H
 #define FIRM_BE_PPC32_BEARCH_PPC32_H
 
-#include "../bearch_t.h"
+#include "../bearch.h"
 
 extern const arch_isa_if_t ppc32_isa_if;
 
index e0bd0be..96e3890 100644 (file)
@@ -38,7 +38,7 @@
 #include "irargs_t.h"
 #include "error.h"
 
-#include "../besched_t.h"
+#include "../besched.h"
 #include "../benode_t.h"
 
 #include "ppc32_emitter.h"
index 80d5bfb..7475d6b 100644 (file)
@@ -30,7 +30,7 @@
 #include "irargs_t.h"
 #include "debug.h"
 
-#include "../bearch_t.h"
+#include "../bearch.h"
 
 #include "bearch_ppc32_t.h"
 
index 88843ea..fb3b51d 100644 (file)
@@ -29,7 +29,7 @@
 #include "irnode.h"
 #include "set.h"
 
-#include "../bearch_t.h"
+#include "../bearch.h"
 #include "ppc32_nodes_attr.h"
 
 int  ppc32_cmp_irn_reg_assoc(const void *a, const void *b, size_t len);
index 7c5da12..f4ec5be 100644 (file)
@@ -40,7 +40,7 @@
 #include "irprintf.h"
 #include "xmalloc.h"
 
-#include "../bearch_t.h"
+#include "../bearch.h"
 
 #include "ppc32_nodes_attr.h"
 #include "ppc32_new_nodes.h"
index 30b1aa6..ae4ff36 100644 (file)
@@ -27,7 +27,7 @@
 #define FIRM_BE_PPC32_PPC32_NODES_ATTR_H
 
 #include "irnode_t.h"
-#include "../bearch_t.h"
+#include "../bearch.h"
 
 typedef struct
 {