Lines Matching refs:loop
909 HLoopInformation* loop = bounds_check->GetBlock()->GetLoopInformation(); in VisitBoundsCheck() local
912 if (DynamicBCESeemsProfitable(loop, bounds_check->GetBlock()) && in VisitBoundsCheck()
915 CanHandleInfiniteLoop(loop, index, needs_finite_test) && in VisitBoundsCheck()
917 CanHandleLength(loop, array_length, needs_taken_test)) { in VisitBoundsCheck()
918 TransformLoopForDeoptimizationIfNeeded(loop, needs_taken_test); in VisitBoundsCheck()
919 TransformLoopForDynamicBCE(loop, bounds_check); in VisitBoundsCheck()
1348 HLoopInformation* loop = array_get->GetBlock()->GetLoopInformation(); in VisitArrayGet() local
1349 if (loop->IsDefinedOutOfTheLoop(array_get->InputAt(0)) && in VisitArrayGet()
1350 loop->IsDefinedOutOfTheLoop(array_get->InputAt(1))) { in VisitArrayGet()
1351 SideEffects loop_effects = side_effects_.GetLoopEffects(loop->GetHeader()); in VisitArrayGet()
1355 if (loop->DominatesAllBackEdges(array_get->GetBlock())) { in VisitArrayGet()
1356 HoistToPreHeaderOrDeoptBlock(loop, array_get); in VisitArrayGet()
1524 void TransformLoopForDynamicBCE(HLoopInformation* loop, HBoundsCheck* bounds_check) { in TransformLoopForDynamicBCE() argument
1527 DCHECK(loop->IsDefinedOutOfTheLoop(array_length)); // pre-checked in TransformLoopForDynamicBCE()
1528 DCHECK(loop->DominatesAllBackEdges(bounds_check->GetBlock())); in TransformLoopForDynamicBCE()
1541 if (user->IsBoundsCheck() && loop == user->GetBlock()->GetLoopInformation()) { in TransformLoopForDynamicBCE()
1555 if (!loop->DominatesAllBackEdges(user->GetBlock())) { in TransformLoopForDynamicBCE()
1579 HBasicBlock* block = GetPreHeader(loop, bounds_check); in TransformLoopForDynamicBCE()
1625 loop, block, new (GetGraph()->GetAllocator()) HAbove(min_upper, max_upper)); in TransformLoopForDynamicBCE()
1636 loop, block, new (GetGraph()->GetAllocator()) HAbove(min_lower, max_lower)); in TransformLoopForDynamicBCE()
1642 loop, block, new (GetGraph()->GetAllocator()) HAbove(max_lower, max_upper)); in TransformLoopForDynamicBCE()
1645 loop, block, new (GetGraph()->GetAllocator()) HAboveOrEqual(max_upper, array_length)); in TransformLoopForDynamicBCE()
1654 bool DynamicBCESeemsProfitable(HLoopInformation* loop, HBasicBlock* block) { in DynamicBCESeemsProfitable() argument
1655 if (loop != nullptr) { in DynamicBCESeemsProfitable()
1658 if (loop->IsIrreducible()) { in DynamicBCESeemsProfitable()
1668 if (loop->GetPreHeader()->GetLastInstruction()->IsTryBoundary()) { in DynamicBCESeemsProfitable()
1673 if (IsEarlyExitLoop(loop)) { in DynamicBCESeemsProfitable()
1678 return loop->DominatesAllBackEdges(block); in DynamicBCESeemsProfitable()
1687 bool IsEarlyExitLoop(HLoopInformation* loop) { in IsEarlyExitLoop() argument
1688 const uint32_t loop_id = loop->GetHeader()->GetBlockId(); in IsEarlyExitLoop()
1696 HBlocksInLoopReversePostOrderIterator it_loop(*loop); in IsEarlyExitLoop()
1699 if (!loop->Contains(*successor)) { in IsEarlyExitLoop()
1713 bool CanHandleLength(HLoopInformation* loop, HInstruction* length, bool needs_taken_test) { in CanHandleLength() argument
1714 if (loop->IsDefinedOutOfTheLoop(length)) { in CanHandleLength()
1716 } else if (length->IsArrayLength() && length->GetBlock()->GetLoopInformation() == loop) { in CanHandleLength()
1717 if (CanHandleNullCheck(loop, length->InputAt(0), needs_taken_test)) { in CanHandleLength()
1718 HoistToPreHeaderOrDeoptBlock(loop, length); in CanHandleLength()
1729 bool CanHandleNullCheck(HLoopInformation* loop, HInstruction* check, bool needs_taken_test) { in CanHandleNullCheck() argument
1730 if (loop->IsDefinedOutOfTheLoop(check)) { in CanHandleNullCheck()
1732 } else if (check->IsNullCheck() && check->GetBlock()->GetLoopInformation() == loop) { in CanHandleNullCheck()
1734 if (loop->IsDefinedOutOfTheLoop(array)) { in CanHandleNullCheck()
1736 TransformLoopForDeoptimizationIfNeeded(loop, needs_taken_test); in CanHandleNullCheck()
1737 HBasicBlock* block = GetPreHeader(loop, check); in CanHandleNullCheck()
1740 InsertDeoptInLoop(loop, block, cond, /* is_null_check= */ true); in CanHandleNullCheck()
1756 …bool CanHandleInfiniteLoop(HLoopInformation* loop, HInstruction* index, bool needs_infinite_test) { in CanHandleInfiniteLoop() argument
1759 const uint32_t loop_id = loop->GetHeader()->GetBlockId(); in CanHandleInfiniteLoop()
1766 HInstruction* control = loop->GetHeader()->GetLastInstruction(); in CanHandleInfiniteLoop()
1787 HBasicBlock* GetPreHeader(HLoopInformation* loop, HInstruction* instruction) { in GetPreHeader() argument
1790 HBasicBlock* header = loop->GetHeader(); in GetPreHeader()
1802 return loop->GetPreHeader(); in GetPreHeader()
1806 void InsertDeoptInLoop(HLoopInformation* loop, in InsertDeoptInLoop() argument
1810 HInstruction* suspend = loop->GetSuspendCheck(); in InsertDeoptInLoop()
1819 suspend->GetEnvironment(), loop->GetHeader()); in InsertDeoptInLoop()
1837 void HoistToPreHeaderOrDeoptBlock(HLoopInformation* loop, HInstruction* instruction) { in HoistToPreHeaderOrDeoptBlock() argument
1838 HBasicBlock* block = GetPreHeader(loop, instruction); in HoistToPreHeaderOrDeoptBlock()
1879 void TransformLoopForDeoptimizationIfNeeded(HLoopInformation* loop, bool needs_taken_test) { in TransformLoopForDeoptimizationIfNeeded() argument
1881 const uint32_t loop_id = loop->GetHeader()->GetBlockId(); in TransformLoopForDeoptimizationIfNeeded()
1887 HBasicBlock* header = loop->GetHeader(); in TransformLoopForDeoptimizationIfNeeded()
1889 HBasicBlock* new_preheader = loop->GetPreHeader(); in TransformLoopForDeoptimizationIfNeeded()