bechordal: Remove the write-only attribute pressure from struct border_t.
authorChristoph Mallon <christoph.mallon@gmx.de>
Sat, 15 Dec 2012 19:07:34 +0000 (20:07 +0100)
committerChristoph Mallon <christoph.mallon@gmx.de>
Sat, 15 Dec 2012 21:05:21 +0000 (22:05 +0100)
ir/be/bechordal_common.c
ir/be/bechordal_t.h

index 692154c..10a9a44 100644 (file)
@@ -36,9 +36,7 @@ DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;)
 /* Make a fourcc for border checking. */
 #define BORDER_FOURCC   FOURCC('B', 'O', 'R', 'D')
 
-static inline border_t *border_add(be_chordal_env_t *env, struct list_head *head,
-                       ir_node *irn, unsigned step, unsigned pressure,
-                       unsigned is_def, unsigned is_real)
+static inline border_t *border_add(be_chordal_env_t *const env, struct list_head *const head, ir_node *const irn, unsigned const step, unsigned const is_def, unsigned const is_real)
 {
        border_t *b;
 
@@ -72,7 +70,6 @@ static inline border_t *border_add(be_chordal_env_t *env, struct list_head *head
                DEBUG_ONLY(assert(b && b->magic == BORDER_FOURCC && "Illegal border encountered");)
        }
 
-       b->pressure = pressure;
        b->is_def = is_def;
        b->is_real = is_real;
        b->irn = irn;
@@ -88,16 +85,15 @@ void create_borders(ir_node *block, void *env_ptr)
 {
 /* Convenience macro for a def */
 #define border_def(irn, step, real) \
-       border_add(env, head, irn, step, pressure--, 1, real)
+       border_add(env, head, irn, step, 1, real)
 
 /* Convenience macro for a use */
 #define border_use(irn, step, real) \
-       border_add(env, head, irn, step, ++pressure, 0, real)
+       border_add(env, head, irn, step, 0, real)
 
        be_chordal_env_t *const env = (be_chordal_env_t*)env_ptr;
 
        unsigned step = 0;
-       unsigned pressure = 0;
        struct list_head *head;
 
        /* Set up the border list in the block info */
@@ -130,7 +126,7 @@ void create_borders(ir_node *block, void *env_ptr)
                if (is_Phi(irn))
                        break;
 
-               DB((dbg, LEVEL_1, "\tinsn: %+F, pressure: %d\n", irn, pressure));
+               DB((dbg, LEVEL_1, "\tinsn: %+F\n", irn));
 
                be_foreach_definition(irn, env->cls, def, req,
                        /*
index 38159e4..5117657 100644 (file)
@@ -31,7 +31,6 @@ struct border_t {
        border_t         *other_end;    /**< The other end of the border. */
        ir_node          *irn;          /**< The node. */
        unsigned         step;          /**< The number equal to the interval border. */
-       unsigned         pressure;      /**< The pressure at this interval border. (The border itself is counting). */
        unsigned         is_def  : 1;   /**< Does this border denote a use or a def. */
        unsigned         is_real : 1;   /**< Is the def/use real? Or is it just
                                             inserted at block beginnings or ends