Lines Matching refs:block
35 static bool IsSimpleBlock(HBasicBlock* block) { in IsSimpleBlock() argument
36 if (block->GetPredecessors().size() != 1u) { in IsSimpleBlock()
39 DCHECK(block->GetPhis().IsEmpty()); in IsSimpleBlock()
42 for (HInstructionIterator it(block->GetInstructions()); !it.Done(); it.Advance()) { in IsSimpleBlock()
49 if (instruction->IsSelect() && instruction->AsSelect()->GetCondition()->GetBlock() == block) { in IsSimpleBlock()
73 static HPhi* GetSinglePhi(HBasicBlock* block, size_t index1, size_t index2) { in GetSinglePhi() argument
77 for (HInstructionIterator it(block->GetPhis()); !it.Done(); it.Advance()) { in GetSinglePhi()
91 HBasicBlock* block, ScopedArenaSafeMap<HInstruction*, HSelect*>* cache) { in TryGenerateSelectSimpleDiamondPattern() argument
92 DCHECK(block->GetLastInstruction()->IsIf()); in TryGenerateSelectSimpleDiamondPattern()
93 HIf* if_instruction = block->GetLastInstruction()->AsIf(); in TryGenerateSelectSimpleDiamondPattern()
164 block->InsertInstructionBefore(select, if_instruction); in TryGenerateSelectSimpleDiamondPattern()
179 DCHECK_EQ(block->GetSingleSuccessor(), false_block); in TryGenerateSelectSimpleDiamondPattern()
180 block->MergeWith(false_block); in TryGenerateSelectSimpleDiamondPattern()
183 DCHECK_EQ(block->GetSingleSuccessor(), merge_block); in TryGenerateSelectSimpleDiamondPattern()
184 block->MergeWith(merge_block); in TryGenerateSelectSimpleDiamondPattern()
217 HBasicBlock* HSelectGenerator::TryFixupDoubleDiamondPattern(HBasicBlock* block) { in TryFixupDoubleDiamondPattern() argument
218 DCHECK(block->GetLastInstruction()->IsIf()); in TryFixupDoubleDiamondPattern()
219 HIf* if_instruction = block->GetLastInstruction()->AsIf(); in TryFixupDoubleDiamondPattern()
319 for (HBasicBlock* block : graph_->GetPostOrder()) { in Run()
320 if (!block->EndsWithIf()) { in Run()
324 if (TryGenerateSelectSimpleDiamondPattern(block, &cache)) { in Run()
329 HBasicBlock* inner_if_block = TryFixupDoubleDiamondPattern(block); in Run()
334 result = TryGenerateSelectSimpleDiamondPattern(block, &cache); in Run()