On 6/13/07, Revital1 Eres <[EMAIL PROTECTED]> wrote:
Hello, I have two ssa vars (i0 and i1 in the following example); what is the sequence to generate a new phi node corresponding to i3 - if (...) i0 = exp1 else i1 = exp2 i3 = PHI(i0 , i1);
From tree-vectorizer.c,
/* 1.1. Generate new phi node in NEW_MERGE_BB: */ new_phi = create_phi_node (SSA_NAME_VAR (PHI_RESULT (orig_phi)), new_merge_bb); /* 1.2. NEW_MERGE_BB has two incoming edges: GUARD_EDGE and the exit-edge of LOOP. Set the two phi args in NEW_PHI for these edges: */ loop_arg = PHI_ARG_DEF_FROM_EDGE (orig_phi, EDGE_SUCC (loop->latch, 0)); guard_arg = PHI_ARG_DEF_FROM_EDGE (orig_phi, loop_preheader_edge (loop)); add_phi_arg (new_phi, loop_arg, new_exit_e); add_phi_arg (new_phi, guard_arg, guard_edge);