Implement binary emitter for Cmp8Bit.
[libfirm] / ir / be / bechordal.c
index 36d472c..37a3837 100644 (file)
 
 #include "beutil.h"
 #include "besched.h"
-#include "besched_t.h"
+#include "besched.h"
 #include "belive_t.h"
-#include "benode_t.h"
-#include "bearch_t.h"
+#include "benode.h"
+#include "bearch.h"
 #include "beirgmod.h"
 #include "beifg.h"
 #include "beinsn_t.h"
 #include "bestatevent.h"
-#include "beirg_t.h"
+#include "beirg.h"
 #include "beintlive_t.h"
 #include "bera.h"
 #include "bechordal_t.h"
@@ -127,11 +127,10 @@ static inline border_t *border_add(be_chordal_env_t *env, struct list_head *head
        if (!is_def) {
                border_t *def;
 
-               b = obstack_alloc(env->obst, sizeof(*b));
+               b = OALLOC(env->obst, border_t);
 
                /* also allocate the def and tie it to the use. */
-               def = obstack_alloc(env->obst, sizeof(*def));
-               memset(def, 0, sizeof(*def));
+               def = OALLOCZ(env->obst, border_t);
                b->other_end = def;
                def->other_end = b;
 
@@ -334,7 +333,7 @@ static ir_node *pre_process_constraints(be_chordal_alloc_env_t *alloc_env,
                 * since ignore-nodes are not Perm'ed.
                 */
                if (op->has_constraints &&  is_Proj(proj) && get_Proj_pred(proj) == perm) {
-                       be_set_constr_limited(perm, BE_OUT_POS(get_Proj_proj(proj)), op->req);
+                       be_set_constr_out(perm, get_Proj_proj(proj), op->req);
                }
        }
 
@@ -630,7 +629,7 @@ static void pressure(ir_node *block, void *env_ptr)
        bitset_clear_all(live);
 
        /* Set up the border list in the block info */
-       head = obstack_alloc(env->obst, sizeof(*head));
+       head = OALLOC(env->obst, struct list_head);
        INIT_LIST_HEAD(head);
        assert(pmap_get(env->border_heads, block) == NULL);
        pmap_insert(env->border_heads, block, head);
@@ -674,17 +673,17 @@ static void pressure(ir_node *block, void *env_ptr)
                                        border_def(proj, step, 1);
                                }
                        }
-               }
-
-               /*
-                * If the node defines some value, which can put into a
-                * register of the current class, make a border for it.
-                */
-               if (has_reg_class(env, irn)) {
-                       int nr = get_irn_idx(irn);
-
-                       bitset_clear(live, nr);
-                       border_def(irn, step, 1);
+               } else {
+                       /*
+                        * If the node defines some value, which can put into a
+                        * register of the current class, make a border for it.
+                        */
+                       if (has_reg_class(env, irn)) {
+                               int nr = get_irn_idx(irn);
+
+                               bitset_clear(live, nr);
+                               border_def(irn, step, 1);
+                       }
                }
 
                /*