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 | 8771d981b9b464fa101ac06f1dc320ddb11d2eee (patch) | |
| tree | 1e2dbd5dc74b3b551f2abfb1099537b1b5bd6eeb | |
| parent | 0280a61c4e0f6008b88ea2cbf588633c5d59042f (diff) | |
| download | external_llvm-8771d981b9b464fa101ac06f1dc320ddb11d2eee.zip external_llvm-8771d981b9b464fa101ac06f1dc320ddb11d2eee.tar.gz external_llvm-8771d981b9b464fa101ac06f1dc320ddb11d2eee.tar.bz2 | |
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
| -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 f1dbbf9..2454a4e 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(); |
