Lines Matching defs:instruction

291 void HBasicBlock::InsertInstructionBefore(HInstruction* instruction, HInstruction* cursor) {
293 DCHECK(instruction->AsPhi() == nullptr);
294 DCHECK_EQ(instruction->GetId(), -1);
297 DCHECK(!instruction->IsControlFlow());
298 instruction->next_ = cursor;
299 instruction->previous_ = cursor->previous_;
300 cursor->previous_ = instruction;
302 instructions_.first_instruction_ = instruction;
304 instruction->previous_->next_ = instruction;
306 instruction->SetBlock(this);
307 instruction->SetId(GetGraph()->GetNextInstructionId());
312 HInstruction* instruction) {
313 DCHECK(instruction->GetBlock() == nullptr);
314 DCHECK_EQ(instruction->GetId(), -1);
315 instruction->SetBlock(block);
316 instruction->SetId(block->GetGraph()->GetNextInstructionId());
317 instruction_list->AddInstruction(instruction);
320 void HBasicBlock::AddInstruction(HInstruction* instruction) {
321 Add(&instructions_, this, instruction);
330 HInstruction* instruction) {
331 DCHECK_EQ(block, instruction->GetBlock());
332 DCHECK(instruction->GetUses() == nullptr);
333 DCHECK(instruction->GetEnvUses() == nullptr);
334 instruction->SetBlock(nullptr);
335 instruction_list->RemoveInstruction(instruction);
337 for (size_t i = 0; i < instruction->InputCount(); i++) {
338 instruction->InputAt(i)->RemoveUser(instruction, i);
342 void HBasicBlock::RemoveInstruction(HInstruction* instruction) {
343 Remove(&instructions_, this, instruction);
366 void HInstructionList::AddInstruction(HInstruction* instruction) {
369 first_instruction_ = last_instruction_ = instruction;
371 last_instruction_->next_ = instruction;
372 instruction->previous_ = last_instruction_;
373 last_instruction_ = instruction;
375 for (size_t i = 0; i < instruction->InputCount(); i++) {
376 instruction->InputAt(i)->AddUseAt(instruction, i);
380 void HInstructionList::RemoveInstruction(HInstruction* instruction) {
381 if (instruction->previous_ != nullptr) {
382 instruction->previous_->next_ = instruction->next_;
384 if (instruction->next_ != nullptr) {
385 instruction->next_->previous_ = instruction->previous_;
387 if (instruction == first_instruction_) {
388 first_instruction_ = instruction->next_;
390 if (instruction == last_instruction_) {
391 last_instruction_ = instruction->previous_;
460 // and the If instruction?