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

Method WhileEachBlockInReversePostOrder

source/opt/cfg.cpp:126–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124}
125
126bool CFG::WhileEachBlockInReversePostOrder(
127 BasicBlock* bb, const std::function<bool(BasicBlock*)>& f) {
128 std::vector<BasicBlock*> po;
129 std::unordered_set<BasicBlock*> seen;
130 ComputePostOrderTraversal(bb, &po, &seen);
131
132 for (auto current_bb = po.rbegin(); current_bb != po.rend(); ++current_bb) {
133 if (!IsPseudoExitBlock(*current_bb) && !IsPseudoEntryBlock(*current_bb)) {
134 if (!f(*current_bb)) {
135 return false;
136 }
137 }
138 }
139 return true;
140}
141
142void CFG::ComputeStructuredSuccessors(Function* func) {
143 block2structured_succs_.clear();

Callers 1

Calls 2

rbeginMethod · 0.80
rendMethod · 0.80

Tested by

no test coverage detected