216 {
217 loop->ResetInduction();
218
219
220
221 current_index_ = 0;
222 ASSERT(stack_.is_empty());
224 ASSERT(branches_.is_empty());
225 for (BitVector::Iterator it(loop->blocks_); !it.Done(); it.Advance()) {
226 BlockEntryInstr* block = preorder_[it.Current()];
227 ASSERT(block->loop_info() !=
nullptr);
228 if (block->loop_info() != loop) {
229 continue;
230 }
231
232 if (block->IsJoinEntry()) {
233 for (PhiIterator it(block->AsJoinEntry()); !it.Done(); it.Advance()) {
234 Visit(loop, it.Current());
235 }
236 }
237
238 for (ForwardInstructionIterator it(block); !it.Done(); it.Advance()) {
239 Instruction* instruction = it.Current();
240 Visit(loop, instruction->AsDefinition());
241 if (instruction->IsBranch()) {
242 branches_.Add(instruction->AsBranch());
243 }
244 }
245 }
246 ASSERT(stack_.is_empty());
247 map_.Clear();
248
249 ClassifyControl(loop);
250 branches_.Clear();
251}