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

Method ContainsBarriersOrFunctionCalls

source/opt/loop_fusion.cpp:233–249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231} // namespace opt
232
233bool LoopFusion::ContainsBarriersOrFunctionCalls(Loop* loop) {
234 for (const auto& block : loop->GetBlocks()) {
235 for (const auto& inst : *containing_function_->FindBlock(block)) {
236 auto opcode = inst.opcode();
237 if (opcode == spv::Op::OpFunctionCall ||
238 opcode == spv::Op::OpControlBarrier ||
239 opcode == spv::Op::OpMemoryBarrier ||
240 opcode == spv::Op::OpTypeNamedBarrier ||
241 opcode == spv::Op::OpNamedBarrierInitialize ||
242 opcode == spv::Op::OpMemoryNamedBarrier) {
243 return true;
244 }
245 }
246 }
247
248 return false;
249}
250
251bool LoopFusion::CheckInit() {
252 int64_t loop_0_init;

Callers

nothing calls this directly

Calls 2

FindBlockMethod · 0.80
opcodeMethod · 0.45

Tested by

no test coverage detected