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

Method ContinueBlockIdIfAny

source/opt/basic_block.cpp:206–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204}
205
206uint32_t BasicBlock::ContinueBlockIdIfAny() const {
207 auto merge_ii = cend();
208 --merge_ii;
209 uint32_t cbid = 0;
210 if (merge_ii != cbegin()) {
211 --merge_ii;
212 if (merge_ii->opcode() == spv::Op::OpLoopMerge) {
213 cbid = merge_ii->GetSingleWordInOperand(kLoopMergeContinueBlockIdInIdx);
214 }
215 }
216 return cbid;
217}
218
219uint32_t BasicBlock::ContinueBlockId() const {
220 uint32_t cbid = ContinueBlockIdIfAny();

Callers 5

MarkLiveBlocksMethod · 0.80
ShrinkOriginalRegionMethod · 0.80

Calls 2

opcodeMethod · 0.45

Tested by

no test coverage detected