Home | History | Annotate | Download | only in optimizing

Lines Matching full:instruction

22 static bool IsPhiOf(HInstruction* instruction, HBasicBlock* block) {
23 return instruction->IsPhi() && instruction->GetBlock() == block;
27 * Returns whether `instruction` has all its inputs and environment defined
30 static bool InputsAreDefinedBeforeLoop(HInstruction* instruction) {
31 DCHECK(instruction->IsInLoop());
32 HLoopInformation* info = instruction->GetBlock()->GetLoopInformation();
33 for (HInputIterator it(instruction); !it.Done(); it.Advance()) {
42 for (HEnvironment* environment = instruction->GetEnvironment();
50 // We can move an instruction that takes a loop header phi in the environment:
107 // We can move an instruction that can throw only if it is the first
108 // throwing instruction in the loop. Note that the first potentially
109 // throwing instruction encountered that is not hoisted stops this
110 // optimization. Non-throwing instruction can still be hoisted.
115 HInstruction* instruction = inst_it.Current();
116 if (instruction->CanBeMoved()
117 && (!instruction->CanThrow() || !found_first_non_hoisted_throwing_instruction_in_loop)
118 && !instruction->GetSideEffects().DependsOn(loop_effects)
119 && InputsAreDefinedBeforeLoop(instruction)) {
120 // We need to update the environment if the instruction has a loop header
122 if (instruction->NeedsEnvironment()) {
123 UpdateLoopPhisIn(instruction->GetEnvironment(), loop_info);
125 instruction->MoveBefore(pre_header->GetLastInstruction());
126 } else if (instruction->CanThrow()) {
127 // If `instruction` can throw, we cannot move further instructions