Index: lib/Transform/IndependentBlocks.cpp =================================================================== --- lib/Transform/IndependentBlocks.cpp +++ lib/Transform/IndependentBlocks.cpp @@ -128,7 +128,6 @@ bool areAllBlocksIndependent(const Region *R) const; // Split the exit block to hold load instructions. - bool splitExitBlock(Region *R); bool onlyUsedInRegion(Instruction *Inst, const Region *R); bool translateScalarToArray(BasicBlock *BB, const Region *R); bool translateScalarToArray(Instruction *Inst, const Region *R); @@ -318,34 +317,6 @@ return R->contains(OpInst) && (OpInst->getParent() != CurBB); } -bool IndependentBlocks::splitExitBlock(Region *R) { - // Split the exit BB to place the load instruction of escaped users. - BasicBlock *ExitBB = R->getExit(); - Region *ExitRegion = RI->getRegionFor(ExitBB); - - if (ExitBB != ExitRegion->getEntry()) - return false; - - BasicBlock *NewExit = createSingleExitEdge(R, this); - - std::vector toUpdate; - toUpdate.push_back(R); - - while (!toUpdate.empty()) { - Region *R = toUpdate.back(); - toUpdate.pop_back(); - - for (auto &&SubRegion : *R) - if (SubRegion->getExit() == ExitBB) - toUpdate.push_back(SubRegion.get()); - - R->replaceExit(NewExit); - } - - RI->setRegionFor(NewExit, R->getParent()); - return true; -} - bool IndependentBlocks::translateScalarToArray(const Region *R) { bool Changed = false;