From 831e040d95f74da41bd6f0c1946ed0b2f2cf5423 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Mon, 17 Dec 2012 08:38:05 +0100 Subject: [PATCH] becopyopt: Replace is_Reg_Phi() by just is_Phi(). It makes no sense to check the mode of the Phi. --- ir/be/becopyopt.c | 6 +++--- ir/be/becopyopt_t.h | 2 -- ir/be/bepbqpcoloring.c | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/ir/be/becopyopt.c b/ir/be/becopyopt.c index e080dcf91..51d068408 100644 --- a/ir/be/becopyopt.c +++ b/ir/be/becopyopt.c @@ -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); posget_costs(irn, pos)); diff --git a/ir/be/becopyopt_t.h b/ir/be/becopyopt_t.h index 22df6918d..d7f0c7753 100644 --- a/ir/be/becopyopt_t.h +++ b/ir/be/becopyopt_t.h @@ -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))) diff --git a/ir/be/bepbqpcoloring.c b/ir/be/bepbqpcoloring.c index 6e0ea25dc..f22d15a75 100644 --- a/ir/be/bepbqpcoloring.c +++ b/ir/be/bepbqpcoloring.c @@ -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); -- 2.20.1