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

Method WhileEachInst

source/opt/basic_block.h:258–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

256}
257
258inline bool BasicBlock::WhileEachInst(
259 const std::function<bool(Instruction*)>& f, bool run_on_debug_line_insts) {
260 if (label_) {
261 if (!label_->WhileEachInst(f, run_on_debug_line_insts)) return false;
262 }
263 if (insts_.empty()) {
264 return true;
265 }
266
267 Instruction* inst = &insts_.front();
268 while (inst != nullptr) {
269 Instruction* next_instruction = inst->NextNode();
270 if (!inst->WhileEachInst(f, run_on_debug_line_insts)) return false;
271 inst = next_instruction;
272 }
273 return true;
274}
275
276inline bool BasicBlock::WhileEachInst(
277 const std::function<bool(const Instruction*)>& f,

Callers 1

WhileEachPhiInstMethod · 0.45

Calls 4

frontMethod · 0.80
NextNodeMethod · 0.80
getMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected