From d9ad2dc15113a8704d577d733c1a2f8076d215cd Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Wed, 17 Oct 2007 22:08:33 +0000 Subject: [PATCH] fixed _is_Phi() [r16261] --- ir/ir/irnode.c | 13 +------------ ir/ir/irnode_t.h | 8 +++++++- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/ir/ir/irnode.c b/ir/ir/irnode.c index a4ea785ce..7f90a40e0 100644 --- a/ir/ir/irnode.c +++ b/ir/ir/irnode.c @@ -1624,18 +1624,7 @@ set_binop_right(ir_node *node, ir_node *right) { int (is_Phi)(const ir_node *n) { - ir_op *op; - - assert(n); - op = get_irn_op(n); - - if (op == op_Filter) return get_interprocedural_view(); - - if (op == op_Phi) - return ((get_irg_phase_state(get_irn_irg(n)) != phase_building) || - (get_irn_arity(n) > 0)); - - return 0; + return _is_Phi(n); } int is_Phi0(const ir_node *n) { diff --git a/ir/ir/irnode_t.h b/ir/ir/irnode_t.h index df9440fb3..34da5e2ef 100644 --- a/ir/ir/irnode_t.h +++ b/ir/ir/irnode_t.h @@ -406,8 +406,14 @@ _is_binop(const ir_node *node) { static INLINE int _is_Phi(const ir_node *node) { + ir_op *op; assert(node); - return (_get_irn_op(node) == op_Phi); + + op = get_irn_op(node); +#ifdef INTERPROCEDURAL_VIEW + if (op == op_Filter) return get_interprocedural_view(); +#endif + return (op == op_Phi); } static INLINE int -- 2.20.1