Lines Matching defs:block
38 // Because such algorithms visit a block only after traversing some path to it
39 // from the root, they necessarily visit the block's idom first.
60 // Traverses CFG in a readable order, invoking a pre-set callback on each block.
61 // Use by calling visit() on the root block.
66 // Visits the block if it hasn't been visited already and isn't currently
67 // being delayed. Invokes callback(block, why, header), then descends into its
68 // successors. Delays merge-block and continue-block processing until all
69 // the branches have been completed. If |block| is an unreachable merge block or
70 // an unreachable continue target, then |header| is the corresponding header block.
71 void visit(Block* block, spv::ReachReason why, Block* header)
73 assert(block);
75 reachableViaControlFlow_.insert(block);
77 if (visited_.count(block) || delayed_.count(block))
79 callback_(block, why, header);
80 visited_.insert(block);
83 auto mergeInst = block->getMergeInstruction();
86 mergeBlock = block->getParent().getParent().getInstruction(mergeId)->getBlock();
91 block->getParent().getParent().getInstruction(continueId)->getBlock();
96 const auto& successors = block->getSuccessors();
106 visit(continueBlock, continueWhy, block);
114 visit(mergeBlock, mergeWhy, block);
120 // Whether a block has already been visited or is being delayed.