| 1163 | } |
| 1164 | |
| 1165 | void module_with_inputs::replace(instruction_ref ins, instruction_ref rep) |
| 1166 | { |
| 1167 | auto it = std::find(inputs.begin(), inputs.end(), ins); |
| 1168 | if(it == inputs.end()) |
| 1169 | return; |
| 1170 | assert((*it)->get_shape().lens() == rep->get_shape().lens()); |
| 1171 | *it = rep; |
| 1172 | } |
| 1173 | void module_with_inputs::replace( |
| 1174 | const std::unordered_map<instruction_ref, instruction_ref>& map_ins) |
| 1175 | { |