Lines Matching refs:block
771 Value PrepareLoopValue(HBasicBlock* block, size_t idx);
772 Value PrepareLoopStoredBy(HBasicBlock* block, size_t idx);
773 void PrepareLoopRecords(HBasicBlock* block);
774 Value MergePredecessorValues(HBasicBlock* block, size_t idx);
775 void MergePredecessorRecords(HBasicBlock* block);
785 void VisitBasicBlock(HBasicBlock* block) override;
968 HBasicBlock* block = instruction->GetBlock(); in VisitDeoptimize() local
969 ScopedArenaVector<ValueRecord>& heap_values = heap_values_for_[block->GetBlockId()]; in VisitDeoptimize()
1004 void HandleExit(HBasicBlock* block, bool must_keep_stores = false) { in HandleExit() argument
1005 ScopedArenaVector<ValueRecord>& heap_values = heap_values_for_[block->GetBlockId()]; in HandleExit()
1151 HBasicBlock* block = new_instance->GetBlock(); in VisitNewInstance() local
1152 ScopedArenaVector<ValueRecord>& heap_values = heap_values_for_[block->GetBlockId()]; in VisitNewInstance()
1194 HBasicBlock* block = new_array->GetBlock(); in VisitNewArray() local
1195 ScopedArenaVector<ValueRecord>& heap_values = heap_values_for_[block->GetBlockId()]; in VisitNewArray()
1449 LSEVisitor::Value LSEVisitor::PrepareLoopValue(HBasicBlock* block, size_t idx) { in PrepareLoopValue() argument
1456 HLoopInformation* loop_info = block->GetLoopInformation(); in PrepareLoopValue()
1466 CHECK(ref->GetBlock() != block && ref->GetBlock()->Dominates(block)) in PrepareLoopValue()
1473 << GetGraph()->PrettyMethod() << " blk: " << block->GetBlockId() << " " in PrepareLoopValue()
1477 PhiPlaceholder phi_placeholder = GetPhiPlaceholder(block->GetBlockId(), idx); in PrepareLoopValue()
1481 LSEVisitor::Value LSEVisitor::PrepareLoopStoredBy(HBasicBlock* block, size_t idx) { in PrepareLoopStoredBy() argument
1491 block->GetLoopInformation()->Contains(*reference->GetBlock()) && in PrepareLoopStoredBy()
1495 PhiPlaceholder phi_placeholder = GetPhiPlaceholder(block->GetBlockId(), idx); in PrepareLoopStoredBy()
1499 void LSEVisitor::PrepareLoopRecords(HBasicBlock* block) { in PrepareLoopRecords() argument
1500 DCHECK(block->IsLoopHeader()); in PrepareLoopRecords()
1501 int block_id = block->GetBlockId(); in PrepareLoopRecords()
1502 HBasicBlock* pre_header = block->GetLoopInformation()->GetPreHeader(); in PrepareLoopRecords()
1511 if (block->GetLoopInformation()->IsIrreducible()) { in PrepareLoopRecords()
1519 : Value::MergedUnknown(GetPhiPlaceholder(block->GetBlockId(), idx)); in PrepareLoopRecords()
1520 KeepStores(Value::ForLoopPhiPlaceholder(GetPhiPlaceholder(block->GetBlockId(), idx))); in PrepareLoopRecords()
1528 heap_values.push_back({ PrepareLoopValue(block, idx), PrepareLoopStoredBy(block, idx) }); in PrepareLoopRecords()
1532 LSEVisitor::Value LSEVisitor::MergePredecessorValues(HBasicBlock* block, size_t idx) { in MergePredecessorValues() argument
1533 ArrayRef<HBasicBlock* const> predecessors(block->GetPredecessors()); in MergePredecessorValues()
1545 PhiPlaceholder phi_placeholder = GetPhiPlaceholder(block->GetBlockId(), idx); in MergePredecessorValues()
1553 PhiPlaceholder phi_placeholder = GetPhiPlaceholder(block->GetBlockId(), idx); in MergePredecessorValues()
1559 DCHECK_IMPLIES(merged_value.IsPureUnknown(), block->GetPredecessors().size() <= 1) in MergePredecessorValues()
1564 void LSEVisitor::MergePredecessorRecords(HBasicBlock* block) { in MergePredecessorRecords() argument
1565 if (block->IsExitBlock()) { in MergePredecessorRecords()
1572 ScopedArenaVector<ValueRecord>& heap_values = heap_values_for_[block->GetBlockId()]; in MergePredecessorRecords()
1575 if (block->GetPredecessors().empty() || block->IsCatchBlock()) { in MergePredecessorRecords()
1576 DCHECK_IMPLIES(block->GetPredecessors().empty(), block->IsEntryBlock()); in MergePredecessorRecords()
1584 Value merged_value = MergePredecessorValues(block, idx); in MergePredecessorRecords()
1588 CHECK(GetGraph()->GetBlocks()[block_id]->Dominates(block)); in MergePredecessorRecords()
1590 CHECK(merged_value.GetInstruction()->GetBlock()->Dominates(block)); in MergePredecessorRecords()
1593 ArrayRef<HBasicBlock* const> predecessors(block->GetPredecessors()); in MergePredecessorRecords()
1601 PhiPlaceholder phi_placeholder = GetPhiPlaceholder(block->GetBlockId(), idx); in MergePredecessorRecords()
1611 HBasicBlock* block, in FindOrConstructNonLoopPhi() argument
1614 for (HInstructionIterator phi_it(block->GetPhis()); !phi_it.Done(); phi_it.Advance()) { in FindOrConstructNonLoopPhi()
1624 ArenaAllocator* allocator = block->GetGraph()->GetAllocator(); in FindOrConstructNonLoopPhi()
1630 block->AddPhi(phi); in FindOrConstructNonLoopPhi()
1633 ReferenceTypePropagation rtp_fixup(block->GetGraph(), in FindOrConstructNonLoopPhi()
1754 HBasicBlock* block = instruction->GetBlock(); in VisitSetLocation() local
1755 ScopedArenaVector<ValueRecord>& heap_values = heap_values_for_[block->GetBlockId()]; in VisitSetLocation()
1763 block->RemoveInstruction(instruction); in VisitSetLocation()
1779 record.stored_by.GetInstruction()->GetBlock() != block || in VisitSetLocation()
1823 void LSEVisitor::VisitBasicBlock(HBasicBlock* block) { in VisitBasicBlock() argument
1826 if (block->IsLoopHeader()) { in VisitBasicBlock()
1827 PrepareLoopRecords(block); in VisitBasicBlock()
1829 MergePredecessorRecords(block); in VisitBasicBlock()
1832 VisitNonPhiInstructions(block); in VisitBasicBlock()
1883 HBasicBlock* block = blocks[current_phi_placeholder.GetBlockId()]; in TryReplacingLoopPhiPlaceholderWithDefault() local
1884 DCHECK_GE(block->GetPredecessors().size(), 2u); in TryReplacingLoopPhiPlaceholderWithDefault()
1886 for (HBasicBlock* predecessor : block->GetPredecessors()) { in TryReplacingLoopPhiPlaceholderWithDefault()
1898 if (block->IsLoopHeader()) { in TryReplacingLoopPhiPlaceholderWithDefault()
1908 for (HBasicBlock* predecessor : block->GetPredecessors()) { in TryReplacingLoopPhiPlaceholderWithDefault()
2123 HBasicBlock* block = blocks[phi_placeholder.GetBlockId()]; in MaterializeLoopPhis() local
2124 DCHECK_GE(block->GetPredecessors().size(), 2u); in MaterializeLoopPhis()
2126 for (HBasicBlock* predecessor : block->GetPredecessors()) { in MaterializeLoopPhis()
2164 HBasicBlock* block = GetGraph()->GetBlocks()[phi_placeholder.GetBlockId()]; in MaterializeLoopPhis() local
2165 ArrayRef<HBasicBlock* const> predecessors(block->GetPredecessors()); in MaterializeLoopPhis()
2166 for (HInstructionIterator phi_it(block->GetPhis()); !phi_it.Done(); phi_it.Advance()) { in MaterializeLoopPhis()
2196 HBasicBlock* block = blocks[phi_placeholder.GetBlockId()]; in MaterializeLoopPhis() local
2197 CHECK_GE(block->GetPredecessors().size(), 2u); in MaterializeLoopPhis()
2199 new (allocator) HPhi(allocator, kNoRegNumber, block->GetPredecessors().size(), type)); in MaterializeLoopPhis()
2204 HBasicBlock* block = blocks[phi_placeholder.GetBlockId()]; in MaterializeLoopPhis() local
2209 for (size_t i = 0, size = block->GetPredecessors().size(); i != size; ++i) { in MaterializeLoopPhis()
2210 HBasicBlock* predecessor = block->GetPredecessors()[i]; in MaterializeLoopPhis()
2223 HBasicBlock* block = blocks[phi_placeholder.GetBlockId()]; in MaterializeLoopPhis() local
2224 block->AddPhi(phi_placeholder_replacements_[phi_placeholder_index].GetInstruction()->AsPhi()); in MaterializeLoopPhis()
2414 HBasicBlock* block = reverse_post_order[reverse_post_order_index]; in ProcessLoopPhiWithUnknownInput() local
2416 loads_and_stores_[loads_and_stores_index].load_or_store->GetBlock() == block) { in ProcessLoopPhiWithUnknownInput()
2429 auto get_initial_value = [this](HBasicBlock* block, size_t idx) { in ProcessLoopPhiWithUnknownInput() argument
2431 if (block->IsLoopHeader()) { in ProcessLoopPhiWithUnknownInput()
2432 if (block->GetLoopInformation()->IsIrreducible()) { in ProcessLoopPhiWithUnknownInput()
2433 PhiPlaceholder placeholder = GetPhiPlaceholder(block->GetBlockId(), idx); in ProcessLoopPhiWithUnknownInput()
2436 value = PrepareLoopValue(block, idx); in ProcessLoopPhiWithUnknownInput()
2439 value = MergePredecessorValues(block, idx); in ProcessLoopPhiWithUnknownInput()
2449 HBasicBlock* block = reverse_post_order[reverse_post_order_index]; in ProcessLoopPhiWithUnknownInput() local
2450 if (block->IsExitBlock()) { in ProcessLoopPhiWithUnknownInput()
2461 if (load_or_store->GetBlock() != block) { in ProcessLoopPhiWithUnknownInput()
2501 local_heap_values[idx] = get_initial_value(block, idx); in ProcessLoopPhiWithUnknownInput()
2535 ScopedArenaVector<ValueRecord>& heap_values = heap_values_for_[block->GetBlockId()]; in ProcessLoopPhiWithUnknownInput()
2541 heap_values[idx].value = get_initial_value(block, idx); in ProcessLoopPhiWithUnknownInput()
2607 HBasicBlock* block = blocks[phi_placeholder.GetBlockId()]; in SearchPhiPlaceholdersForKeptStores() local
2608 DCHECK(block != nullptr) << cur_phi_idx << " phi: " << phi_placeholder in SearchPhiPlaceholdersForKeptStores()
2610 for (HBasicBlock* predecessor : block->GetPredecessors()) { in SearchPhiPlaceholdersForKeptStores()
2616 block->IsLoopHeader() && predecessor != block->GetLoopInformation()->GetPreHeader(); in SearchPhiPlaceholdersForKeptStores()
2621 if (!stored_by.IsUnknown() && (i == idx || MayAliasOnBackEdge(block, idx, i))) { in SearchPhiPlaceholdersForKeptStores()
2811 for (HBasicBlock* block : GetGraph()->GetReversePostOrder()) { in Run()
2812 VisitBasicBlock(block); in Run()