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();
// 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;
if (programName[0] == '%' && programName.length() >2) {
switch(programName[1]){
case 'b':
- if (programName.substr(0,8) == "%bindir%") {
- std::string tmp(LLVM_BINDIR);
- tmp.append(programName.substr(8));
- pat->program.set(tmp);
- }
- break;
+ if (programName.substr(0,8) == "%bindir%") {
+ std::string tmp(LLVM_BINDIR);
+ tmp.append(programName.substr(8));
+ pat->program.set(tmp);
+ }
+ break;
case 'l':
- if (programName.substr(0,12) == "%llvmgccdir%"){
- std::string tmp(LLVMGCCDIR);
- tmp.append(programName.substr(12));
- pat->program.set(tmp);
- }else if (programName.substr(0,13) == "%llvmgccarch%"){
- std::string tmp(LLVMGCCARCH);
- tmp.append(programName.substr(13));
- pat->program.set(tmp);
- }else if (programName.substr(0,9) == "%llvmgcc%"){
- std::string tmp(LLVMGCC);
- tmp.append(programName.substr(9));
- pat->program.set(tmp);
- }else if (programName.substr(0,9) == "%llvmgxx%"){
- std::string tmp(LLVMGXX);
- tmp.append(programName.substr(9));
- pat->program.set(tmp);
- }else if (programName.substr(0,9) == "%llvmcc1%"){
- std::string tmp(LLVMCC1);
- tmp.append(programName.substr(9));
- pat->program.set(tmp);
- }else if (programName.substr(0,13) == "%llvmcc1plus%"){
- std::string tmp(LLVMCC1PLUS);
- tmp.append(programName.substr(13));
- pat->program.set(tmp);
- }else if (programName.substr(0,8) == "%libdir%") {
- std::string tmp(LLVM_LIBDIR);
- tmp.append(programName.substr(8));
- pat->program.set(tmp);
- }
- break;
+ if (programName.substr(0,12) == "%llvmgccdir%"){
+ std::string tmp(LLVMGCCDIR);
+ tmp.append(programName.substr(12));
+ pat->program.set(tmp);
+ }else if (programName.substr(0,13) == "%llvmgccarch%"){
+ std::string tmp(LLVMGCCARCH);
+ tmp.append(programName.substr(13));
+ pat->program.set(tmp);
+ }else if (programName.substr(0,9) == "%llvmgcc%"){
+ std::string tmp(LLVMGCC);
+ tmp.append(programName.substr(9));
+ pat->program.set(tmp);
+ }else if (programName.substr(0,9) == "%llvmgxx%"){
+ std::string tmp(LLVMGXX);
+ tmp.append(programName.substr(9));
+ pat->program.set(tmp);
+ }else if (programName.substr(0,9) == "%llvmcc1%"){
+ std::string tmp(LLVMCC1);
+ tmp.append(programName.substr(9));
+ pat->program.set(tmp);
+ }else if (programName.substr(0,13) == "%llvmcc1plus%"){
+ std::string tmp(LLVMCC1PLUS);
+ tmp.append(programName.substr(13));
+ pat->program.set(tmp);
+ }else if (programName.substr(0,8) == "%libdir%") {
+ std::string tmp(LLVM_LIBDIR);
+ tmp.append(programName.substr(8));
+ pat->program.set(tmp);
+ }
+ break;
}
}
action->program = pat->program;