diff options
| author | Chris Lattner <sabre@nondot.org> | 2005-08-02 23:25:56 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2005-08-02 23:25:56 +0000 |
| commit | bd615f518c632f3b34aadb685b62ebac5e64df94 (patch) | |
| tree | e68698a36cad54cde25ccf18048c668c4f68c03e | |
| parent | 68095d7722abea8f0be9f9cad1852cda2ac400fa (diff) | |
| download | bcm5719-llvm-bd615f518c632f3b34aadb685b62ebac5e64df94.tar.gz bcm5719-llvm-bd615f518c632f3b34aadb685b62ebac5e64df94.zip | |
If the user interrupts bugpoint, don't extract loops
llvm-svn: 22603
| -rw-r--r-- | llvm/tools/bugpoint/Miscompilation.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/tools/bugpoint/Miscompilation.cpp b/llvm/tools/bugpoint/Miscompilation.cpp index 834e6879958..39f83d03396 100644 --- a/llvm/tools/bugpoint/Miscompilation.cpp +++ b/llvm/tools/bugpoint/Miscompilation.cpp @@ -247,6 +247,8 @@ static bool ExtractLoops(BugDriver &BD, std::vector<Function*> &MiscompiledFunctions) { bool MadeChange = false; while (1) { + if (BugpointIsInterrupted) return MadeChange; + Module *ToNotOptimize = CloneModule(BD.getProgram()); Module *ToOptimize = SplitFunctionsOutOfModule(ToNotOptimize, MiscompiledFunctions); @@ -506,7 +508,8 @@ DebugAMiscompilation(BugDriver &BD, // See if we can rip any loops out of the miscompiled functions and still // trigger the problem. - if (ExtractLoops(BD, TestFn, MiscompiledFunctions)) { + if (!BugpointIsInterrupted && + ExtractLoops(BD, TestFn, MiscompiledFunctions)) { // Okay, we extracted some loops and the problem still appears. See if we // can eliminate some of the created functions from being candidates. @@ -526,7 +529,8 @@ DebugAMiscompilation(BugDriver &BD, std::cout << '\n'; } - if (ExtractBlocks(BD, TestFn, MiscompiledFunctions)) { + if (!BugpointIsInterrupted && + ExtractBlocks(BD, TestFn, MiscompiledFunctions)) { // Okay, we extracted some blocks and the problem still appears. See if we // can eliminate some of the created functions from being candidates. |

