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

Function CheckLoopBlocks

test/opt/loop_optimizations/nested_loops.cpp:196–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

194}
195
196static void CheckLoopBlocks(Loop* loop,
197 std::unordered_set<uint32_t>* expected_ids) {
198 SCOPED_TRACE("Check loop " + std::to_string(loop->GetHeaderBlock()->id()));
199 for (uint32_t bb_id : loop->GetBlocks()) {
200 EXPECT_EQ(expected_ids->count(bb_id), 1u);
201 expected_ids->erase(bb_id);
202 }
203 EXPECT_FALSE(loop->IsInsideLoop(loop->GetMergeBlock()));
204 EXPECT_EQ(expected_ids->size(), 0u);
205}
206
207/*
208Generated from the following GLSL

Callers 1

TEST_FFunction · 0.85

Calls 8

GetMergeBlockMethod · 0.80
to_stringFunction · 0.50
idMethod · 0.45
GetHeaderBlockMethod · 0.45
countMethod · 0.45
eraseMethod · 0.45
IsInsideLoopMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected