[llvm-commits] [llvm] r41228 - in /llvm/trunk: include/llvm/Analysis/LoopInfo.h lib/Analysis/LoopInfo.cpp

Devang Patel dpatel at apple.com
Tue Aug 21 09:39:43 PDT 2007


Author: dpatel
Date: Tue Aug 21 11:39:43 2007
New Revision: 41228

URL: http://llvm.org/viewvc/llvm-project?rev=41228&view=rev
Log:
No need to hardcode SmallVector size.


Modified:
    llvm/trunk/include/llvm/Analysis/LoopInfo.h
    llvm/trunk/lib/Analysis/LoopInfo.cpp

Modified: llvm/trunk/include/llvm/Analysis/LoopInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/LoopInfo.h?rev=41228&r1=41227&r2=41228&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Analysis/LoopInfo.h (original)
+++ llvm/trunk/include/llvm/Analysis/LoopInfo.h Tue Aug 21 11:39:43 2007
@@ -112,18 +112,18 @@
   /// outside of the loop.  These are the blocks _inside of the current loop_
   /// which branch out.  The returned list is always unique.
   ///
-  void getExitingBlocks(SmallVector<BasicBlock *, 8> &Blocks) const;
+  void getExitingBlocks(SmallVectorImpl<BasicBlock *> &Blocks) const;
 
   /// getExitBlocks - Return all of the successor blocks of this loop.  These
   /// are the blocks _outside of the current loop_ which are branched to.
   ///
-  void getExitBlocks(SmallVector<BasicBlock*, 8> &Blocks) const;
+  void getExitBlocks(SmallVectorImpl<BasicBlock* > &Blocks) const;
 
   /// getUniqueExitBlocks - Return all unique successor blocks of this loop. 
   /// These are the blocks _outside of the current loop_ which are branched to.
   /// This assumes that loop is in canonical form.
   ///
-  void getUniqueExitBlocks(SmallVector<BasicBlock*, 8> &ExitBlocks) const;
+  void getUniqueExitBlocks(SmallVectorImpl<BasicBlock*> &ExitBlocks) const;
 
   /// getLoopPreheader - If there is a preheader for this loop, return it.  A
   /// loop has a preheader if there is only one edge to the header of the loop

Modified: llvm/trunk/lib/Analysis/LoopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopInfo.cpp?rev=41228&r1=41227&r2=41228&view=diff

==============================================================================
--- llvm/trunk/lib/Analysis/LoopInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/LoopInfo.cpp Tue Aug 21 11:39:43 2007
@@ -350,7 +350,7 @@
 /// outside of the loop.  These are the blocks _inside of the current loop_
 /// which branch out.  The returned list is always unique.
 ///
-void Loop::getExitingBlocks(SmallVector<BasicBlock*, 8> &ExitingBlocks) const {
+void Loop::getExitingBlocks(SmallVectorImpl<BasicBlock*> &ExitingBlocks) const {
   // Sort the blocks vector so that we can use binary search to do quick
   // lookups.
   std::vector<BasicBlock*> LoopBBs(block_begin(), block_end());
@@ -369,7 +369,7 @@
 /// getExitBlocks - Return all of the successor blocks of this loop.  These
 /// are the blocks _outside of the current loop_ which are branched to.
 ///
-void Loop::getExitBlocks(SmallVector<BasicBlock*, 8> &ExitBlocks) const {
+void Loop::getExitBlocks(SmallVectorImpl<BasicBlock*> &ExitBlocks) const {
   // Sort the blocks vector so that we can use binary search to do quick
   // lookups.
   std::vector<BasicBlock*> LoopBBs(block_begin(), block_end());
@@ -387,7 +387,7 @@
 /// are the blocks _outside of the current loop_ which are branched to. This
 /// assumes that loop is in canonical form.
 //
-void Loop::getUniqueExitBlocks(SmallVector<BasicBlock*, 8> &ExitBlocks) const {
+void Loop::getUniqueExitBlocks(SmallVectorImpl<BasicBlock*> &ExitBlocks) const {
   // Sort the blocks vector so that we can use binary search to do quick
   // lookups.
   std::vector<BasicBlock*> LoopBBs(block_begin(), block_end());





More information about the llvm-commits mailing list