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 | 584c3bf6504ec0e56c54bbf02fce2d2bd1e6c0e1 (patch) | |
tree | abf5ef0a8cbe0fe0f48ef9ad5fdc72f79451efcc | |
parent | 27926af8285b194df04db2b9a1e38ec1e570c9ac (diff) | |
download | external_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
-rw-r--r-- | tools/bugpoint/BugDriver.cpp | 2 | ||||
-rw-r--r-- | tools/bugpoint/ListReducer.h | 21 | ||||
-rw-r--r-- | tools/bugpoint/OptimizerDriver.cpp | 2 | ||||
-rw-r--r-- | tools/llvmc/CompilerDriver.cpp | 72 | ||||
-rw-r--r-- | tools/llvmc/Configuration.cpp | 14 |
5 files changed, 55 insertions, 56 deletions
diff --git a/tools/bugpoint/BugDriver.cpp b/tools/bugpoint/BugDriver.cpp index 3fbe589..acea37e 100644 --- a/tools/bugpoint/BugDriver.cpp +++ b/tools/bugpoint/BugDriver.cpp @@ -184,7 +184,7 @@ bool BugDriver::run() { if (ReferenceOutputFile.empty()) { std::cout << "Generating reference output from raw program: "; if(!createReferenceFile(Program)){ - return debugCodeGeneratorCrash(); + return debugCodeGeneratorCrash(); } CreatedOutput = true; } 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; diff --git a/tools/bugpoint/OptimizerDriver.cpp b/tools/bugpoint/OptimizerDriver.cpp index 9ebc200..b08171b 100644 --- a/tools/bugpoint/OptimizerDriver.cpp +++ b/tools/bugpoint/OptimizerDriver.cpp @@ -157,7 +157,7 @@ bool BugDriver::runPasses(const std::vector<const PassInfo*> &Passes, // setup the child process' arguments const char** args = (const char**) alloca(sizeof(const char*) * - (Passes.size()+13+2*PluginLoader::getNumPlugins()+NumExtraArgs)); + (Passes.size()+13+2*PluginLoader::getNumPlugins()+NumExtraArgs)); int n = 0; sys::Path tool = sys::Program::FindProgramByName(ToolName); if (UseValgrind) { diff --git a/tools/llvmc/CompilerDriver.cpp b/tools/llvmc/CompilerDriver.cpp index 30556f0..65684d6 100644 --- a/tools/llvmc/CompilerDriver.cpp +++ b/tools/llvmc/CompilerDriver.cpp @@ -259,43 +259,43 @@ private: 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; diff --git a/tools/llvmc/Configuration.cpp b/tools/llvmc/Configuration.cpp index 1aa047d..0e05e76 100644 --- a/tools/llvmc/Configuration.cpp +++ b/tools/llvmc/Configuration.cpp @@ -116,8 +116,8 @@ namespace { result.clear(); while (next_is_real()) { switch (token ) { - case LLVMGCCDIR_SUBST: - case LLVMGCCARCH_SUBST: + case LLVMGCCDIR_SUBST: + case LLVMGCCARCH_SUBST: case STRING : case OPTION : result += ConfigLexerState.StringVal; @@ -262,11 +262,11 @@ namespace { str.clear(); do { switch (token) { - case BINDIR_SUBST: - case LLVMGCC_SUBST: - case LLVMGXX_SUBST: - case LLVMCC1_SUBST: - case LLVMCC1PLUS_SUBST: + case BINDIR_SUBST: + case LLVMGCC_SUBST: + case LLVMGXX_SUBST: + case LLVMCC1_SUBST: + case LLVMCC1PLUS_SUBST: case OPTION: case STRING: case ARGS_SUBST: |