Home | History | Annotate | Download | only in Utils

Lines Matching refs:Blocks

68 /// \brief Build a set of blocks to extract if the input blocks are viable.
76 // Loop over the blocks, adding them to our set-vector, and aborting with an
77 // empty set if we encounter invalid blocks.
80 llvm_unreachable("Repeated basic blocks in extraction input");
95 "No blocks in this region may have entries from outside the region"
122 Blocks(buildExtractionBlockSet(BB)), NumExitBlocks(~0U) {}
127 Blocks(buildExtractionBlockSet(BBs)), NumExitBlocks(~0U) {}
131 Blocks(buildExtractionBlockSet(L.getBlocks())), NumExitBlocks(~0U) {}
136 Blocks(buildExtractionBlockSet(RN)), NumExitBlocks(~0U) {}
140 static bool definedInRegion(const SetVector<BasicBlock *> &Blocks, Value *V) {
142 if (Blocks.count(I->getParent()))
150 static bool definedInCaller(const SetVector<BasicBlock *> &Blocks, Value *V) {
153 if (!Blocks.count(I->getParent()))
160 for (SetVector<BasicBlock *>::const_iterator I = Blocks.begin(),
161 E = Blocks.end();
171 if (definedInCaller(Blocks, *OI))
176 if (!definedInRegion(Blocks, *UI)) {
199 if (Blocks.count(PN->getIncomingBlock(i)))
220 Blocks.remove(OldPred);
221 Blocks.insert(NewBB);
224 // Okay, update dominator sets. The blocks that dominate the new one are the
225 // blocks that dominate TIBB plus the new block itself.
236 if (Blocks.count(PN->getIncomingBlock(i))) {
254 if (Blocks.count(PN->getIncomingBlock(i))) {
265 for (SetVector<BasicBlock *>::iterator I = Blocks.begin(), E = Blocks.end();
376 if (Blocks.count(inst->getParent()))
389 // Rewrite branches to basic blocks outside of the loop to new dummy blocks
391 // blocks were originally in the code region.
397 if (!Blocks.count(TI->getParent()) &&
508 if (!Blocks.count(inst->getParent()))
520 // over all of the blocks in the extracted region, updating any terminator
521 // instructions in the to-be-extracted region that branch to blocks that are
526 for (SetVector<BasicBlock*>::const_iterator i = Blocks.begin(),
527 e = Blocks.end(); i != e; ++i) {
530 if (!Blocks.count(TI->getSuccessor(i))) {
675 Function *oldFunc = (*Blocks.begin())->getParent();
679 for (SetVector<BasicBlock*>::const_iterator i = Blocks.begin(),
680 e = Blocks.end(); i != e; ++i) {
681 // Delete the basic block from the old function, and the list of blocks
697 BasicBlock *header = *Blocks.begin();
702 // If we have any return instructions in the region, split those blocks so
723 for (SetVector<BasicBlock *>::iterator I = Blocks.begin(), E = Blocks.end();
726 if (!Blocks.count(*SI))
745 if (!Blocks.count(PN->getIncomingBlock(i)))
749 // Look at all successors of the codeReplacer block. If any of these blocks
759 if (Blocks.count(PN->getIncomingBlock(i))) {