diff options
author | Bill Wendling <isanbard@gmail.com> | 2008-02-26 10:46:10 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2008-02-26 10:46:10 +0000 |
commit | 8ff432007147127d6b337fe87d758ea892f424a5 (patch) | |
tree | c0eb1735adfab100a286610661d928667f7635fa /llvm/tools/bugpoint/ListReducer.h | |
parent | e65d2afdb10a7d07c1cad45a576dfbdda5afa461 (diff) | |
download | bcm5719-llvm-8ff432007147127d6b337fe87d758ea892f424a5.tar.gz bcm5719-llvm-8ff432007147127d6b337fe87d758ea892f424a5.zip |
Detabify.
llvm-svn: 47596
Diffstat (limited to 'llvm/tools/bugpoint/ListReducer.h')
-rw-r--r-- | llvm/tools/bugpoint/ListReducer.h | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/llvm/tools/bugpoint/ListReducer.h b/llvm/tools/bugpoint/ListReducer.h index cd629da3457..de3f3892001 100644 --- a/llvm/tools/bugpoint/ListReducer.h +++ b/llvm/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; |