Lines Matching refs:node

508   LoopNode* node = new (loop_allocator_) LoopNode(loop_info);  in AddLoop()  local
512 last_loop_ = top_loop_ = node; in AddLoop()
515 node->outer = last_loop_; in AddLoop()
517 last_loop_ = last_loop_->inner = node; in AddLoop()
523 node->outer = last_loop_->outer; in AddLoop()
524 node->previous = last_loop_; in AddLoop()
526 last_loop_ = last_loop_->next = node; in AddLoop()
530 void HLoopOptimization::RemoveLoop(LoopNode* node) { in RemoveLoop() argument
531 DCHECK(node != nullptr); in RemoveLoop()
532 DCHECK(node->inner == nullptr); in RemoveLoop()
533 if (node->previous != nullptr) { in RemoveLoop()
535 node->previous->next = node->next; in RemoveLoop()
536 if (node->next != nullptr) { in RemoveLoop()
537 node->next->previous = node->previous; in RemoveLoop()
541 if (node->outer != nullptr) { in RemoveLoop()
542 node->outer->inner = node->next; in RemoveLoop()
544 top_loop_ = node->next; in RemoveLoop()
546 if (node->next != nullptr) { in RemoveLoop()
547 node->next->outer = node->outer; in RemoveLoop()
548 node->next->previous = nullptr; in RemoveLoop()
553 bool HLoopOptimization::TraverseLoopsInnerToOuter(LoopNode* node) { in TraverseLoopsInnerToOuter() argument
555 for ( ; node != nullptr; node = node->next) { in TraverseLoopsInnerToOuter()
558 if (TraverseLoopsInnerToOuter(node->inner)) { in TraverseLoopsInnerToOuter()
559 induction_range_.ReVisit(node->loop_info); in TraverseLoopsInnerToOuter()
566 SimplifyInduction(node); in TraverseLoopsInnerToOuter()
567 SimplifyBlocks(node); in TraverseLoopsInnerToOuter()
571 if (node->inner == nullptr) { in TraverseLoopsInnerToOuter()
572 changed = OptimizeInnerLoop(node) || changed; in TraverseLoopsInnerToOuter()
582 void HLoopOptimization::SimplifyInduction(LoopNode* node) { in SimplifyInduction() argument
583 HBasicBlock* header = node->loop_info->GetHeader(); in SimplifyInduction()
584 HBasicBlock* preheader = node->loop_info->GetPreHeader(); in SimplifyInduction()
593 TryAssignLastValue(node->loop_info, phi, preheader, /*collect_loop_uses*/ false)) { in SimplifyInduction()
609 void HLoopOptimization::SimplifyBlocks(LoopNode* node) { in SimplifyBlocks() argument
611 for (HBlocksInLoopIterator it(*node->loop_info); !it.Done(); it.Advance()) { in SimplifyBlocks()
646 bool HLoopOptimization::OptimizeInnerLoop(LoopNode* node) { in OptimizeInnerLoop() argument
647 HBasicBlock* header = node->loop_info->GetHeader(); in OptimizeInnerLoop()
648 HBasicBlock* preheader = node->loop_info->GetPreHeader(); in OptimizeInnerLoop()
651 if (!induction_range_.IsFinite(node->loop_info, &trip_count)) { in OptimizeInnerLoop()
656 for (HBlocksInLoopIterator it(*node->loop_info); !it.Done(); it.Advance()) { in OptimizeInnerLoop()
684 TryAssignLastValue(node->loop_info, main_phi, preheader, /*collect_loop_uses*/ true)) { in OptimizeInnerLoop()
699 RemoveLoop(node); // update hierarchy in OptimizeInnerLoop()
706 ShouldVectorize(node, body, trip_count) && in OptimizeInnerLoop()
707 TryAssignLastValue(node->loop_info, main_phi, preheader, /*collect_loop_uses*/ true)) { in OptimizeInnerLoop()
708 Vectorize(node, body, exit, trip_count); in OptimizeInnerLoop()
722 bool HLoopOptimization::ShouldVectorize(LoopNode* node, HBasicBlock* block, int64_t trip_count) { in ShouldVectorize() argument
739 if (!VectorizeDef(node, it.Current(), /*generate_code*/ false)) { in ShouldVectorize()
838 void HLoopOptimization::Vectorize(LoopNode* node, in Vectorize() argument
842 HBasicBlock* header = node->loop_info->GetHeader(); in Vectorize()
843 HBasicBlock* preheader = node->loop_info->GetPreHeader(); in Vectorize()
904 HInstruction* stc = induction_range_.GenerateTripCount(node->loop_info, graph_, preheader); in Vectorize()
945 GenerateNewLoop(node, in Vectorize()
958 GenerateNewLoop(node, in Vectorize()
972 GenerateNewLoop(node, in Vectorize()
1005 node->loop_info = vloop; in Vectorize()
1008 void HLoopOptimization::GenerateNewLoop(LoopNode* node, in GenerateNewLoop() argument
1038 bool vectorized_def = VectorizeDef(node, it.Current(), /*generate_code*/ true); in GenerateNewLoop()
1070 bool HLoopOptimization::VectorizeDef(LoopNode* node, in VectorizeDef() argument
1086 node->loop_info->IsDefinedOutOfTheLoop(base) && in VectorizeDef()
1088 VectorizeUse(node, value, generate_code, type, restrictions)) { in VectorizeDef()
1106 if (VectorizeSADIdiom(node, instruction, generate_code, type, restrictions) || in VectorizeDef()
1108 VectorizeUse(node, instruction, generate_code, type, restrictions))) { in VectorizeDef()
1124 return !IsUsedOutsideLoop(node->loop_info, instruction) && !instruction->DoesAnyWrite(); in VectorizeDef()
1128 bool HLoopOptimization::VectorizeUse(LoopNode* node, in VectorizeUse() argument
1142 if (node->loop_info->IsDefinedOutOfTheLoop(instruction)) { in VectorizeUse()
1163 node->loop_info->IsDefinedOutOfTheLoop(base) && in VectorizeUse()
1204 VectorizeUse(node, opa, generate_code, type, restrictions | kNoHiBits)) || in VectorizeUse()
1207 VectorizeUse(node, opa, generate_code, type, restrictions))) { in VectorizeUse()
1223 VectorizeUse(node, opa, generate_code, from, restrictions)) { in VectorizeUse()
1234 if (VectorizeUse(node, opa, generate_code, type, restrictions)) { in VectorizeUse()
1251 if (VectorizeUse(node, opa, generate_code, type, restrictions) && in VectorizeUse()
1252 VectorizeUse(node, opb, generate_code, type, restrictions)) { in VectorizeUse()
1260 if (VectorizeHalvingAddIdiom(node, instruction, generate_code, type, restrictions)) { in VectorizeUse()
1289 if (VectorizeUse(node, r, generate_code, type, restrictions) && in VectorizeUse()
1323 if (VectorizeUse(node, r, generate_code, type, restrictions)) { in VectorizeUse()
1361 if (VectorizeUse(node, r, generate_code, type, restrictions) && in VectorizeUse()
1362 VectorizeUse(node, s, generate_code, type, restrictions)) { in VectorizeUse()
1912 bool HLoopOptimization::VectorizeHalvingAddIdiom(LoopNode* node, in VectorizeHalvingAddIdiom() argument
1956 if (VectorizeUse(node, r, generate_code, type, restrictions) && in VectorizeHalvingAddIdiom()
1957 VectorizeUse(node, s, generate_code, type, restrictions)) { in VectorizeHalvingAddIdiom()
1986 bool HLoopOptimization::VectorizeSADIdiom(LoopNode* node, in VectorizeSADIdiom() argument
2053 if (VectorizeUse(node, q, generate_code, sub_type, restrictions) && in VectorizeSADIdiom()
2054 VectorizeUse(node, r, generate_code, sub_type, restrictions) && in VectorizeSADIdiom()
2055 VectorizeUse(node, s, generate_code, sub_type, restrictions)) { in VectorizeSADIdiom()