becopyopt: Replace is_Reg_Phi() by just is_Phi().
authorChristoph Mallon <christoph.mallon@gmx.de>
Mon, 17 Dec 2012 07:38:05 +0000 (08:38 +0100)
committerChristoph Mallon <christoph.mallon@gmx.de>
Mon, 17 Dec 2012 07:38:05 +0000 (08:38 +0100)
It makes no sense to check the mode of the Phi.

ir/be/becopyopt.c
ir/be/becopyopt_t.h
ir/be/bepbqpcoloring.c

index e080dcf..51d0684 100644 (file)
@@ -207,7 +207,7 @@ static int co_is_optimizable_root(ir_node *irn)
        if (arch_register_req_is(req, ignore))
                return 0;
 
-       if (is_Reg_Phi(irn) || is_Perm_Proj(irn))
+       if (is_Phi(irn) || is_Perm_Proj(irn))
                return 1;
 
        if (arch_register_req_is(req, should_be_same))
@@ -389,7 +389,7 @@ static void co_collect_units(ir_node *irn, void *env)
 
        be_lv_t *const lv = be_get_irg_liveness(co->irg);
        /* Phi with some/all of its arguments */
-       if (is_Reg_Phi(irn)) {
+       if (is_Phi(irn)) {
                int i, arity;
 
                /* init */
@@ -771,7 +771,7 @@ static void build_graph_walker(ir_node *irn, void *env)
        if (req->cls != co->cls || arch_register_req_is(req, ignore))
                return;
 
-       if (is_Reg_Phi(irn)) { /* Phis */
+       if (is_Phi(irn)) { /* Phis */
                for (pos=0, max=get_irn_arity(irn); pos<max; ++pos) {
                        ir_node *arg = get_irn_n(irn, pos);
                        add_edges(co, irn, arg, co->get_costs(irn, pos));
index 22df691..d7f0c77 100644 (file)
@@ -56,8 +56,6 @@ static inline void set_irn_col(const arch_register_class_t *cls, ir_node *node,
 
 #define list_entry_units(lh) list_entry(lh, unit_t, units)
 
-#define is_Reg_Phi(irn)        (is_Phi(irn) && mode_is_data(get_irn_mode(irn)))
-
 #define get_Perm_src(irn) (get_irn_n(get_Proj_pred(irn), get_Proj_proj(irn)))
 #define is_Perm_Proj(irn) (is_Proj(irn) && be_is_Perm(get_Proj_pred(irn)))
 
index 6e0ea25..f22d15a 100644 (file)
@@ -243,7 +243,7 @@ static void create_affinity_edges(ir_node *irn, void *env)
        unsigned                     pos;
        unsigned                     max;
 
-       if (is_Reg_Phi(irn)) { /* Phis */
+       if (is_Phi(irn)) { /* Phis */
                for (pos = 0, max = get_irn_arity(irn); pos < max; ++pos) {
                        ir_node *arg = get_irn_n(irn, pos);