Swap the state so that the new nodes are now the previous nodes.
| 102 | |
| 103 | // Swap the state so that the new nodes are now the previous nodes. |
| 104 | void NextIterationState() { |
| 105 | previous_phi_ = new_phi; |
| 106 | previous_latch_block_ = new_latch_block; |
| 107 | previous_condition_block_ = new_condition_block; |
| 108 | previous_phis_ = std::move(new_phis_); |
| 109 | |
| 110 | // Clear new nodes. |
| 111 | new_phi = nullptr; |
| 112 | new_continue_block = nullptr; |
| 113 | new_condition_block = nullptr; |
| 114 | new_header_block = nullptr; |
| 115 | new_latch_block = nullptr; |
| 116 | |
| 117 | // Clear new block/instruction maps. |
| 118 | new_blocks.clear(); |
| 119 | new_inst.clear(); |
| 120 | ids_to_new_inst.clear(); |
| 121 | } |
| 122 | |
| 123 | // The induction variable from the immediately preceding loop body. |
| 124 | Instruction* previous_phi_; |