Lines Matching defs:block

366   // Per-block GVN. Will also update the ValueSet of the dominated and
368 void VisitBasicBlock(HBasicBlock* block);
374 ValueSet* FindSetFor(HBasicBlock* block) const {
375 ValueSet* result = sets_[block->GetBlockId()];
376 DCHECK(result != nullptr) << "Could not find set for block B" << block->GetBlockId();
380 void AbandonSetFor(HBasicBlock* block) {
381 DCHECK(sets_[block->GetBlockId()] != nullptr)
382 << "Block B" << block->GetBlockId() << " expected to have a set";
383 sets_[block->GetBlockId()] = nullptr;
387 // which may reference `block`.
388 bool WillBeReferencedAgain(HBasicBlock* block) const;
393 HBasicBlock* FindVisitedBlockWithRecyclableSet(HBasicBlock* block,
396 // ValueSet for blocks. Initially null, but for an individual block they
398 // in the path from the dominator to the block.
401 // BitVector which serves as a fast-access map from block id to
412 // Use the reverse post order to ensure the non back-edge predecessors of a block are
413 // visited before the block itself.
419 void GlobalValueNumberer::VisitBasicBlock(HBasicBlock* block) {
422 const ArenaVector<HBasicBlock*>& predecessors = block->GetPredecessors();
424 // The entry block should only accumulate constant instructions, and
425 // the builder puts constants only in the entry block.
426 // Therefore, there is no need to propagate the value set to the next block.
429 HBasicBlock* dominator = block->GetDominator();
433 // `block` is a direct successor of its dominator. No need to clone the
434 // dominator's set, `block` can take over its ownership including its buckets.
435 DCHECK_EQ(dominator->GetSingleSuccessor(), block);
439 // Try to find a basic block which will never be referenced again and whose
442 HBasicBlock* recyclable = FindVisitedBlockWithRecyclableSet(block, *dominator_set);
444 // No block with a suitable ValueSet found. Allocate a new one and
456 if (block->IsLoopHeader()) {
457 if (block->GetLoopInformation()->ContainsIrreducibleLoop()) {
466 DCHECK(!block->GetLoopInformation()->IsIrreducible());
467 DCHECK_EQ(block->GetDominator(), block->GetLoopInformation()->GetPreHeader());
468 set->Kill(side_effects_.GetLoopEffects(block));
481 sets_[block->GetBlockId()] = set;
483 HInstruction* current = block->GetFirstInstruction();
513 visited_blocks_.SetBit(block->GetBlockId());
516 bool GlobalValueNumberer::WillBeReferencedAgain(HBasicBlock* block) const {
517 DCHECK(visited_blocks_.IsBitSet(block->GetBlockId()));
519 for (auto dominated_block : block->GetDominatedBlocks()) {
525 for (auto successor : block->GetSuccessors()) {
535 HBasicBlock* block, const ValueSet& reference_set) const {
545 HBasicBlock* current_block = block->GetGraph()->GetBlocks()[block_id];