[llvm] r245092 - [RegionInfo] Remove unused and broken function splitBlock

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 14 13:20:00 PDT 2015


Author: meinersbur
Date: Fri Aug 14 15:20:00 2015
New Revision: 245092

URL: http://llvm.org/viewvc/llvm-project?rev=245092&view=rev
Log:
[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

Modified:
    llvm/trunk/include/llvm/Analysis/RegionInfo.h
    llvm/trunk/include/llvm/Analysis/RegionInfoImpl.h

Modified: llvm/trunk/include/llvm/Analysis/RegionInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/RegionInfo.h?rev=245092&r1=245091&r2=245092&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/RegionInfo.h (original)
+++ llvm/trunk/include/llvm/Analysis/RegionInfo.h Fri Aug 14 15:20:00 2015
@@ -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()

Modified: llvm/trunk/include/llvm/Analysis/RegionInfoImpl.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/RegionInfoImpl.h?rev=245092&r1=245091&r2=245092&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/RegionInfoImpl.h (original)
+++ llvm/trunk/include/llvm/Analysis/RegionInfoImpl.h Fri Aug 14 15:20:00 2015
@@ -911,20 +911,6 @@ RegionInfoBase<Tr>::getCommonRegion(Smal
 }
 
 template <class Tr>
-void RegionInfoBase<Tr>::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 <class Tr>
 void RegionInfoBase<Tr>::calculate(FuncT &F) {
   typedef typename std::add_pointer<FuncT>::type FuncPtrT;
 




More information about the llvm-commits mailing list