Lines Matching refs:phi
5 * 1) For each phi-node, replace all their phisrc by copies to a common
7 * 2) Replace all the phi-nodes by copies of the temporaries to the phi-node target.
8 * This is node to preserve the semantic of the phi-node (they should all "execute"
13 * at the place where the phi-node operands are defined.
24 * But for this we need precise liveness, on each %phi and not only on OP_PHI's
37 static int simplify_phi_node(struct instruction *phi, pseudo_t tmp)
39 pseudo_t target = phi->target;
43 // verify if this phi can be simplified
44 FOR_EACH_PTR(phi->phi_list, src) {
49 if (def->bb == phi->bb)
59 phi->bb = NULL;
63 static void replace_phi_node(struct instruction *phi)
69 tmp->type = phi->target->type;
70 tmp->ident = phi->target->ident;
74 simplify_phi_node(phi, tmp);
77 FOR_EACH_PTR(phi->phi_list, p) {
106 if (!phi->bb)
109 // rewrite the phi node:
110 // phi %rt, ...
113 phi->opcode = OP_COPY;
114 use_pseudo(phi, tmp, &phi->src);
121 // Replace all the phi-nodes by copies of a temporary
122 // (which represent the set of all the %phi that feed them).