MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / NextIterationState

Method NextIterationState

source/opt/loop_unroller.cpp:104–121  ·  view source on GitHub ↗

Swap the state so that the new nodes are now the previous nodes.

Source from the content-addressed store, hash-verified

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_;

Callers 1

CopyBodyMethod · 0.80

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected