From: Michael Kruse Date: Fri, 14 Aug 2015 20:20:00 +0000 (+0000) Subject: [RegionInfo] Remove unused and broken function splitBlock X-Git-Tag: android-x86-7.1-r4~44582 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=87e0087082d1033f384af361ef18c2e1416e2440;p=android-x86%2Fexternal-llvm.git [RegionInfo] Remove unused and broken function splitBlock Summary: It always makes NewBB the entry of the region instead of OldBB. This breaks if there are edges from inside the region to OldBB. OldBB is moved out of the region and hence there are exiting edges to OldBB and the region's exit block, contradicting the single-exit condition for regions. The only use from Polly is going to be removed, hence I propose to remove the function completely. Reviewers: grosser Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11873 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245092 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Analysis/RegionInfo.h b/include/llvm/Analysis/RegionInfo.h index 8d1739a679b..4988386fdc8 100644 --- a/include/llvm/Analysis/RegionInfo.h +++ b/include/llvm/Analysis/RegionInfo.h @@ -800,12 +800,6 @@ public: RegionT *getTopLevelRegion() const { return TopLevelRegion; } - /// @brief Update RegionInfo after a basic block was split. - /// - /// @param NewBB The basic block that was created before OldBB. - /// @param OldBB The old basic block. - void splitBlock(BlockT *NewBB, BlockT *OldBB); - /// @brief Clear the Node Cache for all Regions. /// /// @see Region::clearNodeCache() diff --git a/include/llvm/Analysis/RegionInfoImpl.h b/include/llvm/Analysis/RegionInfoImpl.h index a5157a92cf4..0598068d69d 100644 --- a/include/llvm/Analysis/RegionInfoImpl.h +++ b/include/llvm/Analysis/RegionInfoImpl.h @@ -911,20 +911,6 @@ RegionInfoBase::getCommonRegion(SmallVectorImpl &BBs) const { } template -void RegionInfoBase::splitBlock(BlockT *NewBB, BlockT *OldBB) { - RegionT *R = getRegionFor(OldBB); - - setRegionFor(NewBB, R); - - while (R->getEntry() == OldBB && !R->isTopLevelRegion()) { - R->replaceEntry(NewBB); - R = R->getParent(); - } - - setRegionFor(OldBB, R); -} - -template void RegionInfoBase::calculate(FuncT &F) { typedef typename std::add_pointer::type FuncPtrT;