cleanup: Remove has_reg_class().
authorChristoph Mallon <christoph.mallon@gmx.de>
Sat, 24 Nov 2012 20:40:32 +0000 (21:40 +0100)
committerChristoph Mallon <christoph.mallon@gmx.de>
Sat, 24 Nov 2012 21:09:25 +0000 (22:09 +0100)
ir/be/bechordal.c
ir/be/bechordal_common.c
ir/be/bechordal_t.h
ir/be/bessadestr.c

index 98eda80..d2b414c 100644 (file)
@@ -400,7 +400,7 @@ static void assign(ir_node *block, void *env_ptr)
         * allocated before), we have to mark their colors as used also.
         */
        be_lv_foreach(lv, block, be_lv_state_in, irn) {
-               if (has_reg_class(env, irn)) {
+               if (arch_irn_consider_in_reg_alloc(env->cls, irn)) {
                        const arch_register_t *reg = arch_get_irn_register(irn);
 
                        assert(reg && "Node must have been assigned a register");
index 9fd00bd..d6d9fe8 100644 (file)
@@ -128,7 +128,7 @@ void create_borders(ir_node *block, void *env_ptr)
         * They are necessary to build up real intervals.
         */
        be_lv_foreach(lv, block, be_lv_state_end, irn) {
-               if (has_reg_class(env, irn)) {
+               if (arch_irn_consider_in_reg_alloc(env->cls, irn)) {
                        DBG((dbg, LEVEL_3, "\tMaking live: %+F/%d\n", irn, get_irn_idx(irn)));
                        bitset_set(live, get_irn_idx(irn));
                        border_use(irn, step, 0);
@@ -152,7 +152,7 @@ void create_borders(ir_node *block, void *env_ptr)
                                 * 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, proj)) {
+                               if (arch_irn_consider_in_reg_alloc(env->cls, proj)) {
                                        int nr = get_irn_idx(proj);
 
                                        bitset_clear(live, nr);
@@ -164,7 +164,7 @@ void create_borders(ir_node *block, void *env_ptr)
                         * 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)) {
+                       if (arch_irn_consider_in_reg_alloc(env->cls, irn)) {
                                int nr = get_irn_idx(irn);
 
                                bitset_clear(live, nr);
@@ -179,7 +179,7 @@ void create_borders(ir_node *block, void *env_ptr)
                        for (int i = 0, n = get_irn_arity(irn); i < n; ++i) {
                                ir_node *op = get_irn_n(irn, i);
 
-                               if (has_reg_class(env, op)) {
+                               if (arch_irn_consider_in_reg_alloc(env->cls, op)) {
                                        int nr = get_irn_idx(op);
                                        const char *msg = "-";
 
index 6ab04af..12e7499 100644 (file)
@@ -74,17 +74,6 @@ static inline struct list_head *get_block_border_head(be_chordal_env_t const *co
 
 #define foreach_border_head(head, pos)      list_for_each_entry_reverse(border_t, pos, head, list)
 
-/**
- * Check, if an irn is of the register class currently under processing.
- * @param env The chordal environment.
- * @param irn The node.
- * @return whether the node is of that register class.
- */
-static inline bool has_reg_class(be_chordal_env_t const *const env, ir_node const *const irn)
-{
-       return arch_irn_consider_in_reg_alloc(env->cls, irn);
-}
-
 enum {
        /* Dump flags */
        BE_CH_DUMP_NONE       = (1 << 0),
index 8af7c48..db2e2b0 100644 (file)
@@ -66,7 +66,7 @@ static void clear_link(ir_node *irn, void *data)
 static void collect_phis_walker(ir_node *irn, void *data)
 {
        be_chordal_env_t *env = (be_chordal_env_t*)data;
-       if (is_Phi(irn) && has_reg_class(env, irn)) {
+       if (is_Phi(irn) && arch_irn_consider_in_reg_alloc(env->cls, irn)) {
                ir_node *bl = get_nodes_block(irn);
                set_irn_link(irn, get_irn_link(bl));
                set_irn_link(bl, irn);