| 980 | } |
| 981 | |
| 982 | bool IsPermutationOfRange(const std::vector<uint32_t>& arr, uint32_t lo, |
| 983 | uint32_t hi) { |
| 984 | if (arr.empty()) { |
| 985 | return lo > hi; |
| 986 | } |
| 987 | |
| 988 | if (HasDuplicates(arr)) { |
| 989 | return false; |
| 990 | } |
| 991 | |
| 992 | auto min_max = std::minmax_element(arr.begin(), arr.end()); |
| 993 | return arr.size() == hi - lo + 1 && *min_max.first == lo && |
| 994 | *min_max.second == hi; |
| 995 | } |
| 996 | |
| 997 | std::vector<opt::Instruction*> GetParameters(opt::IRContext* ir_context, |
| 998 | uint32_t function_id) { |
no test coverage detected