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

Method ForMergeAndContinueLabel

source/opt/basic_block.cpp:172–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170}
171
172void BasicBlock::ForMergeAndContinueLabel(
173 const std::function<void(const uint32_t)>& f) {
174 auto ii = insts_.end();
175 --ii;
176 if (ii == insts_.begin()) return;
177 --ii;
178 if (ii->opcode() == spv::Op::OpSelectionMerge ||
179 ii->opcode() == spv::Op::OpLoopMerge) {
180 ii->ForEachInId([&f](const uint32_t* idp) { f(*idp); });
181 }
182}
183
184uint32_t BasicBlock::MergeBlockIdIfAny() const {
185 auto merge_ii = cend();

Callers 1

Calls 4

ForEachInIdMethod · 0.80
endMethod · 0.45
beginMethod · 0.45
opcodeMethod · 0.45

Tested by

no test coverage detected