unified mein file comments
authorChristian Würdig <chriswue@ipd.info.uni-karlsruhe.de>
Mon, 30 Apr 2007 11:19:41 +0000 (11:19 +0000)
committerChristian Würdig <chriswue@ipd.info.uni-karlsruhe.de>
Mon, 30 Apr 2007 11:19:41 +0000 (11:19 +0000)
unified .h #ifndef ... #define ...
changed some indenting
removed some unused code
removed beuses_t.h as unused header

[r13559]

88 files changed:
ir/be/bechordal.c
ir/be/bechordal_main.c
ir/be/beemitter.c
ir/be/beemitter.h
ir/be/begnuas.c
ir/be/begnuas.h
ir/be/beifg.c
ir/be/beifg.h
ir/be/beifg_clique.c
ir/be/beifg_impl.h
ir/be/beifg_list.c
ir/be/beifg_pointer.c
ir/be/beifg_t.h
ir/be/beilpsched.h
ir/be/beinsn.c
ir/be/beinsn_t.h
ir/be/beirg.c
ir/be/beirg.h
ir/be/beirg_t.h
ir/be/beirgmod.h
ir/be/bejavacoal.c
ir/be/bejavacoal.h
ir/be/belistsched.c
ir/be/belistsched.h
ir/be/belive.c
ir/be/belive.h
ir/be/belive_t.h
ir/be/beloopana.c
ir/be/beloopana.h
ir/be/belower.c
ir/be/belower.h
ir/be/bemachine.c
ir/be/bemachine.h
ir/be/bemachnode.c
ir/be/bemachnode.h
ir/be/bemodule.c
ir/be/bemodule.h
ir/be/bemodule_t.h
ir/be/benode.c
ir/be/benode_t.h
ir/be/benodesets.c
ir/be/benodesets.h
ir/be/bepressurestat.h
ir/be/beprofile.c
ir/be/beprofile.h
ir/be/bera.c
ir/be/bera.h
ir/be/beraextern.c
ir/be/beraextern.h
ir/be/besched.c
ir/be/besched.h
ir/be/besched_t.h
ir/be/beschedmris.c
ir/be/beschedmris.h
ir/be/beschedrand.c
ir/be/beschedregpress.c
ir/be/beschedrss.c
ir/be/beschedrss.h
ir/be/beschedtrace.c
ir/be/beschedtrivial.c
ir/be/bespill.h
ir/be/bespillbelady.c
ir/be/bespillbelady.h
ir/be/bespillmorgan.h
ir/be/bespilloptions.c
ir/be/bespilloptions.h
ir/be/bespillremat.c
ir/be/bespillremat.h
ir/be/bespillslots.c
ir/be/bespillslots.h
ir/be/bessaconstr.c
ir/be/bessaconstr.h
ir/be/bessadestr.c
ir/be/bessadestr.h
ir/be/bessadestrsimple.c
ir/be/bessadestrsimple.h
ir/be/bestat.c
ir/be/bestat.h
ir/be/bestate.c
ir/be/bestate.h
ir/be/bestatevent.c
ir/be/bestatevent.h
ir/be/beuses.c
ir/be/beuses.h
ir/be/beutil.c
ir/be/beutil.h
ir/be/beverify.c
ir/be/beverify.h

index f4638e0..7f2c2ee 100644 (file)
@@ -48,6 +48,7 @@
 #include "irtools.h"
 #include "debug.h"
 #include "xmalloc.h"
+#include "iredges.h"
 
 #include "beutil.h"
 #include "besched.h"
index 31006d4..278b5c2 100644 (file)
@@ -57,6 +57,7 @@
 #include "debug.h"
 #include "xmalloc.h"
 #include "execfreq.h"
+#include "iredges_t.h"
 
 #include "bechordal_t.h"
 #include "beabi.h"
index 31777e5..dbdcb80 100644 (file)
  * PURPOSE.
  */
 
-/*
- * Author:      Matthias Braun
- * Date:               12.03.2007
- * Copyright:   (c) Universitaet Karlsruhe
- * License:     This file is protected by GPL -  GNU GENERAL PUBLIC LICENSE.
+/**
+ * @file
+ * @brief       Interface for assembler output.
+ * @author      Matthias Braun
+ * @date        12.03.2007
+ * @version     $Id$
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index cb01c4c..963278f 100644 (file)
  * PURPOSE.
  */
 
-/*
- * Author:      Matthias Braun
- * Date:               12.03.2007
- * Copyright:   (c) Universitaet Karlsruhe
- * License:     This file is protected by GPL -  GNU GENERAL PUBLIC LICENSE.
+/**
+ * @file
+ * @brief       Interface for assembler output.
+ * @author      Matthias Braun
+ * @date        12.03.2007
+ * @version     $Id$
  */
 #ifndef FIRM_BE_BEEMITTER_H
 #define FIRM_BE_BEEMITTER_H
index 7949413..5f81ce5 100644 (file)
  */
 
 /**
- * Dumps global variables and constants as gas assembler.
- * @author Christian Wuerdig, Matthias Braun
- * @date 04.11.2005
- * @version $Id$
+ * @file
+ * @brief       Dumps global variables and constants as gas assembler.
+ * @author      Christian Wuerdig, Matthias Braun
+ * @date        04.11.2005
+ * @version     $Id$
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index 9c4b896..b796cef 100644 (file)
  */
 
 /**
- * Header for ia32 assembler declarations dumper.
- * @author Christian Wuerdig, Matthias Braun
- * $Id$
+ * @file
+ * @brief       Dumps global variables and constants as gas assembler.
+ * @author      Christian Wuerdig, Matthias Braun
+ * @date        04.11.2005
+ * @version     $Id$
  */
-#ifndef _BE_GEN_DECLS_H_
-#define _BE_GEN_DECLS_H_
+#ifndef FIRM_BE_BEGNUAS_H
+#define FIRM_BE_BEGNUAS_H
 
 #include "be.h"
 #include "beemitter.h"
@@ -58,4 +60,4 @@ void be_gas_emit_decls(be_emit_env_t *env, const be_main_env_t *main_env,
 
 void be_gas_emit_switch_section(be_emit_env_t *env, be_gas_section_t section);
 
-#endif
+#endif /* FIRM_BE_BEGNUAS_H */
index 9ca560f..0f0bb8c 100644 (file)
  */
 
 /**
- * @file   beifg.c
- * @date   18.11.2005
- * @author Sebastian Hack
- *
- * Copyright (C) 2005 Universitaet Karlsruhe
- * Released under the GPL
+ * @file
+ * @brief       Interface for interference graphs.
+ * @author      Sebastian Hack
+ * @date        18.11.2005
+ * @version     $Id$
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index f207d05..64a6aad 100644 (file)
  */
 
 /**
- * @file   beifg.h
- * @date   18.11.2005
- * @author Sebastian Hack
- *
- * Copyright (C) 2005 Universitaet Karlsruhe
- * Released under the GPL
+ * @file
+ * @brief       Interface for interference graphs.
+ * @author      Sebastian Hack
+ * @date        18.11.2005
+ * @version     $Id$
  */
-
-#ifndef _BEIFG_H
-#define _BEIFG_H
+#ifndef FIRM_BE_BEIFG_H
+#define FIRM_BE_BEIFG_H
 
 #include <stdio.h>
 
@@ -104,4 +102,4 @@ void be_ifg_check_sorted_to_file(const be_ifg_t *ifg, FILE *f);
 void be_ifg_check_performance(be_chordal_env_t *chordal_env);
 
 
-#endif /* _BEIFG_H */
+#endif /* FIRM_BE_BEIFG_H */
index 6c36e22..694db7a 100644 (file)
 #include "benodesets.h"
 
 typedef struct _cli_head_t {
-       struct list_head list;
+       struct list_head   list;
        struct _cli_head_t *next_cli_head;
-       ir_node *min;
-       ir_node *max;
+       ir_node            *min;
+       ir_node            *max;
 } cli_head_t;
 
 typedef struct _ifg_clique_t {
-       const be_ifg_impl_t *impl;
+       const be_ifg_impl_t    *impl;
        const be_chordal_env_t *env;
-       cli_head_t *cli_root;
-       struct obstack obst;
-       cli_head_t *curr_cli_head;
+       cli_head_t             *cli_root;
+       struct obstack         obst;
+       cli_head_t             *curr_cli_head;
 } ifg_clique_t;
 
 typedef struct _cli_element_t {
        struct list_head list;
-       ir_node *irn;
+       ir_node          *irn;
 } cli_element_t;
 
 typedef struct _cli_iter_t {
        const ifg_clique_t *ifg;
-       cli_head_t *curr_cli_head;
-       cli_element_t *curr_cli_element;
-       const ir_node *curr_irn;
-       bitset_t *visited_neighbours;
-       bitset_t *visited_nodes;
+       cli_head_t         *curr_cli_head;
+       cli_element_t      *curr_cli_element;
+       const ir_node      *curr_irn;
+       bitset_t           *visited_neighbours;
+       bitset_t           *visited_nodes;
 } cli_iter_t;
 
 /* PRIVATE FUNCTIONS */
@@ -196,9 +196,11 @@ static cli_head_t *get_next_cli_head(const ir_node *irn, cli_iter_t *it) /* ...c
                        if (&element->list != &head->list)
                        {
                                if (element->irn == irn)
-                               { /* node is in clique */
+                               {
+                                       /* node is in clique */
                                        it->curr_cli_head    = head;
-                                       it->curr_cli_element = (void *) head; /* needed because the next element is searched with list.next of it->curr_cli_element */
+                                       /* needed because the next element is searched with list.next of it->curr_cli_element */
+                                       it->curr_cli_element = (void *) head;
                                        break;
                                }
                        }
@@ -218,10 +220,11 @@ static cli_head_t *get_next_cli_head(const ir_node *irn, cli_iter_t *it) /* ...c
        return head;
 }
 
-static cli_element_t *get_next_element(const ir_node *irn, cli_iter_t *it) /* ... of the current clique, returns NULL if there were no more elements ..*/
+/* ... of the current clique, returns NULL if there were no more elements ..*/
+static cli_element_t *get_next_element(const ir_node *irn, cli_iter_t *it)
 {
        cli_element_t *element = it->curr_cli_element;
-       cli_head_t *head = it->curr_cli_head;
+       cli_head_t    *head    = it->curr_cli_head;
 
        if (!head || it->curr_cli_element == NULL) /* way back of recursion or there are no more heads */
        {
@@ -357,9 +360,9 @@ static void find_neighbour_walker(ir_node *bl, void *data)
 
 static void find_first_neighbour(const ifg_clique_t *ifg, cli_iter_t *it, const ir_node *irn)
 {
-       cli_head_t *cli_head = ifg->cli_root;
+       cli_head_t    *cli_head = ifg->cli_root;
        cli_element_t *element;
-       bitset_t *bitset_visneighbours = bitset_malloc(get_irg_last_idx(ifg->env->irg));
+       bitset_t      *bitset_visneighbours = bitset_malloc(get_irg_last_idx(ifg->env->irg));
 
        int is_dominated_by_max = 0;
        int dominates_min = 0;
index 7229b5d..3173457 100644 (file)
  */
 
 /**
- * @file   beifg_impl.h
- * @date   01.12.2005
- * @author Sebastian Hack
- *
- * Copyright (C) 2005 Universitaet Karlsruhe
- * Released under the GPL
- *
- * Constructors for different implementations of
- * chordal interference graphs.
+ * @file
+ * @brief       Constructors for different implementations of chordal interference graphs.
+ * @author      Sebastian Hack
+ * @date        01.12.2005
+ * @version     $Id$
  */
+#ifndef FIRM_BE_BEIFG_IMPL_H
+#define FIRM_BE_BEIFG_IMPL_H
 
-#ifndef _BEIFG_IMPL_H
-#define _BEIFG_IMPL_H
-
-#include "bechordal_t.h"
+#include "beifg.h"
+#include "bechordal.h"
 
 be_ifg_t *be_ifg_std_new(const be_chordal_env_t *env);
 be_ifg_t *be_ifg_list_new(const be_chordal_env_t *env);
 be_ifg_t *be_ifg_clique_new(const be_chordal_env_t *env);
 be_ifg_t *be_ifg_pointer_new(const be_chordal_env_t *env);
 
-#endif /* _BEIFG_IMPL_H */
+#endif /* FIRM_BE_BEIFG_IMPL_H */
index 617f160..7624d65 100644 (file)
  */
 
 /**
- * @file   beifg_list.c
- * @date   18.11.2005
- * @author Sebastian Hack
- *
- * Copyright (C) 2005 Universitaet Karlsruhe
- * Released under the GPL
+ * @file
+ * @brief       List based implementation of chordal interference graphs.
+ * @author      Sebastian Hack
+ * @date        18.11.2005
+ * @version     $Id$
  */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 typedef struct _adj_head_t adj_head_t;
 
 typedef struct _ifg_list_t {
-       const be_ifg_impl_t *impl;
+       const be_ifg_impl_t    *impl;
        const be_chordal_env_t *env;
-       struct obstack obst;
-       adj_head_t **adj_heads;
+       struct obstack         obst;
+       adj_head_t             **adj_heads;
 } ifg_list_t;
 
 typedef struct _adj_element_t adj_element_t;
 
 struct _adj_element_t {
        adj_element_t *next_adj_element;
-       ir_node *neighbour;
+       ir_node       *neighbour;
 };
 
 struct _adj_head_t {
-       ir_node *irn; /* the node you search neighbours for */
+       ir_node       *irn; /* the node you search neighbours for */
        adj_element_t *first_adj_element;
-       int degree;
+       int           degree;
 };
 
 typedef struct _nodes_iter_t {
        const ifg_list_t *ifg;
-       unsigned int curr_node_idx;
+       unsigned int     curr_node_idx;
 } nodes_iter_t;
 
 typedef struct _adj_iter_t {
        const ifg_list_t *ifg;
-       adj_element_t *curr_adj_element;
+       adj_element_t    *curr_adj_element;
 } adj_iter_t;
 
 /* PRIVATE FUNCTIONS */
 
-static void create_node (ifg_list_t *ifg, ir_node *irn) /* add node to the array of all nodes in this ifg implementation, if the node isn't already in the ifg */
+/* add node to the array of all nodes in this ifg implementation, if the node isn't already in the ifg */
+static void create_node(ifg_list_t *ifg, ir_node *irn)
 {
        adj_head_t *adj_head = NULL;
 
@@ -106,11 +105,12 @@ static adj_element_t *create_adj_element(ifg_list_t *ifg, ir_node *irn)
        return element;
 }
 
-static void add_edge(ifg_list_t *ifg, ir_node *node_a, ir_node *node_b) /* write the information about the edge between a and b */
+/* write the information about the edge between a and b */
+static void add_edge(ifg_list_t *ifg, ir_node *node_a, ir_node *node_b)
 {
-       adj_head_t *adj_head = NULL;
+       adj_head_t    *adj_head     = NULL;
        adj_element_t *curr_element = NULL;
-       adj_element_t *new_element = NULL;
+       adj_element_t *new_element  = NULL;
 
        adj_head = ifg->adj_heads[node_a->node_idx]; /* find the neighbours list of a */
 
@@ -166,16 +166,16 @@ static void add_edge(ifg_list_t *ifg, ir_node *node_a, ir_node *node_b) /* write
        }
 }
 
-static void find_neighbour_walker(ir_node *bl, void *data) /* find all adjacent nodes in the irg */
+/* find all adjacent nodes in the irg */
+static void find_neighbour_walker(ir_node *bl, void *data)
 {
-       ifg_list_t *ifg = data;
-       struct list_head *head  = get_block_border_head(ifg->env, bl);
+       ifg_list_t       *ifg      = data;
+       struct list_head *head     = get_block_border_head(ifg->env, bl);
+       nodeset          *live     = new_nodeset(ifg->env->cls->n_regs);
+       ir_node          *live_irn = NULL;
+       border_t         *b        = NULL;
 
-       nodeset *live = new_nodeset(ifg->env->cls->n_regs);
-       ir_node *live_irn = NULL;
-       border_t *b = NULL;
-
-       assert (is_Block(bl) && "There is no block to work on");
+       assert(is_Block(bl) && "There is no block to work on");
 
        foreach_border_head(head, b) /* follow the borders of each block */
        {
@@ -205,9 +205,9 @@ static void find_neighbour_walker(ir_node *bl, void *data) /* find all adjacent
 
 static ir_node *get_first_node(const ifg_list_t *ifg, nodes_iter_t *it)
 {
-       ir_node *res = NULL;
-       adj_head_t *adj_head= NULL;
-       int curr_idx = -1;
+       ir_node    *res      = NULL;
+       adj_head_t *adj_head = NULL;
+       int        curr_idx  = -1;
 
        it->ifg = ifg;
        it->curr_node_idx = 0;
@@ -231,10 +231,10 @@ static ir_node *get_first_node(const ifg_list_t *ifg, nodes_iter_t *it)
 
 static ir_node *get_next_node(nodes_iter_t *it)
 {
-       const ifg_list_t *ifg = it->ifg;
-       ir_node *res = NULL;
-       adj_head_t *adj_head= NULL;
-       unsigned int curr_idx = it->curr_node_idx;
+       const ifg_list_t *ifg      = it->ifg;
+       ir_node          *res      = NULL;
+       adj_head_t       *adj_head = NULL;
+       unsigned int      curr_idx = it->curr_node_idx;
 
        while (adj_head == NULL && curr_idx < it->ifg->env->irg->last_node_idx - 1)
        {
@@ -255,11 +255,11 @@ static ir_node *get_next_node(nodes_iter_t *it)
 
 static ir_node *get_first_neighbour(const ifg_list_t *ifg, adj_iter_t *it, const ir_node *curr_irn)
 {
-       ir_node *res = NULL;
+       ir_node    *res      = NULL;
        adj_head_t *adj_head = NULL;
 
        adj_head = ifg->adj_heads[curr_irn->node_idx];
-       assert (adj_head && "There is no entry for this node");
+       assert(adj_head && "There is no entry for this node");
 
        it->curr_adj_element = NULL;
        it->ifg = ifg;
@@ -277,7 +277,7 @@ static ir_node *get_first_neighbour(const ifg_list_t *ifg, adj_iter_t *it, const
 
 static ir_node *get_next_neighbour(adj_iter_t *it)
 {
-       ir_node *res = NULL;
+       ir_node       *res     = NULL;
        adj_element_t *element = it->curr_adj_element;
 
        if (element->next_adj_element) /* return next neighbour */
@@ -303,10 +303,10 @@ static void ifg_list_free(void *self)
 
 static int ifg_list_connected(const void *self, const ir_node *a, const ir_node *b)
 {
-       const ifg_list_t *ifg = self;
-       int res = -1;
-       adj_head_t *adj_head = NULL;
-       adj_element_t *curr_element = NULL;
+       const ifg_list_t *ifg          = self;
+       int              res           = -1;
+       adj_head_t       *adj_head     = NULL;
+       adj_element_t    *curr_element = NULL;
 
        /* first try: find b in the neigbours of a */
        adj_head = ifg->adj_heads[a->node_idx];
@@ -314,7 +314,7 @@ static int ifg_list_connected(const void *self, const ir_node *a, const ir_node
        assert(adj_head && "There is no entry for the node a");
        curr_element = adj_head->first_adj_element;
 
-       if(curr_element)
+       if (curr_element)
        {
                while (curr_element->neighbour != b && curr_element->next_adj_element)
                {
@@ -334,7 +334,7 @@ static int ifg_list_connected(const void *self, const ir_node *a, const ir_node
        assert(adj_head && "There is no entry for the node b");
        curr_element = adj_head->first_adj_element;
 
-       if(curr_element)
+       if (curr_element)
        {
                while (curr_element->neighbour != a && curr_element->next_adj_element)
                {
index 1e20529..5f0b8a9 100644 (file)
  */
 
 /**
- * @file   beifg_pointer.c
- * @date   18.11.2005
- * @author Sebastian Hack
- *
- * Copyright (C) 2005 Universitaet Karlsruhe
- * Released under the GPL
+ * @file
+ * @brief       Pointer based implementation of chordal interference graphs.
+ * @author      Sebastian Hack
+ * @date        18.11.2005
+ * @version     $Id$
  */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -49,7 +47,7 @@
 typedef struct _ptr_element_t ptr_element_t;
 
 typedef union element_content {
-       ir_node *irn;
+       ir_node       *irn;
        ptr_element_t *element;
 } element_content;
 
@@ -61,29 +59,28 @@ struct _ptr_element_t {
 
 typedef struct _ptr_head_t {
        struct list_head list;
-       ptr_element_t *element;
+       ptr_element_t    *element;
 } ptr_head_t;
 
 typedef struct _ifg_pointer_t {
-       const be_ifg_impl_t *impl;
+       const be_ifg_impl_t    *impl;
        const be_chordal_env_t *env;
-       ir_phase ph;
-       struct obstack obst;
-       ptr_head_t *curr_ptr_head;
-       ptr_element_t *curr_element;
-       pmap *node_map;
+       ir_phase               ph;
+       struct obstack         obst;
+       ptr_head_t             *curr_ptr_head;
+       ptr_element_t          *curr_element;
 } ifg_pointer_t;
 
 typedef struct _ptr_iter_t {
        const ifg_pointer_t *ifg;
-       const ir_node *irn;
-       ptr_head_t *curr_ptr_head;
-       ptr_head_t *first_head;
-       ptr_element_t *curr_element_t;
-       ir_node *curr_irn;
-       int get_first;
-       int sub_call;
-       bitset_t *visited_neighbours;
+       const ir_node       *irn;
+       ptr_head_t          *curr_ptr_head;
+       ptr_head_t          *first_head;
+       ptr_element_t       *curr_element_t;
+       ir_node             *curr_irn;
+       int                 get_first;
+       int                 sub_call;
+       bitset_t            *visited_neighbours;
 } ptr_iter_t;
 
 /* PRIVATE FUNCTIONS */
@@ -111,28 +108,16 @@ static ptr_head_t *ptr_get_new_head(ifg_pointer_t *ifg)
 
 static void write_pointers(bitset_t *live, ifg_pointer_t *ifg)
 {
-       ir_node *live_irn;
+       ir_node      *live_irn;
        bitset_pos_t elm;
 
        bitset_foreach_irn(ifg->env->irg, live, elm, live_irn)
        {
-               ptr_head_t *head = phase_get_or_set_irn_data(&ifg->ph, live_irn);
+               ptr_head_t *head    = phase_get_or_set_irn_data(&ifg->ph, live_irn);
                ptr_head_t *element = ptr_get_new_head(ifg);
-               ir_node *irn = NULL;
-
-#if 0
-               // Matze: huh, what is this?!? node numbers aren't in any way deterministic AFAIK
-               if (live_irn->node_nr == 1883 || live_irn->node_nr == 1858)
-                       irn = NULL;
-#endif
 
                element->element = ifg->curr_element; /* write current highest sub-clique for each node */
                list_add(&element->list, &head->list);
-
-               /* the following code is to find all nodes, it should be replaced by a "keywalker" of irphase */
-               irn = pmap_get(ifg->node_map, live_irn);
-               if (!irn)
-                       pmap_insert(ifg->node_map, live_irn, live_irn);
        }
 }
 
@@ -191,35 +176,29 @@ static ptr_element_t *get_last_sub_clique(ifg_pointer_t *ifg, bitset_t *live, bi
 
 static void find_neighbour_walker(ir_node *bl, void *data)
 {
-       ifg_pointer_t *ifg      = data;
-       struct list_head *head  = get_block_border_head(ifg->env, bl);
-       border_t *b;
-       bitset_t *live = bitset_malloc(get_irg_last_idx(ifg->env->irg));
-       bitset_t *my_live;
-       bitset_pos_t my_elm;
-       ir_node *my_irn;
-       element_content last_irn;
-       element_content last_element;
-       int was_def = 0;
-       ir_node *first = NULL;
-       int was_first = 0;
-
-       last_irn.irn = NULL;
+       ifg_pointer_t    *ifg      = data;
+       struct list_head *head     = get_block_border_head(ifg->env, bl);
+       int              was_def   = 0;
+       int              was_first = 0;
+       ir_node          *first    = NULL;
+       bitset_t         *live     = bitset_malloc(get_irg_last_idx(ifg->env->irg));
+       bitset_t         *my_live;
+       bitset_pos_t     my_elm;
+       border_t         *b;
+       ir_node          *my_irn;
+       element_content  last_irn;
+       element_content  last_element;
+
+       last_irn.irn         = NULL;
        last_element.element = NULL;
 
        assert(is_Block(bl) && "There is no block to work on.");
 
        foreach_border_head(head, b) /* follow the borders of the block */
        {
-               ir_node *irn = b->irn;
+               ir_node       *irn     = b->irn;
                ptr_element_t *element = NULL;
 
-#if 0
-               // ?!?
-               if (irn->node_nr == 1883 || irn->node_nr == 1858)
-                       i=1;
-#endif
-
                if (b->is_def) /* b is a new node */
                {
                        bitset_set(live, get_irn_idx(irn));
@@ -242,16 +221,9 @@ static void find_neighbour_walker(ir_node *bl, void *data)
                                        element->content_second.irn = b->irn;
                                        element->kind = 8888; /* both are ir_nodes */
 
-#if 0
-                                       // ?!?
-                                       if (irn->node_nr == 1883 || irn->node_nr == 1858 || irn->node_nr == 1936)
-                                               i=1;
-#endif
-
-
                                        last_element.element = element;
-                                       ifg->curr_element = element;
-                                       last_irn.irn = NULL;
+                                       ifg->curr_element    = element;
+                                       last_irn.irn         = NULL;
                                }
                                else
                                {
@@ -285,7 +257,6 @@ static void find_neighbour_walker(ir_node *bl, void *data)
                        last_element.element = get_last_sub_clique(ifg, live, my_live, irn);
 
                        /* check and add still living nodes */
-                       //bitset_remv_irn(my_live, irn);
                        if (bitset_popcnt(my_live) > 1)
                        {
                                if (last_element.element)
@@ -321,14 +292,6 @@ static void find_neighbour_walker(ir_node *bl, void *data)
                                                                my_element->kind = 8888; /* both are ir_nodes */
                                                                last_element.element = my_element;
                                                                ifg->curr_element = my_element;
-
-#if 0
-                                                               // ?!?
-                                                               if (my_irn->node_nr == 1883 || my_irn->node_nr == 1858 || my_irn->node_nr == 1936)
-                                                                       i=1;
-#endif
-
-
                                                                first = NULL;
                                                        }
                                                        else
@@ -385,17 +348,11 @@ static void find_neighbour_walker(ir_node *bl, void *data)
 
 static ir_node *get_first_irn(const ifg_pointer_t *ifg, ptr_iter_t *it)
 {
-       /* this should be replaced using a keywalker of the irphase &ifg.ph */
-       ir_node *irn;
-       pmap_entry *entry;
-
-       it->ifg = ifg;
-       entry = pmap_first(ifg->node_map);
+       ir_node *irn = phase_get_first_node(&ifg->ph);
 
-       if (!entry)
+       if (! irn)
                return NULL;
 
-       irn =  entry->value;
        it->curr_irn = irn;
 
        return irn;
@@ -403,37 +360,26 @@ static ir_node *get_first_irn(const ifg_pointer_t *ifg, ptr_iter_t *it)
 
 static ir_node *get_next_irn(ptr_iter_t *it)
 {
-       /* this should be replaced using a keywalker of the irphase &ifg.ph */
-       ir_node *irn;
-       pmap_entry *entry;
-
-       irn = it->curr_irn;
-       entry = pmap_next(it->ifg->node_map);
+       ir_node *irn = phase_get_next_node(&it->ifg->ph, it->curr_irn);
 
-       if (!entry)
+       if (! irn)
                return NULL;
 
-       it->curr_irn = entry->value;
+       it->curr_irn = irn;
 
-       return entry->value;
+       return irn;
 }
 
 static ir_node *get_next_neighbour(ptr_iter_t *it)
 {
-       ir_node *res;
-       ptr_head_t *head;
+       ir_node       *res;
+       ptr_head_t    *head;
        ptr_element_t *element;
 
        element = it->curr_element_t;
 
        if (element == NULL)
        {
-#if 0
-               // ?!?
-               if (it->irn->node_nr == 1883 || it->irn->node_nr == 1858)
-                       i=1;
-#endif
-
                if (it->curr_ptr_head->list.next != &it->first_head->list)
                {
                        head = list_entry(it->curr_ptr_head->list.next, ptr_head_t, list);
@@ -520,20 +466,20 @@ static ir_node *get_next_neighbour(ptr_iter_t *it)
 
 static ir_node *get_first_neighbour(const ifg_pointer_t *ifg, ptr_iter_t *it, const ir_node *irn)
 {
-       ir_node *res;
-       ptr_head_t *head;
+       ir_node       *res;
+       ptr_head_t    *head;
        ptr_element_t *element;
-       bitset_t *bitsetvisited_neighbours = bitset_malloc(get_irg_last_idx(ifg->env->irg));
+       bitset_t      *bitsetvisited_neighbours = bitset_malloc(get_irg_last_idx(ifg->env->irg));
 
-       it->ifg = ifg;
-       it->irn = irn;
+       it->ifg       = ifg;
+       it->irn       = irn;
        it->get_first = 0;
-       it->sub_call = 0;
+       it->sub_call  = 0;
 
        it->visited_neighbours = bitsetvisited_neighbours;
 
        head = phase_get_irn_data(&ifg->ph, irn);
-       if (!head)
+       if (! head)
                return NULL;
        else
        {
@@ -631,11 +577,11 @@ static void ifg_pointer_free(void *self)
 static int ifg_pointer_connected(const void *self, const ir_node *a, const ir_node *b)
 {
        const ifg_pointer_t *ifg = self;
-       int connected = -1;
-       ptr_iter_t it;
-       ir_node *irn = NULL;
+       int                 connected = -1;
+       ptr_iter_t          it;
+       ir_node             *irn = NULL;
 
-       irn = get_first_neighbour(ifg, &it, a);
+       irn       = get_first_neighbour(ifg, &it, a);
        connected = 0;
        while (irn != NULL)
        {
@@ -724,8 +670,6 @@ be_ifg_t *be_ifg_pointer_new(const be_chordal_env_t *env)
        ifg->impl               = &ifg_pointer_impl;
        ifg->env                        = env;
 
-       ifg->node_map           = pmap_create(); /* to find all nodes, should be replaced by a "keywalker" of irphase */
-
        phase_init(&ifg->ph, "ptr_map", env->irg, PHASE_DEFAULT_GROWTH, ptr_irn_data_init, NULL);
        obstack_init(&ifg->obst);
 
index de5a0aa..e78532c 100644 (file)
  */
 
 /**
- * Common use interference graph.
+ * @file
+ * @brief       Common use interference graph.
+ * @author      Sebastian Hack
+ * @date        27.06.2005
+ * @version     $Id$
+ *
  * Originally written by Sebastian Hack. Refactored into a seperate
  * source file and header by Kimon Hoffmann.
- * @author Sebastian Hack
- * @date 27.06.2005
  */
-#ifndef _BEIFG_T_H_
-#define _BEIFG_T_H_
+#ifndef FIRM_BE_BEIFG_T_H
+#define FIRM_BE_BEIFG_T_H
 
 #include "beifg.h"
 
@@ -76,8 +79,8 @@ struct _be_ifg_t {
 #define be_ifg_cliques_break(self, iter)          ((self)->impl->cliques_break(self, iter))
 #define be_ifg_degree(self,irn)                   ((self)->impl->degree(self, irn))
 
-#endif
+#endif /* _BE_IFG_USE_MACROS */
 
 void be_ifg_check(const be_ifg_t *ifg);
 
-#endif /*_BEIFG_T_H_*/
+#endif /* FIRM_BE_BEIFG_T_H */
index 329ba4c..2b6a682 100644 (file)
  * PURPOSE.
  */
 
-#ifndef _BEILPSCHED_H_
-#define _BEILPSCHED_H_
-
-#include "firm_config.h"
+/**
+ * @file
+ * @brief       ILP based instruction scheduling.
+ * @author      Christian Wuerdig
+ * @date        22.10.2006
+ * @version     $Id$
+ *
+ * An ILP scheduler based on
+ * "ILP-based Instruction Scheduling for IA-64"
+ * by Daniel Kaestner and Sebastian Winkel
+ * extended with register pressure constraints by Christian Wuerdig
+ */
+#ifndef FIRM_BE_BEILPSCHED_H
+#define FIRM_BE_BEILPSCHED_H
 
-#include "bemachine.h"
-#include "beirg.h"
+#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;
@@ -142,4 +152,4 @@ struct _ilp_sched_selector_t {
  */
 void be_ilp_sched(const be_irg_t *birg, be_options_t *be_opts);
 
-#endif /* _BEILPSCHED_H_ */
+#endif /* FIRM_BE_BEILPSCHED_H */
index c219a82..1215cf7 100644 (file)
  * PURPOSE.
  */
 
+/**
+ * @file
+ * @brief       A data structure to treat nodes and node-proj collections uniformly.
+ * @author      Sebastian Hack
+ * @version     $Id$
+ */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
index 73a6e67..a2493b8 100644 (file)
  */
 
 /**
- * Instructions
- *
- * A data structure to treat nodes and node-proj collections uniformly.
+ * @file
+ * @brief       A data structure to treat nodes and node-proj collections uniformly.
+ * @author      Sebastian Hack
+ * @version     $Id$
  */
+#ifndef FIRM_BE_BEINSN_T_H
+#define FIRM_BE_BEINSN_T_H
 
-#ifndef _BEINSN_T_H
-#define _BEINSN_T_H
-
+#include "irnode.h"
 #include "bitset.h"
+#include "obst.h"
 
-#include "bearch_t.h"
+#include "bearch.h"
+#include "beirg.h"
 
 typedef struct _be_operand_t  be_operand_t;
 typedef struct _be_insn_t     be_insn_t;
@@ -71,4 +74,4 @@ be_insn_t *be_scan_insn(const be_insn_env_t *env, ir_node *irn);
 
 be_insn_env_t *be_insn_env_init(be_insn_env_t *ie, const be_irg_t *birg, const arch_register_class_t *cls, struct obstack *obst);
 
-#endif /* _BEINSN_T_H */
+#endif /* FIRM_BE_BEINSN_T_H */
index 558f79a..c9cd719 100644 (file)
  * PURPOSE.
  */
 
-/*
- * Author:      Matthias Braun
- * Date:               13.12.2006
- * Copyright:   (c) Universitaet Karlsruhe
- * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
+/**
+ * @file
+ * @brief       Backend irg - a ir_graph with additional analysis information.
+ * @author      Matthias Braun
+ * @date        13.12.2006
+ * @version     $Id$
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -32,7 +33,7 @@
 
 void be_assure_liveness(be_irg_t *birg)
 {
-       if(birg->lv != NULL)
+       if (birg->lv != NULL)
                return;
 
        birg->lv = be_liveness(birg->irg);
@@ -40,7 +41,7 @@ void be_assure_liveness(be_irg_t *birg)
 
 void be_invalidate_liveness(be_irg_t *birg)
 {
-       if(birg->lv == NULL)
+       if (birg->lv == NULL)
                return;
 
        be_liveness_free(birg->lv);
@@ -49,7 +50,7 @@ void be_invalidate_liveness(be_irg_t *birg)
 
 void be_assure_dom_front(be_irg_t *birg)
 {
-       if(birg->dom_front != NULL)
+       if (birg->dom_front != NULL)
                return;
 
        birg->dom_front = be_compute_dominance_frontiers(birg->irg);
@@ -57,7 +58,7 @@ void be_assure_dom_front(be_irg_t *birg)
 
 void be_invalidate_dom_front(be_irg_t *birg)
 {
-       if(birg->dom_front == NULL)
+       if (birg->dom_front == NULL)
                return;
 
        be_free_dominance_frontiers(birg->dom_front);
@@ -69,37 +70,37 @@ void be_free_birg(be_irg_t *birg)
        free_execfreq(birg->exec_freq);
        birg->exec_freq = NULL;
 
-       if(birg->dom_front != NULL) {
+       if (birg->dom_front != NULL) {
                be_free_dominance_frontiers(birg->dom_front);
                birg->dom_front = NULL;
        }
-       if(birg->lv != NULL) {
+       if (birg->lv != NULL) {
                be_liveness_free(birg->lv);
                birg->lv = NULL;
        }
 }
 
-ir_graph* (be_get_birg_irg) (const be_irg_t *birg)
+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)
+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)
+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)
+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)
+const arch_env_t *(be_get_birg_arch_env)(const be_irg_t *birg)
 {
        return _be_get_birg_arch_env(birg);
 }
index 30661f4..d9759ed 100644 (file)
  */
 
 /**
- * Author:      Matthias Braun
- * Date:               05.05.2006
- * Copyright:   (c) Universitaet Karlsruhe
- * License:     This file is protected by GPL -  GNU GENERAL PUBLIC LICENSE.
- *
- * Backend irg - a ir_graph with additional analysis information
+ * @file
+ * @brief       Backend irg - a ir_graph with additional analysis information.
+ * @author      Matthias Braun
+ * @date        05.05.2006
+ * @version     $Id$
  */
-#ifndef BEIRG_H
-#define BEIRG_H
+#ifndef FIRM_BE_BEIRG_H
+#define FIRM_BE_BEIRG_H
 
+#include "execfreq.h"
 #include "belive.h"
 #include "bedomfront.h"
 
@@ -53,4 +53,4 @@ ir_exec_freq *be_get_birg_exec_freq(const be_irg_t *birg);
  */
 void be_free_birg(be_irg_t *birg);
 
-#endif
+#endif /* FIRM_BE_BEIRG_H */
index 7041542..2f6cbbf 100644 (file)
  */
 
 /**
- * Author:      Matthias Braun
- * Date:               05.05.2006
- * Copyright:   (c) Universitaet Karlsruhe
- * License:     This file is protected by GPL -  GNU GENERAL PUBLIC LICENSE.
- *
- * Backend irg - a ir_graph with additional analysis information
+ * @file
+ * @brief       Backend irg - a ir_graph with additional analysis information.
+ * @author      Matthias Braun
+ * @date        05.05.2006
+ * @version     $Id$
  */
-#ifndef BEIRG_T_H
-#define BEIRG_T_H
+#ifndef FIRM_BE_BEIRG_T_H
+#define FIRM_BE_BEIRG_T_H
 
 #include "beirg.h"
 #include "be_t.h"
@@ -75,4 +74,4 @@ _be_get_birg_arch_env(const be_irg_t *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
+#endif /* FIRM_BE_BEIRG_T_H */
index 00e76ae..7ec959a 100644 (file)
 
 /**
  * @file
- * @brief
+ * @brief       Backend IRG modification routines.
+ * @author      Sebastian Hack, Daniel Grund, Matthias Braun, Christian Wuerdig
+ * @date        04.05.2005
+ * @version     $Id$
+ *
  * This file contains the following IRG modifications for be routines:
  * - insertion of Perm nodes
  * - empty block elimination
  * - a simple dead node elimination (set inputs of unreachable nodes to BAD)
- *
- * @author      Sebastian Hack, Daniel Grund, Matthias Braun, Christian Wuerdig
- * @date        04.05.2005
- * @version     $Id$
- * Copyright:   (c) Universitaet Karlsruhe
- * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
  */
-#ifndef _FIRM_BE_IRGMOD_H_
-#define _FIRM_BE_IRGMOD_H_
+#ifndef FIRM_BE_BEIRGMOD_H
+#define FIRM_BE_BEIRGMOD_H
 
 #include "irnode.h"
 #include "beirg.h"
@@ -95,4 +93,4 @@ ir_node *insert_Perm_after(be_irg_t *birg, const arch_register_class_t *cls,
  */
 int be_remove_empty_blocks(ir_graph *irg);
 
-#endif /* _BEIRGMOD_H */
+#endif /* FIRM_BE_BEIRGMOD_H */
index a5aaca6..a1ecb1f 100644 (file)
  * PURPOSE.
  */
 
-
+/**
+ * @file
+ * @brief       Interface for external Java coalescer.
+ * @author      Sebastian Hack
+ * @version     $Id$
+ */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -116,7 +121,7 @@ static char *locate_jvm_lib(char *path, size_t path_len)
        return path;
 }
 
-#else
+#else /* ! _WIN32 */
 /* Unix version */
 static void *find_jvm_symbol(const char *vmlibpath, const char *sym)
 {
@@ -128,7 +133,7 @@ static char *locate_jvm_lib(char *path, size_t n)
 {
        return NULL;
 }
-#endif
+#endif /* _WIN32 */
 
 static int start_vm(jni_env_t *env, int argc, char *argv[])
 {
@@ -391,7 +396,7 @@ void be_java_coal_set_debug(be_java_coal_t *c, int n, const char *dbg)
        CHECK(c->env);
        (*jni)->CallVoidMethod(jni, c->obj, mid, (jint) n, str);
        CHECK(c->env);
-#endif
+#endif /* if 0 */
 }
 
 void be_java_coal_forbid_color(be_java_coal_t *c, int n, int col)
@@ -426,7 +431,7 @@ void be_java_coal_start_jvm(void)
        get_jvm();
 }
 
-#else
+#else /* ! WITH_JVM */
 
 be_java_coal_t *be_java_coal_init(const char *graph_name, int n_nodes, int n_regs, int dbg_level)
 {
index eb5b22d..e370e12 100644 (file)
  * PURPOSE.
  */
 
-
-#ifndef _BEJAVACOAL_H
-#define _BEJAVACOAL_H
+/**
+ * @file
+ * @brief       Interface for external Java coalescer.
+ * @author      Sebastian Hack
+ * @version     $Id$
+ */
+#ifndef FIRM_BE_BEJAVACOAL_H
+#define FIRM_BE_BEJAVACOAL_H
 
 struct _be_java_coal_t;
 typedef struct _be_java_coal_t be_java_coal_t;
@@ -102,4 +107,4 @@ void be_java_coal_start_jvm(void);
  */
 void be_java_coal_destroy(be_java_coal_t *c);
 
-#endif
+#endif /* FIRM_BE_BEJAVACOAL_H */
index 7b3c7ba..300f920 100644 (file)
  */
 
 /**
- * Scheduling algorithms.
- * Just a simple list scheduling algorithm is here.
- * @date    20.10.2004
- * @author  Sebastian Hack
- * @version $Id$
+ * @file
+ * @brief       Primitive list scheduling with different node selectors.
+ * @author      Sebastian Hack
+ * @date        20.10.2004
+ * @version     $Id$
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index 53d1e8a..564251a 100644 (file)
  */
 
 /**
- * Primitive list scheduling.
- * @date 20.10.2004
- * @author Sebastian Hack
+ * @file
+ * @brief       Primitive list scheduling with different node selectors.
+ * @author      Sebastian Hack
+ * @date        20.10.2004
+ * @version     $Id$
  */
-#ifndef _FIRM_LIST_SCHED
-#define _FIRM_LIST_SCHED
-
-#include "firm_config.h"
-
-#include "firm_types.h"
+#ifndef FIRM_BE_BELISTSCHED_H
+#define FIRM_BE_BELISTSCHED_H
 
+#include "irgraph.h"
+#include "irnode.h"
 #include "irnodeset.h"
-#include "bearch_t.h"
+
 #include "be.h"
+#include "bearch.h"
 #include "beirg.h"
 
 typedef struct _list_sched_selector_t list_sched_selector_t;
@@ -170,4 +171,4 @@ void list_sched(const be_irg_t *birg, be_options_t *be_opts);
  */
 void list_sched_single_block(const be_irg_t *birg, ir_node *block, be_options_t *be_opts);
 
-#endif /* _FIRM_LIST_SCHED */
+#endif /* FIRM_BE_BELISTSCHED_H */
index a31ca84..6837dbe 100644 (file)
  */
 
 /**
- * Interblock liveness analysis.
- * @author Sebastian Hack
- * @date 6.12.2004
+ * @file
+ * @brief       Interblock liveness analysis.
+ * @author      Sebastian Hack
+ * @date        06.12.2004
+ * @version     $Id$
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index ab07214..5ec205e 100644 (file)
  */
 
 /**
- * Interblock liveness analysis.
- * @author Sebastian Hack
- * @date   6.12.2004
- * @cvs-id $Id$
+ * @file
+ * @brief       Interblock liveness analysis.
+ * @author      Sebastian Hack
+ * @date        06.12.2004
+ * @version     $Id$
  */
-#ifndef FIRM_BELIVE_H
-#define FIRM_BELIVE_H
+#ifndef FIRM_BE_BELIVE_H
+#define FIRM_BE_BELIVE_H
+
+#include <stdio.h>
 
-#include "firm_types.h"
 #include "pset.h"
-#include "bearch.h"
+#include "irnode.h"
+#include "irgraph.h"
 
-#include <stdio.h>
+#include "bearch.h"
 
 typedef enum {
        be_lv_state_in  = 1,
@@ -42,7 +45,6 @@ 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.
@@ -185,10 +187,4 @@ pset *be_liveness_nodes_live_at(const be_lv_t *lv, const arch_env_t *arch_env, c
  */
 pset *be_liveness_nodes_live_at_input(const be_lv_t *lv, const arch_env_t *arch_env, const arch_register_class_t *cls, const ir_node *pos, pset *live);
 
-
-/**
- * FIXME: Need comment
- */
-void be_liveness_add_missing(be_lv_t *lv);
-
-#endif /* _BELIVE_H */
+#endif /* FIRM_BE_BELIVE_H */
index 727e9d6..4a79d38 100644 (file)
  */
 
 /**
- * Internal headers for liveness analysis.
- * @author Sebastian Hack
- * @date 6.12.2004
+ * @file
+ * @brief       Internal headers for liveness analysis.
+ * @author      Sebastian Hack
+ * @date        06.12.2004
+ * @version     $Id$
  */
-
-#ifndef _BELIVE_T_H
-#define _BELIVE_T_H
+#ifndef FIRM_BE_BELIVE_T_H
+#define FIRM_BE_BELIVE_T_H
 
 #include "irgraph_t.h"
-#include "iredges_t.h"
 #include "irphase_t.h"
 #include "irhooks.h"
 
 #include "pset.h"
-#include "set.h"
-#include "list.h"
-#include "hashptr.h"
 #include "bitset.h"
 
 #include "belive.h"
@@ -65,8 +62,9 @@ struct _be_lv_info_t {
 
 static INLINE int _be_lv_next_irn(const struct _be_lv_t *lv, const ir_node *bl, unsigned flags, int i)
 {
-       struct _be_lv_info_t *arr     = phase_get_irn_data(&lv->ph, bl);
-       if(arr) {
+       struct _be_lv_info_t *arr = phase_get_irn_data(&lv->ph, bl);
+
+       if (arr) {
                int n_members = (int) arr[0].u.head.n_members;
 
                while(i < n_members) {
@@ -80,9 +78,9 @@ static INLINE int _be_lv_next_irn(const struct _be_lv_t *lv, const ir_node *bl,
        return -1;
 }
 
-static INLINE ir_node * _be_lv_get_irn(const struct _be_lv_t *lv, const ir_node *bl, int i)
+static INLINE ir_node *_be_lv_get_irn(const struct _be_lv_t *lv, const ir_node *bl, int i)
 {
-       struct _be_lv_info_t *arr     = phase_get_irn_data(&lv->ph, bl);
+       struct _be_lv_info_t *arr = phase_get_irn_data(&lv->ph, bl);
        return get_idx_irn(lv->irg, arr[i + 1].u.node.idx);
 }
 
@@ -95,7 +93,7 @@ static INLINE int _be_is_live_xxx(const struct _be_lv_t *li, const ir_node *bloc
 }
 
 #define be_lv_foreach(lv, bl, flags, i) \
-       for(i = _be_lv_next_irn(lv, bl, flags, 0); i >= 0; i = _be_lv_next_irn(lv, bl, flags, i + 1))
+       for (i = _be_lv_next_irn(lv, bl, flags, 0); i >= 0; i = _be_lv_next_irn(lv, bl, flags, i + 1))
 
 
 static INLINE pset *_be_lv_pset_put(const struct _be_lv_t *lv, const ir_node *block, int state, pset *s)
@@ -117,4 +115,4 @@ static INLINE pset *_be_lv_pset_put(const struct _be_lv_t *lv, const ir_node *bl
 
 #define be_lv_has_info_about(lv, irn) bitset_is_set((lv)->nodes, get_irn_idx(irn))
 
-#endif
+#endif /* FIRM_BE_BELIVE_T_H */
index 7a5fd83..98951cb 100644 (file)
  */
 
 /**
- * Author:      Christian Wuerdig
- * Date:        2007/02/19
- * Copyright:   (c) Universitaet Karlsruhe
- * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
- * CVS-Id:      $Id$
- *
- * Compute register pressure in loops
+ * @file
+ * @brief       Compute register pressure in loops.
+ * @author      Christian Wuerdig
+ * @date        19.02.2007
+ * @version     $Id$
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index c3b7d47..627c54d 100644 (file)
  */
 
 /**
- * Analyse register pressure in loops.
- * @author Christian Wuerdig
- * @date 2006/02/20
- * @cvsid $Id$
+ * @file
+ * @brief       Compute register pressure in loops.
+ * @author      Christian Wuerdig
+ * @date        20.02.2007
+ * @version     $Id$
  */
-
-#ifndef _BELOOPANA_H_
-#define _BELOOPANA_H_
+#ifndef FIRM_BE_BELOOPANA_H
+#define FIRM_BE_BELOOPANA_H
 
 #include "irloop.h"
 
-#include "bearch_t.h"
+#include "bearch.h"
 #include "beirg.h"
 
 typedef struct _be_loopana_t be_loopana_t;
@@ -60,4 +60,4 @@ unsigned be_get_loop_pressure(be_loopana_t *loop_ana, const arch_register_class_
  */
 void be_free_loop_pressure(be_loopana_t *loop_ana);
 
-#endif /* _BELOOPANA_H_ */
+#endif /* FIRM_BE_BELOOPANA_H */
index ce3e0a1..3498419 100644 (file)
@@ -19,7 +19,7 @@
 
 /**
  * @file
- * @brief       Performs lowering of perm nodes and spill/reload optimization.
+ * @brief       Performs lowering of perm nodes. Inserts copies to assure register constraints.
  * @author      Christian Wuerdig
  * @date        14.12.2005
  * @version     $Id$
index eb646f2..6f023d3 100644 (file)
  */
 
 /**
- * Chordal register allocation.
- * @author Christian Wuerdig
- * @date 2005/12/14
- * @cvsid $Id$
+ * @file
+ * @brief       Performs lowering of perm nodes. Inserts copies to assure register constraints.
+ * @author      Christian Wuerdig
+ * @date        14.12.2005
+ * @version     $Id$
  */
-#ifndef _BELOWER_H_
-#define _BELOWER_H_
+#ifndef FIRM_BE_BELOWER_H
+#define FIRM_BE_BELOWER_H
 
 #include "beirg.h"
 
 void assure_constraints(be_irg_t *birg);
 void lower_nodes_after_ra(be_irg_t *birg, int do_copy);
 
-#endif /* _BELOWER_H_ */
+#endif /* FIRM_BE_BELOWER_H */
index 89cf3ec..db6e524 100644 (file)
  */
 
 /**
- * Abstract machine interface.
- * @author Christian Wuerdig
- * @date   01.12.2006
- * @cvs-id $Id$
+ * @file
+ * @brief       Abstract machine interface.
+ * @author      Christian Wuerdig
+ * @date        01.12.2006
+ * @version     $Id$
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index b94a281..57c47e8 100644 (file)
  * PURPOSE.
  */
 
-#ifndef _BE_MACHINE_H_
-#define _BE_MACHINE_H_
-
 /**
- * Abstract machine interface.
- * @author Christian Wuerdig
- * @date   23.10.2006
- * @cvs-id $Id$
+ * @file
+ * @brief       Abstract machine interface.
+ * @author      Christian Wuerdig
+ * @date        23.10.2006
+ * @version     $Id$
  */
+#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;
@@ -107,4 +107,4 @@ int be_machine_is_dummy_unit_type(const be_execution_unit_type_t *tp);
  */
 #define be_machine_get_execunit_type(unit) ((unit)->tp)
 
-#endif /* _BE_MACHINE_H_ */
+#endif /* FIRM_BE_BEMACHINE_H */
index 287c978..1a0d49f 100644 (file)
  * PURPOSE.
  */
 
+/**
+ * @file
+ * @brief       Support for machine nodes with machine operands.
+ * @author      Michael Beck
+ * @version     $Id$
+ */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
index 61efa88..fed9c22 100644 (file)
  */
 
 /**
- * Support for machine nodes with machine operands.
- *
- * @author Michael Beck
+ * @file
+ * @brief       Support for machine nodes with machine operands.
+ * @author      Michael Beck
+ * @version     $Id$
  */
-#ifndef _BEMACHNODES_H
-#define _BEMACHNODES_H
+#ifndef FIRM_BE_BEMACHNODES_H
+#define FIRM_BE_BEMACHNODES_H
 
-#include "firm_types.h"
+#include "irnode.h"
 
 /*
  * Machine nodes can have machine operands as inputs.
@@ -94,4 +95,4 @@ int get_mirn_arity(mirn_handle h);
 /* Convenience: Returns the arity of a machine node. */
 int _get_mirn_arity(ir_node *n);
 
-#endif /* _BEMACHNODES_H */
+#endif /* FIRM_BE_BEMACHNODES_H */
index d192139..2c84a70 100644 (file)
  * PURPOSE.
  */
 
-/*
- * Author:      Matthias Braun
- * Date:        29.09.2005
- * Copyright:   (c) Universitaet Karlsruhe
- * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
- * CVS-Id:      $Id$
+/**
+ * @file
+ * @brief       Backend module interface.
+ * @author      Matthias Braun
+ * @date        29.09.2005
+ * @version     $Id$
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index 80bec6a..62401fd 100644 (file)
  * PURPOSE.
  */
 
-/*
- * Author:      Matthias Braun
- * Date:               11.12.2006
- * Copyright:   (c) Universitaet Karlsruhe
- * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
+/**
+ * @file
+ * @brief       Backend module interface.
+ * @author      Matthias Braun
+ * @date        11.12.2006
+ * @version     $Id$
  */
-#ifndef BEMODULE_H_
-#define BEMODULE_H_
+#ifndef FIRM_BE_BEMODULE_H
+#define FIRM_BE_BEMODULE_H
 
 /**
  * Mark a function as module constructor.
@@ -63,4 +64,4 @@ void be_add_module_list_opt(lc_opt_entry_t *grp, const char *name,
                             be_module_list_entry_t * const * first,
                             void **var);
 
-#endif
+#endif /* FIRM_BE_BEMODULE_H */
index a0d7058..a264215 100644 (file)
  * PURPOSE.
  */
 
-/*
- * Author:      Matthias Braun
- * Date:               11.12.2006
- * Copyright:   (c) Universitaet Karlsruhe
- * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
+/**
+ * @file
+ * @brief       Backend module interface.
+ * @author      Matthias Braun
+ * @date        11.12.2006
+ * @version     $Id$
  */
-#ifndef BEMODULE_T_H_
-#define BEMODULE_T_H_
+#ifndef FIRM_BE_BEMODULE_T_H
+#define FIRM_BE_BEMODULE_T_H
 
 #include "bemodule.h"
 
@@ -34,4 +35,4 @@ struct be_module_list_entry_t {
        struct be_module_list_entry_t *next;
 };
 
-#endif
+#endif /* FIRM_BE_BEMODULE_T_H */
index d28ab5b..06e0949 100644 (file)
  * PURPOSE.
  */
 
-/*
- * Project:     libFIRM
- * File name:   ir/be/benode.c
- * Purpose:     Backend node support for generic backend nodes.
- * Author:      Sebastian Hack
- * Modified by: Michael Beck, Matthias Braun
- * Created:     17.05.2005
- * CVS-ID:      $Id$
- * Copyright:   (c) 1998-2007 Universität Karlsruhe
- * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
- */
-
 /**
- * @file   benode.c
- * @date   17.05.2005
- * @author Sebastian Hack
+ * @file
+ * @brief       Backend node support for generic backend nodes.
+ * @author      Sebastian Hack
+ * @date        17.05.2005
+ * @version     $Id$
  *
  * Backend node support for generic backend nodes.
  * This file provides Perm, Copy, Spill and Reload nodes.
  */
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
index 3648028..63dd9ca 100644 (file)
  */
 
 /**
- * @file   benode_t.h
- * @date   17.05.2005
- * @author Sebastian Hack
+ * @file
+ * @brief       Backend node support for generic backend nodes.
+ * @author      Sebastian Hack
+ * @date        17.05.2005
+ * @version     $Id$
  *
- * Backend node support.
- *
- * Copyright (C) 2005 Universitaet Karlsruhe
- * Released under the GPL
+ * Backend node support for generic backend nodes.
+ * This file provides Perm, Copy, Spill and Reload nodes.
  */
-
-#ifndef _BENODE_T_H
-#define _BENODE_T_H
-
-#include "firm_config.h"
+#ifndef FIRM_BE_BENODE_T_H
+#define FIRM_BE_BENODE_T_H
 
 #include <limits.h>
 
 #include "irmode.h"
 #include "irnode.h"
-#include "entity_t.h"
+#include "irgraph.h"
+#include "entity.h"
 
-#include "be_t.h"
-#include "bearch_t.h"
+#include "bearch.h"
 
 #define BE_OUT_POS(p) (-((p) + 1))
 
@@ -508,4 +505,4 @@ void be_set_phi_flags(const arch_env_t *arch_env, ir_node *phi,
  */
 extern const arch_irn_handler_t be_node_irn_handler;
 
-#endif /* _BENODE_T_H */
+#endif /* FIRM_BE_BENODE_T_H */
index 9ed33ba..096fb5a 100644 (file)
  * PURPOSE.
  */
 
+/**
+ * @file
+ * @brief       A lightweight wrapper around pset to store IR nodes.
+ * @author      Michael Beck
+ * @version     $Id$
+ *
+ * In some algorithms we want a more deterministic behavior
+ * which the pset_ptr did not guarantee due to it's hash function
+ */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
index 4101c41..8fbc556 100644 (file)
  */
 
 /**
- * A lightweight wrapper around pset to store IR nodes.
+ * @file
+ * @brief       A lightweight wrapper around pset to store IR nodes.
+ * @author      Michael Beck
+ * @version     $Id$
+ *
  * In some algorithms we want a more deterministic behavior
  * which the pset_ptr did not guarantee due to it's hash function
  */
-#ifndef _BENODESETS_H
-#define _BENODESETS_H
+#ifndef FIRM_BE_BENODESETS_H
+#define FIRM_BE_BENODESETS_H
 
-#include "firm_types.h"
+#include "irnode.h"
 #include "pset.h"
 
 typedef struct pset nodeset;
@@ -173,4 +177,4 @@ static INLINE void nodeset_break(nodeset *nset)
  */
 #define foreach_nodeset(nset, irn)     for (irn = nodeset_first(nset); irn; irn = nodeset_next(nset))
 
-#endif /* _BENODESETS_H */
+#endif /* FIRM_BE_BENODESETS_H */
index d1f1c68..9927ff0 100644 (file)
  * PURPOSE.
  */
 
-#ifndef PRESSURE_STAT_H_
-#define PRESSURE_STAT_H_
+/**
+ * @file
+ * @brief       Register Pressure Statistics.
+ * @author      Adam M. Szalkowski
+ * @date        06.04.2006
+ * @version     $Id$
+ */
+#ifndef FIRM_BE_BEPRESSURE_STAT_H
+#define FIRM_BE_BEPRESSURE_STAT_H
+
+#include "beirg.h"
+#include "bearch.h"
 
-void be_analyze_regpressure(be_irg_t *birg, const arch_register_class_t *cls,
-                            const char * suffix);
+void be_analyze_regpressure(be_irg_t *birg, const arch_register_class_t *cls, const char *suffix);
 
-#endif
+#endif /* FIRM_BE_BEPRESSURE_STAT_H */
index 5ebe4d2..2e76a50 100644 (file)
  * PURPOSE.
  */
 
-/** vim: set sw=4 ts=4:
- * @file   beprofile.c
- * @date   2006-04-06
- * @author Adam M. Szalkowski
- * @cvs-id $Id$
- *
- * Code instrumentation and execution count profiling
- *
- * Copyright (C) 2006 Universitaet Karlsruhe
- * Released under the GPL
+/**
+ * @file
+ * @brief       Code instrumentation and execution count profiling.
+ * @author      Adam M. Szalkowski
+ * @date        06.04.2006
+ * @version     $Id$
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index adcfc24..ca2c930 100644 (file)
  * PURPOSE.
  */
 
-/** vim: set sw=4 ts=4:
- * @file   beprofile.h
- * @date   2006-04-06
- * @author Adam M. Szalkowski
- * @cvs-id $Id$
- *
- * Code instrumentation and execution count profiling
- *
- * Copyright (C) 2006 Universitaet Karlsruhe
- * Released under the GPL
+/**
+ * @file
+ * @brief       Code instrumentation and execution count profiling.
+ * @author      Adam M. Szalkowski
+ * @date        06.04.2006
+ * @version     $Id$
  */
+#ifndef FIRM_BE_BEPROFILE_H
+#define FIRM_BE_BEPROFILE_H
 
-#ifndef _BEPROFILE_H_
-#define _BEPROFILE_H_
+#include "irgraph.h"
+#include "irnode.h"
 
 /** Additional flags for profiling */
 enum profile_flags {
@@ -75,4 +73,4 @@ ir_exec_freq *be_create_execfreqs_from_profile(ir_graph *irg);
  */
 int be_profile_has_data(void);
 
-#endif /* _BEPROFILE_H_ */
+#endif /* FIRM_BE_BEPROFILE_H */
index 6c6d625..29fa1d1 100644 (file)
  */
 
 /**
- * Base routines for register allocation.
- * @author Sebastian Hack
- * @date 22.11.2004
+ * @file
+ * @brief       Base routines for register allocation.
+ * @author      Sebastian Hack
+ * @date        22.11.2004
+ * @version     $Id$
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -34,6 +36,7 @@
 #include "irnode.h"
 #include "irmode.h"
 #include "irdom.h"
+#include "iredges.h"
 
 #include "bera.h"
 #include "beutil.h"
index 5097c88..f78e3e6 100644 (file)
  */
 
 /**
- * Register allocation functions.
- * @author Sebastian Hack
- * @date 13.1.2005
+ * @file
+ * @brief       Base routines for register allocation.
+ * @author      Sebastian Hack
+ * @date        13.01.2005
+ * @version     $Id$
  */
-#ifndef _BERA_H
-#define _BERA_H
-
-#include "firm_config.h"
+#ifndef FIRM_BE_BERA_H
+#define FIRM_BE_BERA_H
 
 #include <libcore/lc_timing.h>
 
-#include "firm_types.h"
+#include "irnode.h"
 
-#include "be.h"
 #include "belive.h"
 #include "beirg.h"
-#include "bemodule.h"
 
 typedef struct {
        lc_timer_t *t_prolog;      /**< timer for prolog */
@@ -88,4 +86,4 @@ int value_dominates(const ir_node *a, const ir_node *b);
  */
 int value_dominates_intrablock(const ir_node *a, const ir_node *b);
 
-#endif /* _BERA_H */
+#endif /* FIRM_BE_BERA_H */
index 5a75d9f..c6530c5 100644 (file)
  */
 
 /**
- * Author:      Daniel Grund
- * Date:               17.01.2006
- * Copyright:   (c) Universitaet Karlsruhe
- * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
- *
- * Implementation of the RA-Interface for an external, (non-SSA) register allocator.
+ * @file
+ * @brief       Implementation of the RA-Interface for an external, (non-SSA) register allocator.
+ * @author      Daniel Grund
+ * @date        17.01.2006
+ * @version     $Id$
  *
  * The external register allocator is a program:
  *    PROG -i INPUTFILE -o OUTPUTFILE
@@ -70,8 +69,7 @@ allocs                ::= 'allocs' alloc* .
 
 alloc          ::= node-nr reg-nr .
 
-
-******** End of file format docu ********/
+*/
 #ifdef NOT_PORTED
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index 3d6eae6..7192b25 100644 (file)
  */
 
 /**
- * Author:      Daniel Grund
- * Date:               17.01.2006
- * Copyright:   (c) Universitaet Karlsruhe
- * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
+ * @file
+ * @brief       Implementation of the RA-Interface for an external, (non-SSA) register allocator.
+ * @author      Daniel Grund
+ * @date        17.01.2006
+ * @version     $Id$
  *
- * Implementation of the RA-Interface for an external, non-SSA register allocator
- */
-#ifndef _BERAEXTERN_H
-#define _BERAEXTERN_H
+ * The external register allocator is a program:
+ *    PROG -i INPUTFILE -o OUTPUTFILE
+ *
+ *   1) Input file defines the interference graph
+ *   2) Output file contains the instructions to perform
+ *
+
+
+The input file format
+----------------------
+
+inputfile      ::= regs nodes interf affinities .
+
+regs           ::= 'regs' regcount .                                           // Anzahl der register (0..regcount-1), die zur Verfuegung stehen
+
+nodes          ::= 'nodes' '{' node* '}' .                                     // All nodes in the graph
+
+node           ::= node-info
+                         | node-info '<' reg-nr '>' .                          // Reg-nr is present in case of constraints
+
+node-info      ::= node-nr spill-costs .
+
+interf         ::= 'interferences' '{' i-edge* '}' .           // Interference edges of the graph
+
+i-edge         ::= '(' node-nr ',' node-nr ')' .
+
+affinities     ::= 'affinities' '{' a-edge* '}' .                      // Affinity edges of the graph
+
+a-edge         ::= '(' node-nr ',' node-nr ',' weight ')' .
+
+
+weight, regcount, node-nr ::= int32 .
+spill-costs ::= int32 .                                                                        // negative spill costs indicate unspillable
+
+The output file format
+-----------------------
+
+outputfile     ::= spills | allocs .
+
+spills         ::= 'spills' node-nr+ .
+
+allocs         ::= 'allocs' alloc* .
+
+alloc          ::= node-nr reg-nr .
+
+*/
+
+#ifndef FIRM_BE_BERAEXTERN_H
+#define FIRM_BE_BERAEXTERN_H
 
 #include "bera.h"
 
-#endif
+#endif /* FIRM_BE_BERAEXTERN_H */
index 301d58e..2106059 100644 (file)
  * PURPOSE.
  */
 
-/* $Id$ */
-
+/**
+ * @file
+ * @brief       Scheduling utilities for nodes in Blocks and Blocks.
+ * @author      Sebastian Hack
+ * @version     $Id$
+ */
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
index 3f3bf9c..cade289 100644 (file)
  * PURPOSE.
  */
 
-/*
- * Scheduling utilities for nodes in Blocks and Blocks.
- *
- * $Id$
+/**
+ * @file
+ * @brief       Scheduling utilities for nodes in Blocks and Blocks.
+ * @author      Sebastian Hack
+ * @version     $Id$
  */
-#ifndef _BESCHED_H
-#define _BESCHED_H
+#ifndef FIRM_BE_BESCHED_H
+#define FIRM_BE_BESCHED_H
 
 #include <stdio.h>
 
-#include "firm_types.h"
+#include "irgraph.h"
+#include "irnode.h"
 
 void be_sched_dump(FILE *f, ir_graph *irg);
 
@@ -76,4 +78,4 @@ void    sched_remove(ir_node *irn);
  */
 void be_remove_dead_nodes_from_schedule(ir_graph *irg);
 
-#endif /* _BESCHED_H */
+#endif /* FIRM_BE_BESCHED_H */
index a28a549..4968b98 100644 (file)
  * PURPOSE.
  */
 
-/* $Id$ */
-
-#ifndef _BESCHED_T_H
-#define _BESCHED_T_H
+/**
+ * @file
+ * @brief       Scheduling utilities for nodes in Blocks and Blocks.
+ * @author      Sebastian Hack
+ * @version     $Id$
+ */
+#ifndef FIRM_BE_BESCHED_T_H
+#define FIRM_BE_BESCHED_T_H
 
 #define SCHED_INITIAL_GRANULARITY (1 << 14)
 
@@ -340,4 +344,4 @@ ir_node *sched_skip(ir_node *from, int forward,
 #define sched_comes_after(n1, n2)       _sched_comes_after(n1, n2)
 #define sched_cmp(a, b)                 _sched_cmp(a, b)
 
-#endif
+#endif /* FIRM_BE_BESCHED_T_H */
index b6e854b..795caac 100644 (file)
  */
 
 /**
+ * @file
+ * @brief       Implements a list scheduler for the MRIS algorithm.
+ * @author      Sebastian Hack
+ * @date        04.04.2006
+ * @version     $Id$
+ *
  * Implements a list scheduler for the MRIS algorithm in:
  * Govindarajan, Yang, Amaral, Zhang, Gao
  * Minimum Register Instruction Sequencing to Reduce Register Spills
  * in out-of-order issue superscalar architectures
- * @author Sebastian Hack
- * @date   04.04.2006
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -43,7 +47,6 @@
 #include "irgwalk.h"
 #include "irtools.h"
 #include "irbitset.h"
-
 #include "height.h"
 
 #include "benode_t.h"
@@ -53,7 +56,7 @@
 #include "beirg.h"
 
 struct _mris_env_t {
-       ir_phase            ph;
+       ir_phase          ph;
        heights_t         *heights;
        const arch_env_t  *aenv;
        ir_graph          *irg;
index e6eb87a..bcb4432 100644 (file)
  */
 
 /**
- * Implements a list schedule selector for the MRIS algorithm in:
+ * @file
+ * @brief       Implements a list scheduler for the MRIS algorithm.
+ * @author      Sebastian Hack
+ * @date        04.04.2006
+ * @version     $Id$
+ *
+ * Implements a list scheduler for the MRIS algorithm in:
  * Govindarajan, Yang, Amaral, Zhang, Gao
  * Minimum Register Instruction Sequencing to Reduce Register Spills
  * in out-of-order issue superscalar architectures
  */
+#ifndef FIRM_BE_BESCHEDMRIS_H
+#define FIRM_BE_BESCHEDMRIS_H
 
-#ifndef _BESCHEDMRIS_H
-#define _BESCHEDMRIS_H
-
-#include "be.h"
-#include "belistsched.h"
+#include "beirg.h"
 
 typedef struct _mris_env_t mris_env_t;
 
@@ -50,4 +54,4 @@ void be_sched_mris_free(mris_env_t *env);
  */
 void dump_ir_block_graph_mris(mris_env_t *env, const char *suffix);
 
-#endif /* _BESCHEDMRIS_H */
+#endif /* FIRM_BE_BESCHEDMRIS_H */
index 5162eec..b074c4c 100644 (file)
  */
 
 /**
- * Trivial node selector.
- * @author Matthias Braun
- * @date   29.08.2006
- * @cvs-id $Id$
+ * @file
+ * @brief       Random node selector.
+ * @author      Matthias Braun
+ * @date        29.08.2006
+ * @version     $Id$
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -53,17 +54,17 @@ static ir_node *random_select(void *block_env, ir_nodeset_t *ready_set,
                }
        }
 
-       if(only_branches_left) {
+       if (only_branches_left) {
                /* at last: schedule branches */
                ir_nodeset_iterator_init(&iter, ready_set);
                irn = ir_nodeset_iterator_next(&iter);
        } else {
                do {
-                       // take 1 random node
+                       /* take 1 random node */
                        int n = rand() % ir_nodeset_size(ready_set);
                        int i = 0;
                        ir_nodeset_iterator_init(&iter, ready_set);
-                       while(irn = ir_nodeset_iterator_next(&iter)) != NULL) {
+                       while ((irn = ir_nodeset_iterator_next(&iter)) != NULL) {
                                if(i == n) {
                                        break;
                                }
index 52a19ab..b939c87 100644 (file)
  */
 
 /**
- * Regpressure node selector.
- * Originally implemented by Sebastian Hack.
- * @author Christian Wuerdig
- * @date   29.08.2006
- * @cvs-id $Id$
+ * @file
+ * @brief       Regpressure node selector.
+ * @author      Sebastian Hack
+ * @date        29.08.2006
+ * @version     $Id$
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index 04261cf..d541104 100644 (file)
  */
 
 /**
+ * @file
+ * @brief       Implementation of a register saturating list scheduler.
+ * @author      Christian Wuerdig
+ * @date        29.08.2006
+ * @version     $Id$
+ *
  * Implementation of a register saturating list scheduler
  * as described in: Sid-Ahmed-Ali Touati
  * Register Saturation in Superscalar and VLIW Codes
- *
- * @license This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
- * @author  Christian Wuerdig
- * @date    29.08.2006
- * @cvs-id  $Id$
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index d789b17..dfc920c 100644 (file)
  */
 
 /**
- * Interface for register saturating list scheduler
+ * @file
+ * @brief       Implementation of a register saturating list scheduler.
+ * @author      Christian Wuerdig
+ * @date        06.09.2006
+ * @version     $Id$
+ *
+ * Implementation of a register saturating list scheduler
  * as described in: Sid-Ahmed-Ali Touati
  * Register Saturation in Superscalar and VLIW Codes
- * @author Christian Wuerdig
- * @date   06.09.2006
- * @cvs-id $Id$
  */
-#ifndef _BESCHEDRSS_H_
-#define _BESCHEDRSS_H_
+#ifndef FIRM_BE_BESCHEDRSS_H
+#define FIRM_BE_BESCHEDRSS_H
 
-#include "firm_config.h"
+#include "beirg.h"
 
 /**
  * Perform RSS schedule preprocessing for the given irg.
@@ -36,4 +39,4 @@
  */
 void rss_schedule_preparation(const be_irg_t *birg);
 
-#endif /* _BESCHEDRSS_H_ */
+#endif /* FIRM_BE_BESCHEDRSS_H */
index d341138..a90b508 100644 (file)
  */
 
 /**
- * Implements a trace scheduler as presented in Muchnik[TM].
- * Originally implemented by Michael Beck.
- * @author Christian Wuerdig
- * @date   28.08.2006
- * @cvs-id $Id$
+ * @file
+ * @brief       Implements a trace scheduler as presented in Muchnik[TM].
+ * @author      Michael Beck
+ * @date        28.08.2006
+ * @version     $Id$
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index 4c03ace..25b5e45 100644 (file)
  */
 
 /**
- * Trivial node selector.
- * @author Christian Wuerdig
- * @date   29.08.2006
- * @cvs-id $Id$
+ * @file
+ * @brief       Trivial node selector.
+ * @author      Sebastian Hack
+ * @date        29.08.2006
+ * @version     $Id$
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 
 #include <stdlib.h>
 
-#include "besched_t.h"
+#include "irgraph.h"
+#include "irnode.h"
+#include "irnodeset.h"
+
+#include "bearch.h"
 #include "belistsched.h"
 
 /**
index 60272ed..486c474 100644 (file)
  * PURPOSE.
  */
 
-/*
- * Author:      Daniel Grund, Sebastian Hack, Matthias Braun
- * Date:               29.09.2005
- * Copyright:   (c) Universitaet Karlsruhe
- * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
+/**
+ * @file
+ * @brief       Main spill driver.
+ * @author      Daniel Grund, Sebastian Hack, Matthias Braun
+ * @date               29.09.2005
+ * @version     $Id$
  */
-#ifndef BESPILL_H_
-#define BESPILL_H_
+#ifndef FIRM_BE_BESPILL_H
+#define FIRM_BE_BESPILL_H
 
-#include "firm_types.h"
-#include "set.h"
-#include "pset.h"
+#include "irnode.h"
 #include "debug.h"
 
-#include "be_t.h"
-
-#include "bearch_t.h"
+#include "bearch.h"
+#include "beirg.h"
 
 typedef struct _spill_env_t spill_env_t;
 
@@ -110,4 +108,4 @@ int be_get_reload_costs(spill_env_t *env, ir_node *to_spill, ir_node *before);
  */
 int be_get_reload_costs_on_edge(spill_env_t *env, ir_node *to_spill, ir_node *block, int pos);
 
-#endif
+#endif /* FIRM_BE_BESPILL_H */
index 0534413..e102180 100644 (file)
@@ -45,7 +45,7 @@
 #include "beutil.h"
 #include "bearch_t.h"
 #include "bespillbelady.h"
-#include "beuses_t.h"
+#include "beuses.h"
 #include "besched_t.h"
 #include "beirgmod.h"
 #include "belive_t.h"
index aa326cd..68d9705 100644 (file)
  */
 
 /**
- * Author:      Daniel Grund, Matthias Braun
- * Date:               20.09.2005
- * Copyright:   (c) Universitaet Karlsruhe
- * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
+ * @file
+ * @brief       Beladys spillalgorithm.
+ * @author      Daniel Grund, Matthias Braun
+ * @date        20.09.2005
+ * @version     $Id$
  */
-
-#ifndef BESPILLBELADY_H_
-#define BESPILLBELADY_H_
+#ifndef FIRM_BE_BESPILLBELADY_H
+#define FIRM_BE_BESPILLBELADY_H
 
 #include "beirg.h"
 #include "bearch.h"
@@ -39,4 +39,4 @@
 void be_spill_belady_spill_env(be_irg_t *birg, const arch_register_class_t *cls,
                                spill_env_t *spill_env);
 
-#endif /*BESPILLBELADY_H_*/
+#endif /* FIRM_BE_BESPILLBELADY_H */
index a1cf19b..3e7574e 100644 (file)
  * PURPOSE.
  */
 
-/*
- * Author:      Matthias Braun
- * Date:               05.05.2006
- * Copyright:   (c) Universitaet Karlsruhe
- * License:     This file is protected by GPL -  GNU GENERAL PUBLIC LICENSE.
+/**
+ * @file
+ * @brief       Morgans spill algorithm.
+ * @author      Matthias Braun
+ * @date        05.05.2006
+ * @version     $Id$
  */
-#ifndef BESPILLMORGAN_H_
-#define BESPILLMORGAN_H_
+#ifndef FIRM_BE_BESPILLMORGAN_H
+#define FIRM_BE_BESPILLMORGAN_H
 
 #include "beirg.h"
 #include "bearch.h"
 
 void be_spill_morgan(be_irg_t *birg, const arch_register_class_t *cls);
 
-#endif
+#endif /* FIRM_BE_BESPILLMORGAN_H */
index b25b237..9f52131 100644 (file)
  * PURPOSE.
  */
 
-/*
- * Author:      Daniel Grund, Sebastian Hack, Matthias Braun
- * Date:               29.09.2005
- * Copyright:   (c) Universitaet Karlsruhe
- * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
+/**
+ * @file
+ * @brief       Option handling for spiller.
+ * @author      Daniel Grund, Sebastian Hack, Matthias Braun
+ * @date        29.09.2005
+ * @version     $Id$
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index d3cfc92..14baab4 100644 (file)
  * PURPOSE.
  */
 
-/*
- * Author:      Matthias Braun
- * Date:               12.10.2006
- * Copyright:   (c) Universitaet Karlsruhe
- * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
+/**
+ * @file
+ * @brief       Option handling for spiller.
+ * @author      Matthias Braun
+ * @date        12.10.2006
+ * @version     $Id$
  */
-#ifndef BESPILL_OPTIONS_H_
-#define BESPILL_OPTIONS_H_
+#ifndef FIRM_BE_BESPILL_OPTIONS_H
+#define FIRM_BE_BESPILL_OPTIONS_H
 
 #include "bearch.h"
 #include "beirg.h"
@@ -33,10 +34,10 @@ extern int be_coalesce_spill_slots;
 extern int be_do_remats;
 
 typedef struct be_spiller_t {
-       void (*spill) (be_irg_t *birg, const arch_register_class_tcls);
+       void (*spill) (be_irg_t *birg, const arch_register_class_t *cls);
 } be_spiller_t;
 void be_register_spiller(const char *name, be_spiller_t *spiller);
 
-void be_do_spill(be_irg_t *birg, const arch_register_class_tcls);
+void be_do_spill(be_irg_t *birg, const arch_register_class_t *cls);
 
-#endif
+#endif /* FIRM_BE_BESPILL_OPTIONS_H */
index 407e332..cc51f96 100644 (file)
  * PURPOSE.
  */
 
-/** vim: set sw=4 ts=4:
- * @file   bespillremat.c
- * @date   2006-04-06
- * @author Adam M. Szalkowski & Sebastian Hack
- *
- * ILP based spilling & rematerialization
- *
- * Copyright (C) 2006 Universitaet Karlsruhe
- * Released under the GPL
+/**
+ * @file
+ * @brief       ILP based spilling & rematerialization
+ * @author      Adam M. Szalkowski
+ * @date        06.04.2006
+ * @version     $Id$
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -50,7 +47,7 @@
 #include "irloop_t.h"
 #include "irnodeset.h"
 #include "phiclass.h"
-#include "iredges.h"
+#include "iredges_t.h"
 #include "execfreq.h"
 #include "irvrfy.h"
 #include "irbackedge_t.h"
index da7e8f1..a3cf79c 100644 (file)
  */
 
 /**
- * @file   bespillremat.h
- * @date   2006-04-06
- * @author Adam M. Szalkowski
- *
- * Copyright (C) 2006 Universitaet Karlsruhe
- * Released under the GPL
+ * @file
+ * @brief       ILP based spilling & rematerialization
+ * @author      Adam M. Szalkowski
+ * @date        06.04.2006
+ * @version     $Id$
  */
+#ifndef FIRM_BE_BESPILLREMAT_H
+#define FIRM_BE_BESPILLREMAT_H
 
-#ifndef BESPILLREMAT_H_
-#define BESPILLREMAT_H_
+#include "bearch.h"
+#include "beirg.h"
 
 void be_spill_remat(be_irg_t *birg, const arch_register_class_t *cls);
 
-#endif /*BESPILLREMAT_H_*/
+#endif /* FIRM_BE_BESPILLREMAT_H */
index 9d38eae..815119f 100644 (file)
  * PURPOSE.
  */
 
-/*
- * Author:      Matthias Braun
- * Date:               26.7.06
- * Copyright:   (c) Universitaet Karlsruhe
- * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
+/**
+ * @file
+ * @brief       Spillslot coalescer.
+ * @author      Matthias Braun
+ * @date        26.07.2006
+ * @version     $Id$
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -30,7 +31,7 @@
 #include <stdlib.h>
 
 #include "set.h"
-
+#include "array.h"
 #include "irgwalk.h"
 #include "ircons.h"
 #include "irprintf.h"
@@ -50,6 +51,7 @@
 #include "bemodule.h"
 #include "bera.h"
 #include "beirg_t.h"
+#include "bearch_t.h"
 
 #define DBG_COALESCING         1
 #define DBG_INTERFERENCES      2
@@ -727,8 +729,8 @@ static void collect_spills_walker(ir_node *node, void *data)
        if (!arch_irn_class_is(arch_env, node, reload))
                return;
 
-       mode = get_irn_mode(node);
-       cls = arch_get_irn_reg_class(arch_env, node, -1);
+       mode  = get_irn_mode(node);
+       cls   = arch_get_irn_reg_class(arch_env, node, -1);
        align = arch_isa_get_reg_class_alignment(arch_env_get_isa(arch_env), cls);
 
        be_node_needs_frame_entity(env, node, mode, align);
index 0aa32b5..ba4f72e 100644 (file)
  * PURPOSE.
  */
 
-/*
- * Author:      Matthias Braun
- * Date:               27.7.2006
- * Copyright:   (c) Universitaet Karlsruhe
- * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
+/**
+ * @file
+ * @brief       Spillslot coalescer.
+ * @author      Matthias Braun
+ * @date        27.07.2006
+ * @version     $Id$
  */
-#ifndef BESPILLSLOTS_H_
-#define BESPILLSLOTS_H_
+#ifndef FIRM_BE_BESPILLSLOTS_H
+#define FIRM_BE_BESPILLSLOTS_H
 
 #include "beirg.h"
 
@@ -70,4 +71,4 @@ void be_assign_entities(be_fec_env_t *env);
  */
 void be_coalesce_spillslots(be_irg_t *birg);
 
-#endif /* BESPILLSLOTS_H_ */
+#endif /* FIRM_BE_BESPILLSLOTS_H */
index 1b02865..ae2d194 100644 (file)
 
 /**
  * @file
- * @brief SSA construction for a set of nodes
+ * @brief       SSA construction for a set of nodes
  * @author      Sebastian Hack, Daniel Grund, Matthias Braun, Christian Wuerdig
  * @date        04.05.2005
  * @version     $Id$
- * Copyright:   (c) Universitaet Karlsruhe
- * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
  *
  * The problem: Given a value and a set of "copies" that are known to
  * represent the same abstract value, rewire all usages of the original value
  * found, then we search one in the immediate dominator. If we are in a block
  * of the dominance frontier, create a phi and search do the same search for
  * the phi arguments.
+ *
+ * A copy in this context means, that you want to introduce several new
+ * abstract values (in Firm: nodes) for which you know, that they
+ * represent the same concrete value. This is the case if you
+ * - copy
+ * - spill and reload
+ * - re-materialize
+ * a value.
+ *
+ * This function reroutes all uses of the original value to the copies in the
+ * corresponding dominance subtrees and creates Phi functions where necessary.
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index d926404..745dc70 100644 (file)
 
 /**
  * @file
- * @brief     Introduce several copies for one node.
- * @author    Sebastian Hack, Daniel Grund, Matthias Braun, Christian Wuerdig
- * @date      30.03.2007
- * @version   $Id$
- * Copyright: (c) Universitaet Karlsruhe
- * Licence:   This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
-
+ * @brief       SSA construction for a set of nodes
+ * @author      Sebastian Hack, Daniel Grund, Matthias Braun, Christian Wuerdig
+ * @date        30.03.2007
+ * @version     $Id$
+ *
+ * The problem: Given a value and a set of "copies" that are known to
+ * represent the same abstract value, rewire all usages of the original value
+ * to their closest copy while introducing phis as necessary.
+ *
+ * Algorithm: Mark all blocks in the iterated dominance frontiers of the value
+ * and it's copies. Link the copies ordered by dominance to the blocks.  The
+ * we search for each use all all definitions in the current block, if none is
+ * found, then we search one in the immediate dominator. If we are in a block
+ * of the dominance frontier, create a phi and search do the same search for
+ * the phi arguments.
+ *
  * A copy in this context means, that you want to introduce several new
  * abstract values (in Firm: nodes) for which you know, that they
  * represent the same concrete value. This is the case if you
@@ -37,8 +46,8 @@
  * This function reroutes all uses of the original value to the copies in the
  * corresponding dominance subtrees and creates Phi functions where necessary.
  */
-#ifndef FIRM_BE_SSACONSTR_H
-#define FIRM_BE_SSACONSTR_H
+#ifndef FIRM_BE_BESSACONSTR_H
+#define FIRM_BE_BESSACONSTR_H
 
 #include <stdlib.h>
 #include "bedomfront.h"
 #include "pdeq.h"
 
 typedef struct be_ssa_construction_env_t {
-       ir_graph                   *irg;
-       const be_dom_front_info_t  *domfronts;
-       ir_mode                    *mode;
-       waitq                      *worklist;
-       const ir_nodeset_t         *ignore_uses;
+       ir_graph                  *irg;
+       const be_dom_front_info_t *domfronts;
+       ir_mode                   *mode;
+       waitq                     *worklist;
+       const ir_nodeset_t        *ignore_uses;
        ir_node                   **new_phis;
-       int                         iterated_domfront_calculated;
+       int                       iterated_domfront_calculated;
 } be_ssa_construction_env_t;
 
 /**
@@ -95,4 +104,4 @@ ir_node **be_ssa_construction_get_new_phis(be_ssa_construction_env_t *env);
  */
 void be_ssa_construction_destroy(be_ssa_construction_env_t *env);
 
-#endif
+#endif /* FIRM_BE_BESSACONSTR_H */
index e3d7c88..1f8a1d1 100644 (file)
  */
 
 /**
- * Author:      Daniel Grund
- * Date:               25.05.2005
- * Copyright:   (c) Universitaet Karlsruhe
- * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
- *
- * Performs SSA-Destruction.
+ * @file
+ * @brief       Performs SSA-Destruction.
+ * @author      Daniel Grund
+ * @date        25.05.2005
+ * @version     $Id$
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index 4af6635..53194fb 100644 (file)
  */
 
 /**
- * Author:      Daniel Grund
- * Date:               25.05.2005
- * Copyright:   (c) Universitaet Karlsruhe
- * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
- *
- * Performs SSA-Destruction.
+ * @file
+ * @brief       Performs SSA-Destruction.
+ * @author      Daniel Grund
+ * @date        25.05.2005
+ * @version     $Id$
  */
+#ifndef FIRM_BE_BESSADESTR_H
+#define FIRM_BE_BESSADESTR_H
 
-#include "bechordal_t.h"
+#include "bechordal.h"
 
 /**
  * Performs SSA-Destruction. Arguments get adjusted, phi nodes just stay.
  */
 void be_ssa_destruction(be_chordal_env_t *chordal_env);
 void be_ssa_destruction_check(be_chordal_env_t *chordal_env);
+
+#endif /* FIRM_BE_BESSADESTR_H */
index afe2145..ac0c6a9 100644 (file)
  */
 
 /**
- * Author:      Daniel Grund
- * Date:               17.01.2006
- * Copyright:   (c) Universitaet Karlsruhe
- * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
- *
+ * @file
+ * @brief       Simple SSA destruction.
+ * @author      Daniel Grund
+ * @date        17.01.2006
+ * @version     $Id$
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index afc6d04..1f54708 100644 (file)
  * PURPOSE.
  */
 
+/**
+ * @file
+ * @brief       Simple SSA destruction.
+ * @author      Daniel Grund
+ * @date        17.01.2006
+ * @version     $Id$
+ */
+#ifndef FIRM_BE_BESSADESTRSIMPLE_H
+#define FIRM_BE_BESSADESTRSIMPLE_H
+
+#include "set.h"
 #include "pset.h"
+#include "irgraph.h"
+#include "irnode.h"
+
+#include "bearch.h"
 
 /**
  * Insert copys to destruct SSA form and
@@ -43,7 +58,7 @@ typedef struct _be_var_info_t {
  * The link field of an irn points to the var_info struct
  * representing the corresponding variable.
  */
-#define be_get_var_info(irn)                           ((be_var_info_t *)get_irn_link(irn))
+#define be_get_var_info(irn) ((be_var_info_t *)get_irn_link(irn))
 
 #define SET_REMOVED -1
 
@@ -51,3 +66,5 @@ pset *be_get_var_values(set *vals, int var_nr);
 be_var_info_t *be_var_add_value(set *vars, int var_nr, ir_node *irn);
 be_var_info_t *be_var_find_or_insert(set *vars, int var_nr);
 be_var_info_t *be_var_find(set *vars, int var_nr);
+
+#endif /* FIRM_BE_BESSADESTRSIMPLE_H */
index 3ec9ceb..1e67fad 100644 (file)
  */
 
 /**
- * This file calls the corresponding statistic functions for
- * some backend statistics.
- * @author Christian Wuerdig
- * $Id$
+ * @file
+ * @brief       Provides several statistic functions for the backend.
+ * @author      Christian Wuerdig
+ * @version     $Id$
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -38,6 +38,7 @@
 #include "irtools.h"
 #include "pset.h"
 
+#include "bearch_t.h"
 #include "bestat.h"
 #include "belive_t.h"
 #include "besched.h"
index e972a0b..a329a85 100644 (file)
  * @author      Christian Wuerdig
  * @version     $Id$
  */
-#ifndef FIRM_BE_BESTAT_H_
-#define FIRM_BE_BESTAT_H_
+#ifndef FIRM_BE_BESTAT_H
+#define FIRM_BE_BESTAT_H
 
 #include "firm_config.h"
 
 #include "irnode.h"
 #include "irgraph.h"
 #include "irnodeset.h"
+#include "execfreq.h"
 
 #include "beirg.h"
 #include "bestatevent.h"
@@ -103,7 +104,7 @@ void be_stat_init_irg(const arch_env_t *arch_env, ir_graph *irg);
 void be_init_stat_file(const char *filename, const char *sourcefilename);
 void be_close_stat_file(void);
 
-#else
+#else /* ! FIRM_STATISTICS */
 
 #define be_stat_init_irg(arch_env, irg)
 #define be_do_stat_nodes(irg, phase)
@@ -120,4 +121,4 @@ void be_close_stat_file(void);
  */
 double be_estimate_irg_costs(ir_graph *irg, const arch_env_t *arch_env, ir_exec_freq *execfreqs);
 
-#endif /* FIRM_BE_BESTAT_H_ */
+#endif /* FIRM_BE_BESTAT_H */
index 57eb30e..f883f87 100644 (file)
@@ -24,8 +24,6 @@
  * @author      Matthias Braun
  * @date        26.03.2007
  * @version     $Id$
- * Copyright:   (c) Universitaet Karlsruhe
- * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -43,7 +41,7 @@
 #include "irgmod.h"
 
 #include "bearch_t.h"
-#include "beuses_t.h"
+#include "beuses.h"
 #include "besched_t.h"
 #include "belive_t.h"
 #include "bemodule.h"
index 7e0029c..4faf5bf 100644 (file)
@@ -24,8 +24,6 @@
  * @author      Matthias Braun
  * @date        26.03.2007
  * @version     $Id$
- * Copyright:   (c) Universitaet Karlsruhe
- * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
  */
 #ifndef FIRM_BE_BESTATE_H
 #define FIRM_BE_BESTATE_H
  * Callback that should create a spill for a certain value. Can return NULL
  * if @p force == 0 and the value can be easily rematerialized
  */
-typedef ir_node* (*create_spill_func) (void *env, ir_node *value, int force,
-                                       ir_node *after);
+typedef ir_node *(*create_spill_func) (void *env, ir_node *value, int force, ir_node *after);
 
 /**
  * Callback that should create a reload for a certain value
  */
-typedef ir_node(*create_reload_func) (void *env, ir_node *value,
+typedef ir_node *(*create_reload_func) (void *env, ir_node *value,
                                         ir_node *spill, ir_node *before,
                                         ir_node *last_value);
 
@@ -59,4 +56,4 @@ void be_assure_state(be_irg_t *birg, const arch_register_t *reg, void *func_env,
                      create_spill_func spill_func,
                      create_reload_func reload_func);
 
-#endif
+#endif /* FIRM_BE_BESTATE_H */
index e79d041..9b74757 100644 (file)
  */
 
 /**
- * Statistic events
- * @date    3.9.2006
- * @author  Sebastian Hack
- * @version $Id$
+ * @file
+ * @brief       Statistic events.
+ * @author      Sebastian Hack
+ * @date        03.09.2006
+ * @version     $Id$
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -29,6 +30,7 @@
 
 #include <assert.h>
 #include <string.h>
+#include <stdio.h>
 
 #include "bestatevent.h"
 
index a172d04..4a62563 100644 (file)
  */
 
 /**
- * Statistic events
- * @date 3.9.2006
- * @author Sebastian Hack
+ * @file
+ * @brief       Statistic events.
+ * @author      Sebastian Hack
+ * @date        03.09.2006
+ * @version     $Id$
  */
-
-#ifndef _BESTATEVENT_H
-#define _BESTATEVENT_H
+#ifndef FIRM_BE_BESTATEVENT_H
+#define FIRM_BE_BESTATEVENT_H
 
 #include <stdio.h>
 
@@ -40,4 +41,4 @@ void be_stat_ev_ull(const char *ev, ulong64 value);
 
 int be_stat_ev_is_active(void);
 
-#endif /* _BESTATEVENT_H */
+#endif /* FIRM_BE_BESTATEVENT_H */
index e2acf1e..f4d802c 100644 (file)
  */
 
 /**
- * @file   beuse.c
- * @date   27.06.2005
- * @author Sebastian Hack, Matthias Braun
- *
- * Methods to compute when a value will be used again.
- *
- * Copyright (C) 2005 Universitaet Karlsruhe
- * Released under the GPL
+ * @file
+ * @brief       Methods to compute when a value will be used again.
+ * @author      Sebastian Hack, Matthias Braun
+ * @date        27.06.2005
+ * @version     $Id$
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -53,7 +50,7 @@
 #include "besched_t.h"
 #include "beirgmod.h"
 #include "bearch_t.h"
-#include "beuses_t.h"
+#include "beuses.h"
 #include "benodesets.h"
 
 #define SCAN_INTERBLOCK_USES
index 9fb4543..dac174f 100644 (file)
  */
 
 /**
- * @file   beuse.h
- * @date   27.06.2005
- * @author Sebastian Hack, Matthias Braun
- *
- * Determine future usages of values.
- *
- * Copyright (C) 2005 Universitaet Karlsruhe
- * Released under the GPL
+ * @file
+ * @brief       Methods to compute when a value will be used again.
+ * @author      Sebastian Hack, Matthias Braun
+ * @date        27.06.2005
+ * @version     $Id$
  */
-#ifndef _BEUSES_H
-#define _BEUSES_H
+#ifndef FIRM_BE_BEUSES_H
+#define FIRM_BE_BEUSES_H
+
+#include "irgraph.h"
+#include "irnode.h"
 
-#include "bearch_t.h"
 #include "belive.h"
 
 typedef struct _be_next_use_t {
        unsigned time;
-       int outermost_loop;
+       int      outermost_loop;
 } be_next_use_t;
 
-#define USES_INFINITY                 10000000
-#define USES_PENDING                   9999999
+#define USES_INFINITY  10000000
+#define USES_PENDING   9999999
 
 static INLINE int USES_IS_INFINITE(unsigned time)
 {
@@ -61,4 +60,4 @@ be_uses_t *be_begin_uses(ir_graph *irg, const be_lv_t *lv);
 
 void be_end_uses(be_uses_t *uses);
 
-#endif /* _BEUSES_H */
+#endif /* FIRM_BE_BEUSES_H */
index 1dd5d08..ef9ce6d 100644 (file)
  */
 
 /**
- * Contains some useful function for the backend.
- * @author  Sebastian Hack
- * @version $Id$
+ * @file
+ * @brief       Contains some useful function for the backend.
+ * @author      Sebastian Hack
+ * @version     $Id$
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index 7c559e8..a0248f4 100644 (file)
  * PURPOSE.
  */
 
-
-#ifndef _BEUTIL_H
-#define _BEUTIL_H
+/**
+ * @file
+ * @brief       Contains some useful function for the backend.
+ * @author      Sebastian Hack
+ * @version     $Id$
+ */
+#ifndef FIRM_BE_BEUTIL_H
+#define FIRM_BE_BEUTIL_H
 
 #include "firm_config.h"
 
 #include <stdio.h>
 
 #include "pset.h"
+#include "irgraph.h"
 #include "irnode.h"
+#include "irmode.h"
+
 #include "bearch_t.h"
 
 /* iterate over a list of ir_nodes linked by link field */
@@ -71,13 +79,13 @@ static INLINE int is_data_node(const ir_node *irn)
        int i, n;
 
        /* If the node produces a data value, return immediately. */
-       if(is_firm_be_mode(get_irn_mode(irn)))
+       if (is_firm_be_mode(get_irn_mode(irn)))
                return 1;
 
        /* else check, if it takes a data value, if that is so, return */
        for(i = 0, n = get_irn_arity(irn); i < n; ++i) {
                ir_node *op = get_irn_n(irn, i);
-               if(is_firm_be_mode(get_irn_mode(op)))
+               if (is_firm_be_mode(get_irn_mode(op)))
                        return 1;
        }
 
@@ -155,4 +163,4 @@ ir_node *dom_up_search(pset *accept, ir_node *start_point_exclusive);
  */
 ir_node *be_get_Proj_for_pn(const ir_node *irn, long pn);
 
-#endif /* _BEUTIL_H */
+#endif /* FIRM_BE_BEUTIL_H */
index f0accc4..d082bc2 100644 (file)
  * PURPOSE.
  */
 
-/*
- * Author:    Matthias Braun
- * Date:      05.05.2006
- * Copyright: (c) Universitaet Karlsruhe
- * License:   This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
- * CVS-Id:    $Id$
+/**
+ * @file
+ * @brief       Various verify routines that check a scheduled graph for correctness.
+ * @author      Matthias Braun
+ * @date        05.05.2006
+ * @version     $Id$
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
index ae97061..b243e50 100644 (file)
  */
 
 /**
- * Author:    Matthias Braun
- * Date:      05.05.2006
- * Copyright: (c) Universitaet Karlsruhe
- * License:   This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
- * CVS-Id:    $Id$
+ * @file
+ * @brief       Various verify routines that check a scheduled graph for correctness.
+ * @author      Matthias Braun
+ * @date        05.05.2006
+ * @version     $Id$
  */
-
-/**
- * @file beverify.h
- *
- * Various verify routines that check a scheduled graph for correctness
- *
- * @author Matthias Braun
- */
-#ifndef BEVERIFY_H_
-#define BEVERIFY_H_
+#ifndef FIRM_BE_BEVERIFY_H
+#define FIRM_BE_BEVERIFY_H
 
 #include "irgraph.h"
 
@@ -85,4 +77,4 @@ int be_verify_register_allocation(const arch_env_t *arch_env, ir_graph *irg);
  */
 int be_verify_out_edges(ir_graph *irg);
 
-#endif /* BEVERIFY_H_ */
+#endif /* FIRM_BE_BEVERIFY_H */