Lines Matching refs:srcBlk

368   int getSCCNum(BlockT *srcBlk);
1503 void CFGStructurizer<PassT>::mergeSerialBlock(BlockT *dstBlk, BlockT *srcBlk) { in mergeSerialBlock() argument
1506 << " <= BB" << srcBlk->getNumber() << "\n"; in mergeSerialBlock()
1509 dstBlk->splice(dstBlk->end(), srcBlk, FirstNonDebugInstr(srcBlk), srcBlk->end()); in mergeSerialBlock()
1511 dstBlk->removeSuccessor(srcBlk); in mergeSerialBlock()
1512 CFGTraits::cloneSuccessorList(dstBlk, srcBlk); in mergeSerialBlock()
1514 removeSuccessor(srcBlk); in mergeSerialBlock()
1515 retireBlock(dstBlk, srcBlk); in mergeSerialBlock()
1998 CFGStructurizer<PassT>::singlePathTo(BlockT *srcBlk, BlockT *dstBlk, in singlePathTo() argument
2002 if (srcBlk == dstBlk) { in singlePathTo()
2006 while (srcBlk && srcBlk->succ_size() == 1) { in singlePathTo()
2007 srcBlk = *srcBlk->succ_begin(); in singlePathTo()
2008 if (srcBlk == dstBlk) { in singlePathTo()
2012 if (!allowSideEntry && srcBlk->pred_size() > 1) { in singlePathTo()
2017 if (srcBlk && srcBlk->succ_size()==0) { in singlePathTo()
2029 CFGStructurizer<PassT>::singlePathEnd(BlockT *srcBlk, BlockT *dstBlk, in singlePathEnd() argument
2033 if (srcBlk == dstBlk) { in singlePathEnd()
2034 return srcBlk; in singlePathEnd()
2037 if (srcBlk->succ_size() == 0) { in singlePathEnd()
2038 return srcBlk; in singlePathEnd()
2041 while (srcBlk && srcBlk->succ_size() == 1) { in singlePathEnd()
2042 BlockT *preBlk = srcBlk; in singlePathEnd()
2044 srcBlk = *srcBlk->succ_begin(); in singlePathEnd()
2045 if (srcBlk == NULL) { in singlePathEnd()
2049 if (!allowSideEntry && srcBlk->pred_size() > 1) { in singlePathEnd()
2054 if (srcBlk && srcBlk->succ_size()==0) { in singlePathEnd()
2055 return srcBlk; in singlePathEnd()
2063 int CFGStructurizer<PassT>::cloneOnSideEntryTo(BlockT *preBlk, BlockT *srcBlk, in cloneOnSideEntryTo() argument
2066 assert(preBlk->isSuccessor(srcBlk)); in cloneOnSideEntryTo()
2067 while (srcBlk && srcBlk != dstBlk) { in cloneOnSideEntryTo()
2068 assert(srcBlk->succ_size() == 1); in cloneOnSideEntryTo()
2069 if (srcBlk->pred_size() > 1) { in cloneOnSideEntryTo()
2070 srcBlk = cloneBlockForPredecessor(srcBlk, preBlk); in cloneOnSideEntryTo()
2074 preBlk = srcBlk; in cloneOnSideEntryTo()
2075 srcBlk = *srcBlk->succ_begin(); in cloneOnSideEntryTo()
2132 void CFGStructurizer<PassT>::migrateInstruction(BlockT *srcBlk, in migrateInstruction() argument
2137 InstrT *branchInstr = CFGTraits::getNormalBlockBranchInstr(srcBlk); in migrateInstruction()
2142 spliceEnd = srcBlk->end(); in migrateInstruction()
2148 spliceEnd = CFGTraits::getInstrPos(srcBlk, branchInstr); in migrateInstruction()
2152 << "srcSize = " << srcBlk->size() << "\n"; in migrateInstruction()
2156 dstBlk->splice(insertPos, srcBlk, srcBlk->begin(), spliceEnd); in migrateInstruction()
2160 << "srcSize = " << srcBlk->size() << "\n"; in migrateInstruction()
2211 void CFGStructurizer<PassT>::removeUnconditionalBranch(BlockT *srcBlk) { in removeUnconditionalBranch() argument
2216 while ((branchInstr = CFGTraits::getLoopendBlockBranchInstr(srcBlk)) in removeUnconditionalBranch()
2227 void CFGStructurizer<PassT>::removeRedundantConditionalBranch(BlockT *srcBlk) { in removeRedundantConditionalBranch() argument
2228 if (srcBlk->succ_size() == 2) { in removeRedundantConditionalBranch()
2229 BlockT *blk1 = *srcBlk->succ_begin(); in removeRedundantConditionalBranch()
2230 BlockT *blk2 = *(++srcBlk->succ_begin()); in removeRedundantConditionalBranch()
2233 InstrT *branchInstr = CFGTraits::getNormalBlockBranchInstr(srcBlk); in removeRedundantConditionalBranch()
2241 srcBlk->removeSuccessor(blk1); in removeRedundantConditionalBranch()
2283 void CFGStructurizer<PassT>::removeSuccessor(BlockT *srcBlk) { in removeSuccessor() argument
2284 while (srcBlk->succ_size()) { in removeSuccessor()
2285 srcBlk->removeSuccessor(*srcBlk->succ_begin()); in removeSuccessor()
2290 void CFGStructurizer<PassT>::recordSccnum(BlockT *srcBlk, int sccNum) { in recordSccnum() argument
2291 BlockInfo *&srcBlkInfo = blockInfoMap[srcBlk]; in recordSccnum()
2301 int CFGStructurizer<PassT>::getSCCNum(BlockT *srcBlk) { in getSCCNum() argument
2302 BlockInfo *srcBlkInfo = blockInfoMap[srcBlk]; in getSCCNum()
2307 void CFGStructurizer<PassT>::retireBlock(BlockT *dstBlk, BlockT *srcBlk) { in retireBlock() argument
2309 errs() << "Retiring BB" << srcBlk->getNumber() << "\n"; in retireBlock()
2312 BlockInfo *&srcBlkInfo = blockInfoMap[srcBlk]; in retireBlock()
2321 assert(srcBlk->succ_size() == 0 && srcBlk->pred_size() == 0 in retireBlock()
2326 bool CFGStructurizer<PassT>::isRetiredBlock(BlockT *srcBlk) { in isRetiredBlock() argument
2327 BlockInfo *srcBlkInfo = blockInfoMap[srcBlk]; in isRetiredBlock()
3167 MachineBasicBlock *srcBlk) { in cloneSuccessorList()
3168 for (MachineBasicBlock::succ_iterator iter = srcBlk->succ_begin(), in cloneSuccessorList()
3169 iterEnd = srcBlk->succ_end(); iter != iterEnd; ++iter) { in cloneSuccessorList()
3174 static MachineBasicBlock *clone(MachineBasicBlock *srcBlk) { in clone()
3175 MachineFunction *func = srcBlk->getParent(); in clone()
3179 for (MachineBasicBlock::iterator iter = srcBlk->begin(), in clone()
3180 iterEnd = srcBlk->end(); in clone()
3191 static void replaceInstrUseOfBlockWith(MachineBasicBlock *srcBlk, in replaceInstrUseOfBlockWith()
3194 MachineInstr *branchInstr = getLoopendBlockBranchInstr(srcBlk); in replaceInstrUseOfBlockWith()