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

Function IsMergeOrContinue

source/fuzz/fuzzer_util.cpp:560–576  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

558}
559
560bool IsMergeOrContinue(opt::IRContext* ir_context, uint32_t block_id) {
561 bool result = false;
562 ir_context->get_def_use_mgr()->WhileEachUse(
563 block_id,
564 [&result](const opt::Instruction* use_instruction,
565 uint32_t /*unused*/) -> bool {
566 switch (use_instruction->opcode()) {
567 case spv::Op::OpLoopMerge:
568 case spv::Op::OpSelectionMerge:
569 result = true;
570 return false;
571 default:
572 return true;
573 }
574 });
575 return result;
576}
577
578uint32_t GetLoopFromMergeBlock(opt::IRContext* ir_context,
579 uint32_t merge_block_id) {

Callers 2

IsApplicableMethod · 0.85
IsApplicableMethod · 0.85

Calls 3

WhileEachUseMethod · 0.80
get_def_use_mgrMethod · 0.45
opcodeMethod · 0.45

Tested by

no test coverage detected