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

Method GetIteratorUpdateOperations

source/opt/loop_peeling.cpp:212–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210}
211
212void LoopPeeling::GetIteratorUpdateOperations(
213 const Loop* loop, Instruction* iterator,
214 std::unordered_set<Instruction*>* operations) {
215 analysis::DefUseManager* def_use_mgr = context_->get_def_use_mgr();
216 operations->insert(iterator);
217 iterator->ForEachInId([def_use_mgr, loop, operations, this](uint32_t* id) {
218 Instruction* insn = def_use_mgr->GetDef(*id);
219 if (insn->opcode() == spv::Op::OpLabel) {
220 return;
221 }
222 if (operations->count(insn)) {
223 return;
224 }
225 if (!loop->IsInsideLoop(insn)) {
226 return;
227 }
228 GetIteratorUpdateOperations(loop, insn, operations);
229 });
230}
231
232bool LoopPeeling::IsConditionCheckSideEffectFree() const {
233 CFG& cfg = *context_->cfg();

Callers

nothing calls this directly

Calls 7

ForEachInIdMethod · 0.80
get_def_use_mgrMethod · 0.45
insertMethod · 0.45
GetDefMethod · 0.45
opcodeMethod · 0.45
countMethod · 0.45
IsInsideLoopMethod · 0.45

Tested by

no test coverage detected