[llvm-commits] [llvm] r104278 - /llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp

Dan Gohman gohman at apple.com
Thu May 20 13:59:23 PDT 2010


Author: djg
Date: Thu May 20 15:59:23 2010
New Revision: 104278

URL: http://llvm.org/viewvc/llvm-project?rev=104278&view=rev
Log:
Make Solve check its own post-condition, to reduce clutter in the
top-level LSRInstance logic.

Modified:
    llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp?rev=104278&r1=104277&r2=104278&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Thu May 20 15:59:23 2010
@@ -3109,6 +3109,8 @@
           Solution[i]->print(dbgs());
           dbgs() << '\n';
         });
+
+  assert(Solution.size() == Uses.size() && "Malformed solution!");
 }
 
 /// HoistInsertPosition - Helper for AdjustInsertPositionForExpand. Climb up
@@ -3547,7 +3549,6 @@
 
   SmallVector<const Formula *, 8> Solution;
   Solve(Solution);
-  assert(Solution.size() == Uses.size() && "Malformed solution!");
 
   // Release memory that is no longer needed.
   Factors.clear();





More information about the llvm-commits mailing list