| 942 | } |
| 943 | |
| 944 | static std::vector<instruction_ref> |
| 945 | select_params(const std::vector<instruction_ref>& instructions, |
| 946 | const std::unordered_map<instruction_ref, instruction_ref>& param_map) |
| 947 | { |
| 948 | std::vector<instruction_ref> result; |
| 949 | std::vector<instruction_ref> params; |
| 950 | std::copy_if(instructions.begin(), |
| 951 | instructions.end(), |
| 952 | std::back_inserter(params), |
| 953 | [&](instruction_ref ins) { return contains(param_map, ins); }); |
| 954 | sort_params(params); |
| 955 | std::transform(params.begin(), |
| 956 | params.end(), |
| 957 | std::back_inserter(result), |
| 958 | [&](instruction_ref ins) { return param_map.at(ins); }); |
| 959 | return result; |
| 960 | } |
| 961 | |
| 962 | static std::array<module::with_inputs, 2> |
| 963 | generic_split(const module& m, |
no test coverage detected