Lines Matching defs:phi

36   // Add to the worklist phis referenced by non-phi instructions.
40 HPhi* phi = inst_it.Current()->AsPhi();
41 if (phi->IsDead()) {
45 bool keep_alive = (graph_->IsDebuggable() && phi->HasEnvironmentUses());
47 for (const HUseListNode<HInstruction*>& use : phi->GetUses()) {
56 worklist_.push_back(phi);
58 phi->SetDead();
60 initially_live.insert(phi);
66 // Process the worklist by propagating liveness to phi inputs.
68 HPhi* phi = worklist_.back();
70 for (HInputIterator it(phi); !it.Done(); it.Advance()) {
73 // Input is a dead phi. Revive it and add to the worklist. We make sure
74 // that the phi was not dead initially (see definition of `initially_live`).
91 HPhi* phi;
93 phi = current->AsPhi();
95 if (phi->IsDead()) {
96 // Make sure the phi is only used by other dead phis.
98 for (const HUseListNode<HInstruction*>& use : phi->GetUses()) {
104 // Remove the phi from use lists of its inputs.
105 for (size_t i = 0, e = phi->InputCount(); i < e; ++i) {
106 phi->RemoveAsUserOfInput(i);
108 // Remove the phi from environments that use it.
109 for (const HUseListNode<HEnvironment*>& use : phi->GetEnvUses()) {
114 block->RemovePhi(phi, /*ensure_safety=*/ false);
138 HPhi* phi = worklist_.back();
141 // If the phi has already been processed, continue.
142 if (!phi->IsInBlock()) {
146 // If the phi is dead, we know we won't revive it and it will be removed,
148 if (phi->IsDead()) {
156 cycle_worklist.push_back(phi);
157 visited_phis_in_cycle.SetBit(phi->GetId());
158 bool catch_phi_in_cycle = phi->IsCatchPhi();
159 bool irreducible_loop_phi_in_cycle = phi->IsIrreducibleLoopHeaderPhi();
162 for (size_t j = 0; j < phi->InputCount(); ++j) {
163 HInstruction* input = phi->InputAt(j);
164 if (input == phi) {
174 // If we haven't found a candidate, check for a phi cycle. Note that we need to detect
223 // The candidate may not dominate a phi in a catch block: there may be non-throwing
236 // Because we're updating the users of this phi, we may have new candidates
237 // for elimination. Add phis that use this phi to the worklist.