| 210 | } |
| 211 | |
| 212 | void 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 | |
| 232 | bool LoopPeeling::IsConditionCheckSideEffectFree() const { |
| 233 | CFG& cfg = *context_->cfg(); |
nothing calls this directly
no test coverage detected