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

Function ControlFlowPass

source/val/validate_cfg.cpp:1280–1309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1278}
1279
1280spv_result_t ControlFlowPass(ValidationState_t& _, const Instruction* inst) {
1281 switch (inst->opcode()) {
1282 case spv::Op::OpPhi:
1283 if (auto error = ValidatePhi(_, inst)) return error;
1284 break;
1285 case spv::Op::OpBranch:
1286 if (auto error = ValidateBranch(_, inst)) return error;
1287 break;
1288 case spv::Op::OpBranchConditional:
1289 if (auto error = ValidateBranchConditional(_, inst)) return error;
1290 break;
1291 case spv::Op::OpReturnValue:
1292 if (auto error = ValidateReturnValue(_, inst)) return error;
1293 break;
1294 case spv::Op::OpSwitch:
1295 if (auto error = ValidateSwitch(_, inst)) return error;
1296 break;
1297 case spv::Op::OpLoopMerge:
1298 if (auto error = ValidateLoopMerge(_, inst)) return error;
1299 break;
1300 case spv::Op::OpLifetimeStart:
1301 case spv::Op::OpLifetimeStop:
1302 if (auto error = ValidateLifetime(_, inst)) return error;
1303 break;
1304 default:
1305 break;
1306 }
1307
1308 return SPV_SUCCESS;
1309}
1310
1311} // namespace val
1312} // namespace spvtools

Calls 8

ValidatePhiFunction · 0.85
ValidateBranchFunction · 0.85
ValidateReturnValueFunction · 0.85
ValidateSwitchFunction · 0.85
ValidateLoopMergeFunction · 0.85
ValidateLifetimeFunction · 0.85
opcodeMethod · 0.45

Tested by

no test coverage detected