| 642 | } |
| 643 | |
| 644 | bool FunctionContainsOpKillOrUnreachable(const opt::Function& function) { |
| 645 | for (auto& block : function) { |
| 646 | if (block.terminator()->opcode() == spv::Op::OpKill || |
| 647 | block.terminator()->opcode() == spv::Op::OpUnreachable) { |
| 648 | return true; |
| 649 | } |
| 650 | } |
| 651 | return false; |
| 652 | } |
| 653 | |
| 654 | bool FunctionIsEntryPoint(opt::IRContext* context, uint32_t function_id) { |
| 655 | for (auto& entry_point : context->module()->entry_points()) { |
no test coverage detected