Home | History | Annotate | Download | only in rtl-ssa

Lines Matching refs:phi

72   // Start off with an empty set of phi nodes for each block.
276 for (const phi_info *phi : phis)
283 pp_access (pp, phi, PP_ACCESS_SETTER);
290 pp_string (pp, "no phi nodes");
295 pp_string (pp, "no phi insn");
359 if (auto *phi = safe_dyn_cast<phi_info *> (set))
360 if (phi->is_degenerate ())
362 set = phi->input_value (0);
364 // Remove the phi if it turned out to be useless. This is
367 if (bb == bb->ebb ()->last_bb () && all_uses_are_live_out_uses (phi))
368 replace_phi (phi, set);
374 // Add PHI to EBB and enter it into the function's hash table.
376 function_info::append_phi (ebb_info *ebb, phi_info *phi)
380 first_phi->set_prev_phi (phi);
381 phi->set_next_phi (first_phi);
382 ebb->set_first_phi (phi);
383 add_def (phi);
386 // Remove PHI from its current position in the SSA graph.
388 function_info::remove_phi (phi_info *phi)
390 phi_info *next = phi->next_phi ();
391 phi_info *prev = phi->prev_phi ();
399 phi->ebb ()->set_first_phi (next);
401 remove_def (phi);
402 phi->clear_phi_links ();
405 // Remove PHI from the SSA graph and free its memory.
407 function_info::delete_phi (phi_info *phi)
409 gcc_assert (!phi->has_any_uses ());
411 // Remove the inputs to the phi.
412 for (use_info *input : phi->inputs ())
415 remove_phi (phi);
417 phi->set_next_phi (m_free_phis);
418 m_free_phis = phi;
421 // If possible, remove PHI and replace all uses with NEW_VALUE.
423 function_info::replace_phi (phi_info *phi, set_info *new_value)
433 for (use_info *use : phi->nondebug_insn_uses ())
436 // We need to keep the phi around for its local uses.
437 // Turn it into a degenerate phi, if it isn't already.
438 use_info *use = phi->input_use (0);
442 if (phi->is_degenerate ())
445 phi->make_degenerate (use);
447 // Redirect all phi users to NEW_VALUE.
448 while (use_info *phi_use = phi->last_phi_use ())
456 // in the phi's EBB.
457 while (use_info *use = phi->last_use ())
463 delete_phi (phi);
466 // Create and return a phi node for EBB. RESOURCE is the resource that
467 // the phi node sets (and thus that all the inputs set too). NUM_INPUTS
468 // is the number of inputs, which is 1 for a degenerate phi. INPUTS[I]
473 // Add the created phi node to its basic block and enter it into the
479 phi_info *phi = m_free_phis;
480 if (phi)
482 m_free_phis = phi->next_phi ();
483 *phi = phi_info (ebb->phi_insn (), resource, phi->uid ());
487 phi = allocate<phi_info> (ebb->phi_insn (), resource, m_next_phi_uid);
492 // out what mode the phi should have.
497 auto *use = allocate<use_info> (phi, resource, input);
504 phi->set_inputs (use_array (inputs, num_inputs));
505 phi->set_mode (new_mode);
507 append_phi (ebb, phi);
509 return phi;
512 // Create and return a degenerate phi for EBB whose input comes from DEF.
529 phi_info *phi = create_phi (ebb, def->resource (), &input, 1);
550 if (def_info *next_def = phi->next_def ())
561 return phi;
608 // Called while building SSA form using BI. Decide where phi nodes
623 // greater than the number of phi nodes needed in a block (see PR98863).
625 // PENDING as a staging area: registers in PENDING need phi nodes if
627 // phi nodes otherwise.
634 // queue a possible phi node for R in B2.
653 // Propagate the (potential) new phi node definitions in B2.
662 // Restrict the phi nodes to registers that are live on entry to
669 // If block B1 has a phi node for R and if B2 is in the dominance
670 // frontier of B1, queue a possible phi node for R in B2.
682 // Calculate the set of phi nodes for blocks that don't have any
689 // Create an array that contains all phi inputs for this block.
767 // Called while building SSA form using BI. Create phi nodes for the
784 // Create an array of phi inputs, to be filled in later.
788 // Later code works out the correct mode of the phi. Use BLKmode
790 phi_info *phi = create_phi (ebb, { E_BLKmode, regno },
792 bi.record_reg_def (phi);
821 // Create a phi for memory, on the assumption that something in the
913 // to add a use of the phi node because memory is implicitly always live.
938 // in the phi inputs of successor blocks and create live-out uses where
947 // Record the live-out register values in the phi inputs of
1020 // If the block starts an EBB, create the phi insn. This insn should exist
1043 // If the block starts an EBB, create the phi nodes.
1085 // Finish setting up the phi nodes for each block, now that we've added
1096 // Get a sorted array of EBB's phi nodes.
1100 for (phi_info *phi : ebb->phis ())
1101 sorted_phis.safe_push (phi);
1117 phi_info *phi = sorted_phis[phi_i];
1118 gcc_assert (phi->regno () == regno);
1122 use_info *use = phi->input_use (input_i);
1131 // Fill in the backedge inputs to any memory phi.
1180 // that uses of arguments consistently occur through phi nodes, rather