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

Method AreAllOperandsOutsideLoop

source/opt/loop_descriptor.cpp:462–471  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

460}
461
462bool Loop::AreAllOperandsOutsideLoop(const Instruction& inst) const {
463 analysis::DefUseManager* def_use_mgr = GetContext()->get_def_use_mgr();
464
465 const std::function<bool(const uint32_t*)> operand_outside_loop =
466 [this, &def_use_mgr](const uint32_t* id) {
467 return !this->IsInsideLoop(def_use_mgr->GetDef(*id));
468 };
469
470 return inst.WhileEachInId(operand_outside_loop);
471}
472
473void Loop::ComputeLoopStructuredOrder(
474 std::vector<BasicBlock*>* ordered_loop_blocks, bool include_pre_header,

Callers

nothing calls this directly

Calls 4

IsInsideLoopMethod · 0.95
WhileEachInIdMethod · 0.80
get_def_use_mgrMethod · 0.45
GetDefMethod · 0.45

Tested by

no test coverage detected