| 2019 | } |
| 2020 | |
| 2021 | opt::Module::iterator GetFunctionIterator(opt::IRContext* ir_context, |
| 2022 | uint32_t function_id) { |
| 2023 | return std::find_if(ir_context->module()->begin(), |
| 2024 | ir_context->module()->end(), |
| 2025 | [function_id](const opt::Function& f) { |
| 2026 | return f.result_id() == function_id; |
| 2027 | }); |
| 2028 | } |
| 2029 | |
| 2030 | // TODO(https://github.com/KhronosGroup/SPIRV-Tools/issues/3582): Add all |
| 2031 | // opcodes that are agnostic to signedness of operands to function. |