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

Method ForEachBlockInPostOrder

source/opt/cfg.cpp:105–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105void CFG::ForEachBlockInPostOrder(BasicBlock* bb,
106 const std::function<void(BasicBlock*)>& f) {
107 std::vector<BasicBlock*> po;
108 std::unordered_set<BasicBlock*> seen;
109 ComputePostOrderTraversal(bb, &po, &seen);
110
111 for (BasicBlock* current_bb : po) {
112 if (!IsPseudoExitBlock(current_bb) && !IsPseudoEntryBlock(current_bb)) {
113 f(current_bb);
114 }
115 }
116}
117
118void CFG::ForEachBlockInReversePostOrder(
119 BasicBlock* bb, const std::function<void(BasicBlock*)>& f) {

Callers 9

SetupMethod · 0.80
ProcessMethod · 0.80
ComputeMethod · 0.80
ApplyMethod · 0.80
ApplyMethod · 0.80
GetReachableReturnBlocksFunction · 0.80
TEST_FFunction · 0.80

Calls

no outgoing calls

Tested by 2

TEST_FFunction · 0.64