MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / FunctionContainsOpKillOrUnreachable

Function FunctionContainsOpKillOrUnreachable

source/fuzz/fuzzer_util.cpp:644–652  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

642}
643
644bool 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
654bool FunctionIsEntryPoint(opt::IRContext* context, uint32_t function_id) {
655 for (auto& entry_point : context->module()->entry_points()) {

Callers 2

IsSuitableForInliningMethod · 0.85

Calls 2

opcodeMethod · 0.45
terminatorMethod · 0.45

Tested by

no test coverage detected