Lines Matching refs:cursor

1009 void HBasicBlock::InsertInstructionBefore(HInstruction* instruction, HInstruction* cursor) {  in InsertInstructionBefore()  argument
1010 DCHECK(!cursor->IsPhi()); in InsertInstructionBefore()
1013 DCHECK_NE(cursor->GetId(), -1); in InsertInstructionBefore()
1014 DCHECK_EQ(cursor->GetBlock(), this); in InsertInstructionBefore()
1019 instructions_.InsertInstructionBefore(instruction, cursor); in InsertInstructionBefore()
1022 void HBasicBlock::InsertInstructionAfter(HInstruction* instruction, HInstruction* cursor) { in InsertInstructionAfter() argument
1023 DCHECK(!cursor->IsPhi()); in InsertInstructionAfter()
1026 DCHECK_NE(cursor->GetId(), -1); in InsertInstructionAfter()
1027 DCHECK_EQ(cursor->GetBlock(), this); in InsertInstructionAfter()
1029 DCHECK(!cursor->IsControlFlow()); in InsertInstructionAfter()
1033 instructions_.InsertInstructionAfter(instruction, cursor); in InsertInstructionAfter()
1036 void HBasicBlock::InsertPhiAfter(HPhi* phi, HPhi* cursor) { in InsertPhiAfter() argument
1038 DCHECK_NE(cursor->GetId(), -1); in InsertPhiAfter()
1039 DCHECK_EQ(cursor->GetBlock(), this); in InsertPhiAfter()
1043 phis_.InsertInstructionAfter(phi, cursor); in InsertPhiAfter()
1171 void HInstructionList::InsertInstructionBefore(HInstruction* instruction, HInstruction* cursor) { in InsertInstructionBefore() argument
1172 DCHECK(Contains(cursor)); in InsertInstructionBefore()
1173 if (cursor == first_instruction_) { in InsertInstructionBefore()
1174 cursor->previous_ = instruction; in InsertInstructionBefore()
1175 instruction->next_ = cursor; in InsertInstructionBefore()
1178 instruction->previous_ = cursor->previous_; in InsertInstructionBefore()
1179 instruction->next_ = cursor; in InsertInstructionBefore()
1180 cursor->previous_ = instruction; in InsertInstructionBefore()
1185 void HInstructionList::InsertInstructionAfter(HInstruction* instruction, HInstruction* cursor) { in InsertInstructionAfter() argument
1186 DCHECK(Contains(cursor)); in InsertInstructionAfter()
1187 if (cursor == last_instruction_) { in InsertInstructionAfter()
1188 cursor->next_ = instruction; in InsertInstructionAfter()
1189 instruction->previous_ = cursor; in InsertInstructionAfter()
1192 instruction->next_ = cursor->next_; in InsertInstructionAfter()
1193 instruction->previous_ = cursor; in InsertInstructionAfter()
1194 cursor->next_ = instruction; in InsertInstructionAfter()
1751 void HInstruction::MoveBefore(HInstruction* cursor, bool do_checks) { in MoveBefore() argument
1758 DCHECK(!cursor->IsPhi()); in MoveBefore()
1770 previous_ = cursor->previous_; in MoveBefore()
1774 next_ = cursor; in MoveBefore()
1775 cursor->previous_ = this; in MoveBefore()
1776 block_ = cursor->block_; in MoveBefore()
1778 if (block_->instructions_.first_instruction_ == cursor) { in MoveBefore()
1837 HBasicBlock* HBasicBlock::SplitBefore(HInstruction* cursor) { in SplitBefore() argument
1839 DCHECK_EQ(cursor->GetBlock(), this); in SplitBefore()
1842 new (GetGraph()->GetAllocator()) HBasicBlock(GetGraph(), cursor->GetDexPc()); in SplitBefore()
1843 new_block->instructions_.first_instruction_ = cursor; in SplitBefore()
1845 instructions_.last_instruction_ = cursor->previous_; in SplitBefore()
1846 if (cursor->previous_ == nullptr) { in SplitBefore()
1849 cursor->previous_->next_ = nullptr; in SplitBefore()
1850 cursor->previous_ = nullptr; in SplitBefore()
1884 HBasicBlock* HBasicBlock::SplitBeforeForInlining(HInstruction* cursor) { in SplitBeforeForInlining() argument
1885 DCHECK_EQ(cursor->GetBlock(), this); in SplitBeforeForInlining()
1888 new (GetGraph()->GetAllocator()) HBasicBlock(GetGraph(), cursor->GetDexPc()); in SplitBeforeForInlining()
1889 new_block->instructions_.first_instruction_ = cursor; in SplitBeforeForInlining()
1891 instructions_.last_instruction_ = cursor->previous_; in SplitBeforeForInlining()
1892 if (cursor->previous_ == nullptr) { in SplitBeforeForInlining()
1895 cursor->previous_->next_ = nullptr; in SplitBeforeForInlining()
1896 cursor->previous_ = nullptr; in SplitBeforeForInlining()
1915 HBasicBlock* HBasicBlock::SplitAfterForInlining(HInstruction* cursor) { in SplitAfterForInlining() argument
1916 DCHECK(!cursor->IsControlFlow()); in SplitAfterForInlining()
1917 DCHECK_NE(instructions_.last_instruction_, cursor); in SplitAfterForInlining()
1918 DCHECK_EQ(cursor->GetBlock(), this); in SplitAfterForInlining()
1921 new_block->instructions_.first_instruction_ = cursor->GetNext(); in SplitAfterForInlining()
1923 cursor->next_->previous_ = nullptr; in SplitAfterForInlining()
1924 cursor->next_ = nullptr; in SplitAfterForInlining()
1925 instructions_.last_instruction_ = cursor; in SplitAfterForInlining()
2068 void HInstructionList::AddAfter(HInstruction* cursor, const HInstructionList& instruction_list) { in AddAfter() argument
2069 DCHECK(Contains(cursor)); in AddAfter()
2071 if (cursor == last_instruction_) { in AddAfter()
2074 cursor->next_->previous_ = instruction_list.last_instruction_; in AddAfter()
2076 instruction_list.last_instruction_->next_ = cursor->next_; in AddAfter()
2077 cursor->next_ = instruction_list.first_instruction_; in AddAfter()
2078 instruction_list.first_instruction_->previous_ = cursor; in AddAfter()
2082 void HInstructionList::AddBefore(HInstruction* cursor, const HInstructionList& instruction_list) { in AddBefore() argument
2083 DCHECK(Contains(cursor)); in AddBefore()
2085 if (cursor == first_instruction_) { in AddBefore()
2088 cursor->previous_->next_ = instruction_list.first_instruction_; in AddBefore()
2090 instruction_list.last_instruction_->next_ = cursor; in AddBefore()
2091 instruction_list.first_instruction_->previous_ = cursor->previous_; in AddBefore()
2092 cursor->previous_ = instruction_list.last_instruction_; in AddBefore()
3023 HInstruction* HGraph::InsertOppositeCondition(HInstruction* cond, HInstruction* cursor) { in InsertOppositeCondition() argument
3047 cursor->GetBlock()->InsertInstructionBefore(replacement, cursor); in InsertOppositeCondition()
3059 cursor->GetBlock()->InsertInstructionBefore(replacement, cursor); in InsertOppositeCondition()