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

Function InstructionIsFunctionParameter

source/fuzz/fuzzer_util.cpp:750–763  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

748}
749
750bool InstructionIsFunctionParameter(opt::Instruction* instruction,
751 opt::Function* function) {
752 if (instruction->opcode() != spv::Op::OpFunctionParameter) {
753 return false;
754 }
755 bool found_parameter = false;
756 function->ForEachParam(
757 [instruction, &found_parameter](opt::Instruction* param) {
758 if (param == instruction) {
759 found_parameter = true;
760 }
761 });
762 return found_parameter;
763}
764
765uint32_t GetTypeId(opt::IRContext* context, uint32_t result_id) {
766 const auto* inst = context->get_def_use_mgr()->GetDef(result_id);

Callers 3

IdIsAvailableAtUseFunction · 0.85

Calls 2

ForEachParamMethod · 0.80
opcodeMethod · 0.45

Tested by

no test coverage detected