Lines Matching refs:phi

342 static bool HasReductionFormat(HInstruction* reduction, HInstruction* phi) {  in HasReductionFormat()  argument
344 return (reduction->InputAt(0) == phi && reduction->InputAt(1) != phi) || in HasReductionFormat()
345 (reduction->InputAt(0) != phi && reduction->InputAt(1) == phi); in HasReductionFormat()
347 return (reduction->InputAt(0) == phi && reduction->InputAt(1) != phi); in HasReductionFormat()
653 HPhi* phi = it.Current()->AsPhi(); in SimplifyInduction() local
654 if (TrySetPhiInduction(phi, /*restrict_uses*/ true) && in SimplifyInduction()
655 TryAssignLastValue(node->loop_info, phi, preheader, /*collect_loop_uses*/ false)) { in SimplifyInduction()
1186 HInstruction* phi = i->first; in Vectorize() local
1189 for (const HUseListNode<HInstruction*>& use : phi->GetUses()) { in Vectorize()
1190 induction_range_.Replace(use.GetUser(), phi, repl); // update induction use in Vectorize()
1192 phi->ReplaceWith(repl); in Vectorize()
1223 HPhi* phi = new (global_allocator_) HPhi(global_allocator_, in GenerateNewLoop() local
1230 HInstruction* cond = new (global_allocator_) HAboveOrEqual(phi, hi); in GenerateNewLoop()
1231 vector_header_->AddPhi(phi); in GenerateNewLoop()
1234 vector_index_ = phi; in GenerateNewLoop()
1267 phi->AddInput(lo); in GenerateNewLoop()
1268 phi->AddInput(vector_index_); in GenerateNewLoop()
1269 vector_index_ = phi; in GenerateNewLoop()
1768 void HLoopOptimization::GenerateVecReductionPhi(HPhi* phi) { in GenerateVecReductionPhi() argument
1769 DCHECK(reductions_->find(phi) != reductions_->end()); in GenerateVecReductionPhi()
1770 DCHECK(reductions_->Get(phi->InputAt(1)) == phi); in GenerateVecReductionPhi()
1774 global_allocator_, kNoRegNumber, 0, phi->GetType()); in GenerateVecReductionPhi()
1779 auto it = vector_permanent_map_->find(phi); in GenerateVecReductionPhi()
1789 vector_map_->Put(phi, vector); in GenerateVecReductionPhi()
1792 void HLoopOptimization::GenerateVecReductionPhiInputs(HPhi* phi, HInstruction* reduction) { in GenerateVecReductionPhiInputs() argument
1793 HInstruction* new_phi = vector_map_->Get(phi); in GenerateVecReductionPhiInputs()
1794 HInstruction* new_init = reductions_->Get(phi); in GenerateVecReductionPhiInputs()
1832 reductions_->find(phi)->second = new_phi; in GenerateVecReductionPhiInputs()
2248 bool HLoopOptimization::TrySetPhiInduction(HPhi* phi, bool restrict_uses) { in TrySetPhiInduction() argument
2255 if (graph_->IsDebuggable() && phi->HasEquivalentPhi()) { in TrySetPhiInduction()
2260 ArenaSet<HInstruction*>* set = induction_range_.LookupCycle(phi); in TrySetPhiInduction()
2270 } else if (i != phi && restrict_uses) { in TrySetPhiInduction()
2285 bool HLoopOptimization::TrySetPhiReduction(HPhi* phi) { in TrySetPhiReduction() argument
2288 if (induction_range_.IsClassified(phi)) { in TrySetPhiReduction()
2293 HInputsRef inputs = phi->GetInputs(); in TrySetPhiReduction()
2296 if (HasReductionFormat(reduction, phi)) { in TrySetPhiReduction()
2297 HLoopInformation* loop_info = phi->GetBlock()->GetLoopInformation(); in TrySetPhiReduction()
2304 IsOnlyUsedAfterLoop(loop_info, phi, /*collect_loop_uses*/ true, &use_count) && in TrySetPhiReduction()
2309 reductions_->Put(reduction, phi); in TrySetPhiReduction()
2310 reductions_->Put(phi, phi->InputAt(0)); in TrySetPhiReduction()
2327 HPhi* phi = nullptr; in TrySetSimpleLoopHeader() local
2331 } else if (phi == nullptr) { in TrySetSimpleLoopHeader()
2333 phi = it.Current()->AsPhi(); in TrySetSimpleLoopHeader()
2343 if (phi != nullptr && TrySetPhiInduction(phi, /*restrict_uses*/ false)) { in TrySetSimpleLoopHeader()
2355 *main_phi = phi; in TrySetSimpleLoopHeader()