aboutsummaryrefslogtreecommitdiffstats
path: root/tools/bugpoint/ListReducer.h
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2008-02-26 10:46:10 +0000
committerBill Wendling <isanbard@gmail.com>2008-02-26 10:46:10 +0000
commit584c3bf6504ec0e56c54bbf02fce2d2bd1e6c0e1 (patch)
treeabf5ef0a8cbe0fe0f48ef9ad5fdc72f79451efcc /tools/bugpoint/ListReducer.h
parent27926af8285b194df04db2b9a1e38ec1e570c9ac (diff)
downloadexternal_llvm-584c3bf6504ec0e56c54bbf02fce2d2bd1e6c0e1.zip
external_llvm-584c3bf6504ec0e56c54bbf02fce2d2bd1e6c0e1.tar.gz
external_llvm-584c3bf6504ec0e56c54bbf02fce2d2bd1e6c0e1.tar.bz2
Detabify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47596 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/bugpoint/ListReducer.h')
-rw-r--r--tools/bugpoint/ListReducer.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/tools/bugpoint/ListReducer.h b/tools/bugpoint/ListReducer.h
index cd629da..de3f389 100644
--- a/tools/bugpoint/ListReducer.h
+++ b/tools/bugpoint/ListReducer.h
@@ -80,18 +80,17 @@ Backjump:
std::cerr << "\n\n*** Reduction Interrupted, cleaning up...\n\n";
return true;
}
-
+
// If the loop doesn't make satisfying progress, try shuffling.
// The purpose of shuffling is to avoid the heavy tails of the
// distribution (improving the speed of convergence).
if (ShufflingEnabled &&
- NumOfIterationsWithoutProgress > MaxIterations) {
-
- std::vector<ElTy> ShuffledList(TheList);
- std::random_shuffle(ShuffledList.begin(), ShuffledList.end());
- std::cerr << "\n\n*** Testing shuffled set...\n\n";
- // Check that random shuffle doesn't loose the bug
- if (doTest(ShuffledList, empty) == KeepPrefix) {
+ NumOfIterationsWithoutProgress > MaxIterations) {
+ std::vector<ElTy> ShuffledList(TheList);
+ std::random_shuffle(ShuffledList.begin(), ShuffledList.end());
+ std::cerr << "\n\n*** Testing shuffled set...\n\n";
+ // Check that random shuffle doesn't loose the bug
+ if (doTest(ShuffledList, empty) == KeepPrefix) {
// If the bug is still here, use the shuffled list.
TheList.swap(ShuffledList);
MidTop = TheList.size();
@@ -99,11 +98,11 @@ Backjump:
// probability of inifinite looping without making progress.
MaxIterations += 2;
std::cerr << "\n\n*** Shuffling does not hide the bug...\n\n";
- } else {
+ } else {
ShufflingEnabled = false; // Disable shuffling further on
std::cerr << "\n\n*** Shuffling hides the bug...\n\n";
- }
- NumOfIterationsWithoutProgress = 0;
+ }
+ NumOfIterationsWithoutProgress = 0;
}
unsigned Mid = MidTop / 2;