1635 {
1636
1637
1638 DirectChainedHashMap<IdentitySetKeyValueTrait<Instruction*>> moved;
1639 for (BlockIterator block_it = graph->reverse_postorder_iterator();
1640 !block_it.Done(); block_it.Advance()) {
1641 BlockEntryInstr* block = block_it.Current();
1642
1643 for (ForwardInstructionIterator instr_it(block); !instr_it.Done();
1644 instr_it.Advance()) {
1645 Definition* def = instr_it.Current()->AsDefinition();
1646 if (def != nullptr && def->IsAllocation() && def->env() == nullptr &&
1647 !moved.HasKey(def)) {
1648 Instruction* use = DominantUse(def);
1649 if (use != nullptr && !use->IsPhi() && IsOneTimeUse(use, def)) {
1650 instr_it.RemoveCurrentFromGraph();
1651 def->InsertBefore(use);
1652 moved.Insert(def);
1653 }
1654 }
1655 }
1656 }
1657}