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

Method RegisterSelectionMerge

source/val/function.cpp:99–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99spv_result_t Function::RegisterSelectionMerge(uint32_t merge_id) {
100 RegisterBlock(merge_id, false);
101 BasicBlock& merge_block = blocks_.at(merge_id);
102 current_block_->set_type(kBlockTypeSelection);
103 merge_block.set_type(kBlockTypeMerge);
104 merge_block_header_[&merge_block] = current_block_;
105 current_block_->RegisterStructuralSuccessor(&merge_block);
106
107 AddConstruct({ConstructType::kSelection, current_block(), &merge_block});
108
109 return SPV_SUCCESS;
110}
111
112spv_result_t Function::RegisterSetFunctionDeclType(FunctionDecl type) {
113 assert(declaration_type_ == FunctionDecl::kFunctionDeclUnknown);

Callers 1

CfgPassFunction · 0.80

Calls 2

set_typeMethod · 0.80

Tested by

no test coverage detected