Lines Matching refs:HBasicBlock
58 void HGraph::AddBlock(HBasicBlock* block) { in AddBlock()
78 ScopedArenaVector<HBasicBlock*> worklist(allocator.Adapter(kArenaAllocGraphBuilder)); in FindBackEdges()
86 HBasicBlock* current = worklist.back(); in FindBackEdges()
92 HBasicBlock* successor = current->GetSuccessors()[successors_visited[current_id]++]; in FindBackEdges()
156 HBasicBlock* block = blocks_[i]; in RemoveInstructionsAsUsersFromDeadBlocks()
171 HBasicBlock* block = blocks_[i]; in RemoveDeadBlocks()
174 for (HBasicBlock* successor : block->GetSuccessors()) { in RemoveDeadBlocks()
233 for (HBasicBlock* block : GetActiveBlocks()) { in ClearDominanceInformation()
241 for (HBasicBlock* block : GetActiveBlocks()) { in ClearLoopInformation()
246 void HBasicBlock::ClearDominanceInformation() { in ClearDominanceInformation()
251 HInstruction* HBasicBlock::GetFirstInstructionDisregardMoves() const { in GetFirstInstructionDisregardMoves()
259 static bool UpdateDominatorOfSuccessor(HBasicBlock* block, HBasicBlock* successor) { in UpdateDominatorOfSuccessor()
262 HBasicBlock* old_dominator = successor->GetDominator(); in UpdateDominatorOfSuccessor()
263 HBasicBlock* new_dominator = in UpdateDominatorOfSuccessor()
284 bool HGraph::PathBetween(const HBasicBlock* source, const HBasicBlock* dest) const { in PathBetween()
333 for (const HBasicBlock* blk : graph_->GetPostOrder()) { in CalculateReachability()
343 const HBasicBlock* blk = graph_->GetBlocks()[idx]; in CalculateReachability()
353 void AddEdge(uint32_t source, const HBasicBlock* dest) { in AddEdge()
365 void CalculateConnectednessOn(const HBasicBlock* const target_block) { in CalculateConnectednessOn()
373 ScopedArenaVector<const HBasicBlock*> work_stack( in CalculateConnectednessOn()
382 const HBasicBlock* cur = work_stack.back(); in CalculateConnectednessOn()
391 for (const HBasicBlock* succ : cur->GetSuccessors()) { in CalculateConnectednessOn()
454 ScopedArenaVector<HBasicBlock*> worklist(allocator.Adapter(kArenaAllocGraphBuilder)); in ComputeDominanceInformation()
460 HBasicBlock* current = worklist.back(); in ComputeDominanceInformation()
465 HBasicBlock* successor = current->GetSuccessors()[successors_visited[current_id]++]; in ComputeDominanceInformation()
484 for (HBasicBlock* block : blocks_) { in ComputeDominanceInformation()
496 for (HBasicBlock* block : GetReversePostOrder()) { in ComputeDominanceInformation()
497 for (HBasicBlock* successor : block->GetSuccessors()) { in ComputeDominanceInformation()
507 for (HBasicBlock* block : GetReversePostOrder()) { in ComputeDominanceInformation()
508 for (HBasicBlock* successor : block->GetSuccessors()) { in ComputeDominanceInformation()
516 for (HBasicBlock* block : GetReversePostOrder()) { in ComputeDominanceInformation()
523 HBasicBlock* HGraph::SplitEdge(HBasicBlock* block, HBasicBlock* successor) { in SplitEdge()
524 HBasicBlock* new_block = new (allocator_) HBasicBlock(this, successor->GetDexPc()); in SplitEdge()
532 void HGraph::SplitCriticalEdge(HBasicBlock* block, HBasicBlock* successor) { in SplitCriticalEdge()
535 HBasicBlock* new_block = SplitEdge(block, successor); in SplitCriticalEdge()
548 static void FixPhisAfterPredecessorsReodering(HBasicBlock* block, size_t first, size_t second) { in FixPhisAfterPredecessorsReodering()
559 void HGraph::OrderLoopHeaderPredecessors(HBasicBlock* header) { in OrderLoopHeaderPredecessors()
563 HBasicBlock* to_swap = header->GetPredecessors()[0]; in OrderLoopHeaderPredecessors()
565 HBasicBlock* predecessor = header->GetPredecessors()[pred]; in OrderLoopHeaderPredecessors()
579 static void FixControlForNewSinglePreheader(HBasicBlock* header, HBasicBlock* new_preheader) { in FixControlForNewSinglePreheader()
582 HBasicBlock* predecessor = header->GetPredecessors()[pred]; in FixControlForNewSinglePreheader()
619 void HGraph::TransformLoopToSinglePreheaderFormat(HBasicBlock* header) { in TransformLoopToSinglePreheaderFormat()
622 HBasicBlock* preheader = new (allocator_) HBasicBlock(this, header->GetDexPc()); in TransformLoopToSinglePreheaderFormat()
637 HBasicBlock* predecessor = header->GetPredecessors()[pred]; in TransformLoopToSinglePreheaderFormat()
668 HBasicBlock* pred_block = header->GetPredecessors()[input_pos]; in TransformLoopToSinglePreheaderFormat()
681 HBasicBlock* first_pred = header->GetPredecessors()[first_nonbackedge_pred_pos]; in TransformLoopToSinglePreheaderFormat()
687 void HGraph::SimplifyLoop(HBasicBlock* header) { in SimplifyLoop()
711 for (HBasicBlock* block : GetReversePostOrder()) { in ComputeTryBlockInformation()
721 HBasicBlock* first_predecessor = block->GetPredecessors()[0]; in ComputeTryBlockInformation()
741 HBasicBlock* block = blocks_[block_id]; in SimplifyCFG()
747 ArrayRef<HBasicBlock* const> normal_successors = block->GetNormalSuccessors(); in SimplifyCFG()
749 HBasicBlock* successor = normal_successors[j]; in SimplifyCFG()
781 for (HBasicBlock* block : GetPostOrder()) { in AnalyzeLoops()
798 for (HBasicBlock* block : back_edges_) { in Dump()
801 for (HBasicBlock* block : header_->GetPredecessors()) { in Dump()
909 void HLoopInformation::Add(HBasicBlock* block) { in Add()
913 void HLoopInformation::Remove(HBasicBlock* block) { in Remove()
917 void HLoopInformation::PopulateRecursive(HBasicBlock* block) { in PopulateRecursive()
932 for (HBasicBlock* predecessor : block->GetPredecessors()) { in PopulateRecursive()
937 void HLoopInformation::PopulateIrreducibleRecursive(HBasicBlock* block, ArenaBitVector* finalized) { in PopulateIrreducibleRecursive()
953 HBasicBlock* pre_header = block->GetPredecessors()[0]; in PopulateIrreducibleRecursive()
962 for (HBasicBlock* back_edge : info->GetBackEdges()) { in PopulateIrreducibleRecursive()
969 for (HBasicBlock* predecessor : block->GetPredecessors()) { in PopulateIrreducibleRecursive()
1010 for (HBasicBlock* back_edge : GetBackEdges()) { in Populate()
1014 for (HBasicBlock* back_edge : GetBackEdges()) { in Populate()
1053 HBasicBlock* HLoopInformation::GetPreHeader() const { in GetPreHeader()
1054 HBasicBlock* block = header_->GetPredecessors()[0]; in GetPreHeader()
1059 bool HLoopInformation::Contains(const HBasicBlock& block) const { in Contains()
1073 for (HBasicBlock* back_edge : GetBackEdges()) { in GetLifetimeEnd()
1080 for (HBasicBlock* back_edge : GetBackEdges()) { in HasBackEdgeNotDominatedByHeader()
1089 bool HLoopInformation::DominatesAllBackEdges(HBasicBlock* block) { in DominatesAllBackEdges()
1090 for (HBasicBlock* back_edge : GetBackEdges()) { in DominatesAllBackEdges()
1103 for (HBasicBlock* successor : it_loop.Current()->GetSuccessors()) { in HasExitEdge()
1112 bool HBasicBlock::Dominates(HBasicBlock* other) const { in Dominates()
1115 HBasicBlock* current = other; in Dominates()
1134 void HBasicBlock::ReplaceAndRemovePhiWith(HPhi* initial, HPhi* replacement) { in ReplaceAndRemovePhiWith()
1141 void HBasicBlock::ReplaceAndRemoveInstructionWith(HInstruction* initial, in ReplaceAndRemoveInstructionWith()
1165 HBasicBlock* block, in Add()
1175 void HBasicBlock::AddInstruction(HInstruction* instruction) { in AddInstruction()
1179 void HBasicBlock::AddPhi(HPhi* phi) { in AddPhi()
1183 void HBasicBlock::InsertInstructionBefore(HInstruction* instruction, HInstruction* cursor) { in InsertInstructionBefore()
1196 void HBasicBlock::InsertInstructionAfter(HInstruction* instruction, HInstruction* cursor) { in InsertInstructionAfter()
1210 void HBasicBlock::InsertPhiAfter(HPhi* phi, HPhi* cursor) { in InsertPhiAfter()
1221 HBasicBlock* block, in Remove()
1234 void HBasicBlock::RemoveInstruction(HInstruction* instruction, bool ensure_safety) { in RemoveInstruction()
1239 void HBasicBlock::RemovePhi(HPhi* phi, bool ensure_safety) { in RemovePhi()
1243 void HBasicBlock::RemoveInstructionOrPhi(HInstruction* instruction, bool ensure_safety) { in RemoveInstructionOrPhi()
1272 HBasicBlock* loop_header) { in CopyFromWithLoopPhiAdjustment()
1466 HBasicBlock* block = GetBlock(); in StrictlyDominates()
1467 HBasicBlock* other_block = other_instruction->GetBlock(); in StrictlyDominates()
1533 const ArenaVector<HBasicBlock*>& predecessors = user->GetBlock()->GetPredecessors(); in ReplaceUsesDominatedBy()
1534 HBasicBlock* predecessor = predecessors[index]; in ReplaceUsesDominatedBy()
1748 for (HBasicBlock* block : graph_->GetActiveBlocks()) { in FOR_EACH_CONCRETE_INSTRUCTION()
1754 for (HBasicBlock* block : graph_->GetReversePostOrder()) { in VisitReversePostOrder()
1759 void HGraphVisitor::VisitBasicBlock(HBasicBlock* block) { in VisitBasicBlock()
2066 HBasicBlock* target_block = uses_it->GetUser()->GetBlock(); in MoveBeforeFirstUserAndOutOfLoops()
2109 HBasicBlock* HBasicBlock::SplitBefore(HInstruction* cursor) { in SplitBefore()
2113 HBasicBlock* new_block = in SplitBefore()
2114 new (GetGraph()->GetAllocator()) HBasicBlock(GetGraph(), cursor->GetDexPc()); in SplitBefore()
2128 for (HBasicBlock* successor : GetSuccessors()) { in SplitBefore()
2139 HBasicBlock* HBasicBlock::CreateImmediateDominator() { in CreateImmediateDominator()
2143 HBasicBlock* new_block = new (GetGraph()->GetAllocator()) HBasicBlock(GetGraph(), GetDexPc()); in CreateImmediateDominator()
2145 for (HBasicBlock* predecessor : GetPredecessors()) { in CreateImmediateDominator()
2156 HBasicBlock* HBasicBlock::SplitBeforeForInlining(HInstruction* cursor) { in SplitBeforeForInlining()
2159 HBasicBlock* new_block = in SplitBeforeForInlining()
2160 new (GetGraph()->GetAllocator()) HBasicBlock(GetGraph(), cursor->GetDexPc()); in SplitBeforeForInlining()
2173 for (HBasicBlock* successor : GetSuccessors()) { in SplitBeforeForInlining()
2179 for (HBasicBlock* dominated : GetDominatedBlocks()) { in SplitBeforeForInlining()
2187 HBasicBlock* HBasicBlock::SplitAfterForInlining(HInstruction* cursor) { in SplitAfterForInlining()
2192 HBasicBlock* new_block = new (GetGraph()->GetAllocator()) HBasicBlock(GetGraph(), GetDexPc()); in SplitAfterForInlining()
2200 for (HBasicBlock* successor : GetSuccessors()) { in SplitAfterForInlining()
2206 for (HBasicBlock* dominated : GetDominatedBlocks()) { in SplitAfterForInlining()
2214 const HTryBoundary* HBasicBlock::ComputeTryEntryOfSuccessors() const { in ComputeTryEntryOfSuccessors()
2232 bool HBasicBlock::HasThrowingInstructions() const { in HasThrowingInstructions()
2241 static bool HasOnlyOneInstruction(const HBasicBlock& block) { in HasOnlyOneInstruction()
2247 bool HBasicBlock::IsSingleGoto() const { in IsSingleGoto()
2251 bool HBasicBlock::IsSingleReturn() const { in IsSingleReturn()
2255 bool HBasicBlock::IsSingleReturnOrReturnVoidAllowingPhis() const { in IsSingleReturnOrReturnVoidAllowingPhis()
2260 bool HBasicBlock::IsSingleTryBoundary() const { in IsSingleTryBoundary()
2264 bool HBasicBlock::EndsWithControlFlowInstruction() const { in EndsWithControlFlowInstruction()
2268 bool HBasicBlock::EndsWithReturn() const { in EndsWithReturn()
2273 bool HBasicBlock::EndsWithIf() const { in EndsWithIf()
2277 bool HBasicBlock::EndsWithTryBoundary() const { in EndsWithTryBoundary()
2281 bool HBasicBlock::HasSinglePhi() const { in HasSinglePhi()
2285 ArrayRef<HBasicBlock* const> HBasicBlock::GetNormalSuccessors() const { in GetNormalSuccessors()
2289 return ArrayRef<HBasicBlock* const>(successors_).SubArray(0u, 1u); in GetNormalSuccessors()
2292 return ArrayRef<HBasicBlock* const>(successors_); in GetNormalSuccessors()
2296 ArrayRef<HBasicBlock* const> HBasicBlock::GetExceptionalSuccessors() const { in GetExceptionalSuccessors()
2301 return ArrayRef<HBasicBlock* const>(); in GetExceptionalSuccessors()
2306 ArrayRef<HBasicBlock* const> handlers1 = GetExceptionHandlers(); in HasSameExceptionHandlersAs()
2307 ArrayRef<HBasicBlock* const> handlers2 = other.GetExceptionHandlers(); in HasSameExceptionHandlersAs()
2332 void HInstructionList::SetBlockOfInstructions(HBasicBlock* block) const { in SetBlockOfInstructions()
2387 HBasicBlock* user_block = use.GetUser()->GetBlock(); in RemoveUsesOfDeadInstruction()
2395 void HBasicBlock::DisconnectAndDelete() { in DisconnectAndDelete()
2406 HBasicBlock* loop_update_start = this; in DisconnectAndDelete()
2419 for (HBasicBlock* successor : successors_) { in DisconnectAndDelete()
2468 for (HBasicBlock* predecessor : predecessors_) { in DisconnectAndDelete()
2481 HBasicBlock* handler = predecessor->GetSuccessors()[1]; in DisconnectAndDelete()
2538 void HBasicBlock::MergeInstructionsWith(HBasicBlock* other) { in MergeInstructionsWith()
2546 void HBasicBlock::MergeWith(HBasicBlock* other) { in MergeWith()
2567 for (HBasicBlock* successor : other->GetSuccessors()) { in MergeWith()
2575 for (HBasicBlock* dominated : other->GetDominatedBlocks()) { in MergeWith()
2591 void HBasicBlock::MergeWithInlined(HBasicBlock* other) { in MergeWithInlined()
2606 for (HBasicBlock* successor : other->GetSuccessors()) { in MergeWithInlined()
2613 for (HBasicBlock* dominated : other->GetDominatedBlocks()) { in MergeWithInlined()
2623 void HBasicBlock::ReplaceWith(HBasicBlock* other) { in ReplaceWith()
2625 HBasicBlock* predecessor = GetPredecessors()[0]; in ReplaceWith()
2629 HBasicBlock* successor = GetSuccessors()[0]; in ReplaceWith()
2632 for (HBasicBlock* dominated : GetDominatedBlocks()) { in ReplaceWith()
2641 void HGraph::DeleteDeadEmptyBlock(HBasicBlock* block) { in DeleteDeadEmptyBlock()
2659 void HGraph::UpdateLoopAndTryInformationOfNewBlock(HBasicBlock* block, in UpdateLoopAndTryInformationOfNewBlock()
2660 HBasicBlock* reference, in UpdateLoopAndTryInformationOfNewBlock()
2701 for (HBasicBlock* block : GetReversePostOrderSkipEntryBlock()) { in InlineInto()
2741 HBasicBlock* body = GetBlocks()[1]; in InlineInto()
2766 HBasicBlock* at = invoke->GetBlock(); in InlineInto()
2768 HBasicBlock* to = at->SplitBeforeForInlining(invoke); in InlineInto()
2770 HBasicBlock* first = entry_block_->GetSuccessors()[0]; in InlineInto()
2800 for (HBasicBlock* current : GetReversePostOrder()) { in InlineInto()
2827 HBasicBlock* predecessor = to->GetPredecessors()[pred]; in InlineInto()
2944 void HGraph::TransformLoopHeaderForBCE(HBasicBlock* header) { in TransformLoopHeaderForBCE()
2946 HBasicBlock* old_pre_header = header->GetDominator(); in TransformLoopHeaderForBCE()
2949 HBasicBlock* if_block = new (allocator_) HBasicBlock(this, header->GetDexPc()); in TransformLoopHeaderForBCE()
2950 HBasicBlock* true_block = new (allocator_) HBasicBlock(this, header->GetDexPc()); in TransformLoopHeaderForBCE()
2951 HBasicBlock* false_block = new (allocator_) HBasicBlock(this, header->GetDexPc()); in TransformLoopHeaderForBCE()
2952 HBasicBlock* new_pre_header = new (allocator_) HBasicBlock(this, header->GetDexPc()); in TransformLoopHeaderForBCE()
3000 HBasicBlock* HGraph::TransformLoopForVectorization(HBasicBlock* header, in TransformLoopForVectorization()
3001 HBasicBlock* body, in TransformLoopForVectorization()
3002 HBasicBlock* exit) { in TransformLoopForVectorization()
3007 HBasicBlock* new_pre_header = new (allocator_) HBasicBlock(this, header->GetDexPc()); in TransformLoopForVectorization()
3008 HBasicBlock* new_header = new (allocator_) HBasicBlock(this, header->GetDexPc()); in TransformLoopForVectorization()
3009 HBasicBlock* new_body = new (allocator_) HBasicBlock(this, header->GetDexPc()); in TransformLoopForVectorization()
3280 HBasicBlock* block = instr->GetBlock(); in ReplaceInstrOrPhiByClone()