Lines Matching refs:phi
69 HPhi* phi = it.Current()->AsPhi(); in EquivalentPhisCleanup() local
70 HPhi* next = phi->GetNextEquivalentPhiWithSameType(); in EquivalentPhisCleanup()
75 phi->ReplaceWith(next); in EquivalentPhisCleanup()
76 phi->SetDead(); in EquivalentPhisCleanup()
78 next->ReplaceWith(phi); in EquivalentPhisCleanup()
81 << "More then one phi equivalent with type " << phi->GetType() in EquivalentPhisCleanup()
82 << " found for phi" << phi->GetId(); in EquivalentPhisCleanup()
91 HPhi* phi = it_phis.Current()->AsPhi(); in FixEnvironmentPhis() local
93 if (!phi->IsDead() || !phi->HasEnvironmentUses()) continue; in FixEnvironmentPhis()
94 HInstruction* next = phi->GetNext(); in FixEnvironmentPhis()
95 if (!phi->IsVRegEquivalentOf(next)) continue; in FixEnvironmentPhis()
99 if (!phi->IsVRegEquivalentOf(next)) continue; in FixEnvironmentPhis()
101 DCHECK(!phi->IsVRegEquivalentOf(next->GetNext())); in FixEnvironmentPhis()
105 phi->ReplaceWith(next); in FixEnvironmentPhis()
129 static bool TypePhiFromInputs(HPhi* phi) { in TypePhiFromInputs() argument
130 DataType::Type common_type = phi->GetType(); in TypePhiFromInputs()
132 for (HInstruction* input : phi->GetInputs()) { in TypePhiFromInputs()
168 phi->SetType(common_type); in TypePhiFromInputs()
173 bool SsaBuilder::TypeInputsOfPhi(HPhi* phi, ScopedArenaVector<HPhi*>* worklist) { in TypeInputsOfPhi() argument
174 DataType::Type common_type = phi->GetType(); in TypeInputsOfPhi()
179 for (HInstruction* input : phi->GetInputs()) { in TypeInputsOfPhi()
188 HInputsRef inputs = phi->GetInputs(); in TypeInputsOfPhi()
205 phi->ReplaceInput(equivalent, i); in TypeInputsOfPhi()
219 bool SsaBuilder::UpdatePrimitiveType(HPhi* phi, ScopedArenaVector<HPhi*>* worklist) { in UpdatePrimitiveType() argument
220 DCHECK(phi->IsLive()); in UpdatePrimitiveType()
221 DataType::Type original_type = phi->GetType(); in UpdatePrimitiveType()
228 if (!TypePhiFromInputs(phi) || !TypeInputsOfPhi(phi, worklist)) { in UpdatePrimitiveType()
230 phi->SetDead(); in UpdatePrimitiveType()
235 return phi->GetType() != original_type; in UpdatePrimitiveType()
244 HPhi* phi = phi_it.Current()->AsPhi(); in RunPrimitiveTypePropagation() local
245 if (phi->IsLive()) { in RunPrimitiveTypePropagation()
246 worklist.push_back(phi); in RunPrimitiveTypePropagation()
256 HPhi* phi = phi_it.Current()->AsPhi(); in RunPrimitiveTypePropagation() local
257 if (phi->IsLive()) { in RunPrimitiveTypePropagation()
258 UpdatePrimitiveType(phi, &worklist); in RunPrimitiveTypePropagation()
271 HPhi* phi = worklist->back(); in ProcessPrimitiveTypePropagationWorklist() local
275 if (phi->IsLive() && UpdatePrimitiveType(phi, worklist)) { in ProcessPrimitiveTypePropagationWorklist()
276 AddDependentInstructionsToWorklist(phi, worklist); in ProcessPrimitiveTypePropagationWorklist()
652 HPhi* SsaBuilder::GetFloatDoubleOrReferenceEquivalentOfPhi(HPhi* phi, DataType::Type type) { in GetFloatDoubleOrReferenceEquivalentOfPhi() argument
653 DCHECK(phi->IsLive()) << "Cannot get equivalent of a dead phi since it would create a live one."; in GetFloatDoubleOrReferenceEquivalentOfPhi()
656 HInstruction* next = phi->GetNext(); in GetFloatDoubleOrReferenceEquivalentOfPhi()
658 && next->AsPhi()->GetRegNumber() == phi->GetRegNumber() in GetFloatDoubleOrReferenceEquivalentOfPhi()
665 || (next->AsPhi()->GetRegNumber() != phi->GetRegNumber()) in GetFloatDoubleOrReferenceEquivalentOfPhi()
668 HInputsRef inputs = phi->GetInputs(); in GetFloatDoubleOrReferenceEquivalentOfPhi()
669 HPhi* new_phi = new (allocator) HPhi(allocator, phi->GetRegNumber(), inputs.size(), type); in GetFloatDoubleOrReferenceEquivalentOfPhi()
676 phi->GetBlock()->InsertPhiAfter(new_phi, phi); in GetFloatDoubleOrReferenceEquivalentOfPhi()