[llvm-commits] CVS: llvm/tools/bugpoint/Miscompilation.cpp

Chris Lattner lattner at cs.uiuc.edu
Tue Aug 2 16:26:08 PDT 2005



Changes in directory llvm/tools/bugpoint:

Miscompilation.cpp updated: 1.70 -> 1.71
---
Log message:

If the user interrupts bugpoint, don't extract loops


---
Diffs of the changes:  (+6 -2)

 Miscompilation.cpp |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)


Index: llvm/tools/bugpoint/Miscompilation.cpp
diff -u llvm/tools/bugpoint/Miscompilation.cpp:1.70 llvm/tools/bugpoint/Miscompilation.cpp:1.71
--- llvm/tools/bugpoint/Miscompilation.cpp:1.70	Mon Aug  1 21:16:17 2005
+++ llvm/tools/bugpoint/Miscompilation.cpp	Tue Aug  2 18:25:56 2005
@@ -247,6 +247,8 @@
                          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 @@
 
   // 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 @@
     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.
 






More information about the llvm-commits mailing list