diff options
author | Dan Gohman <gohman@apple.com> | 2010-05-20 20:59:23 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-05-20 20:59:23 +0000 |
commit | a5528785089bfd093a36cbc2eddcc35980c5340e (patch) | |
tree | 1e2dbd5dc74b3b551f2abfb1099537b1b5bd6eeb /lib/Transforms/Scalar/LoopStrengthReduce.cpp | |
parent | 76c315a26c9c6eb51fca2d88ee756094bed3b846 (diff) |
Make Solve check its own post-condition, to reduce clutter in the
top-level LSRInstance logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104278 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LoopStrengthReduce.cpp')
-rw-r--r-- | lib/Transforms/Scalar/LoopStrengthReduce.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp index f1dbbf9529..2454a4e01f 100644 --- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -3109,6 +3109,8 @@ void LSRInstance::Solve(SmallVectorImpl<const Formula *> &Solution) const { Solution[i]->print(dbgs()); dbgs() << '\n'; }); + + assert(Solution.size() == Uses.size() && "Malformed solution!"); } /// HoistInsertPosition - Helper for AdjustInsertPositionForExpand. Climb up @@ -3547,7 +3549,6 @@ LSRInstance::LSRInstance(const TargetLowering *tli, Loop *l, Pass *P) SmallVector<const Formula *, 8> Solution; Solve(Solution); - assert(Solution.size() == Uses.size() && "Malformed solution!"); // Release memory that is no longer needed. Factors.clear(); |