X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=inline;f=ir%2Fbe%2Fbenode.c;h=9881d7d020713b781774ff39447a798db950065e;hb=38efd2ac16aa827ae9f07acc9ebfc7d74422290e;hp=9475b29ce26b356ac910b6f08ee364ab4a026bc7;hpb=fdef2b39113f0615d0e715a884be2833f05b8ee5;p=libfirm diff --git a/ir/be/benode.c b/ir/be/benode.c index 9475b29ce..9881d7d02 100644 --- a/ir/be/benode.c +++ b/ir/be/benode.c @@ -1340,8 +1340,15 @@ static const arch_irn_ops_t be_node_irn_ops = { &be_node_irn_ops_if }; +/* * irn handler for common be nodes and Phi's. */ const void *be_node_get_irn_ops(const ir_node *irn) { + if (is_Phi(irn)) { + if (mode_is_datab(get_irn_mode(irn))) + return &curr_phi_handler->irn_ops; + return NULL; + } + if (is_Proj(irn)) { irn = get_Proj_pred(irn); if (is_Proj(irn)) { @@ -1367,18 +1374,8 @@ typedef struct { arch_irn_flags_t flags; } phi_attr_t; -#define get_phi_handler_from_handler(h) container_of(h, phi_handler_t, irn_handler) #define get_phi_handler_from_ops(h) container_of(h, phi_handler_t, irn_ops) -static -const void *phi_get_irn_ops(const ir_node *irn) -{ - if (!is_Phi(irn) || !mode_is_datab(get_irn_mode(irn))) - return NULL; - - return &curr_phi_handler->irn_ops; -} - static INLINE phi_attr_t *get_Phi_attr(const phi_handler_t *handler, const ir_node *phi) { @@ -1580,7 +1577,6 @@ const arch_irn_ops_if_t phi_irn_ops = { void be_phi_handler_new(be_main_env_t *env) { phi_handler_t *h = &env->phi_handler; - h->get_irn_ops = phi_get_irn_ops; h->irn_ops.impl = &phi_irn_ops; h->arch_env = &env->arch_env; h->phi_attrs = pmap_create();