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

Chris Lattner lattner at cs.uiuc.edu
Sun May 8 14:55:09 PDT 2005



Changes in directory llvm/tools/bugpoint:

Miscompilation.cpp updated: 1.64 -> 1.65
---
Log message:

If loopextract breaks the program provide output so that we can repro the
problem.


---
Diffs of the changes:  (+9 -1)

 Miscompilation.cpp |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletion(-)


Index: llvm/tools/bugpoint/Miscompilation.cpp
diff -u llvm/tools/bugpoint/Miscompilation.cpp:1.64 llvm/tools/bugpoint/Miscompilation.cpp:1.65
--- llvm/tools/bugpoint/Miscompilation.cpp:1.64	Thu Apr 21 23:13:13 2005
+++ llvm/tools/bugpoint/Miscompilation.cpp	Sun May  8 16:54:56 2005
@@ -260,7 +260,6 @@
     }
 
     std::cerr << "Extracted a loop from the breaking portion of the program.\n";
-    delete ToOptimize;
 
     // Bugpoint is intentionally not very trusting of LLVM transformations.  In
     // particular, we're not going to assume that the loop extractor works, so
@@ -275,10 +274,19 @@
       std::cerr << "  *** ERROR: Loop extraction broke the program. :("
                 << " Please report a bug!\n";
       std::cerr << "      Continuing on with un-loop-extracted version.\n";
+
+      BD.writeProgramToFile("bugpoint-loop-extract-fail-tno.bc", ToNotOptimize);
+      BD.writeProgramToFile("bugpoint-loop-extract-fail-to.bc", ToOptimize);
+      BD.writeProgramToFile("bugpoint-loop-extract-fail-to-le.bc",
+                            ToOptimizeLoopExtracted);
+
+      std::cerr << "Please submit the bugpoint-loop-extract-fail-*.bc files.\n";
+      delete ToOptimize;
       delete ToNotOptimize;
       delete ToOptimizeLoopExtracted;
       return MadeChange;
     }
+    delete ToOptimize;
     BD.switchToInterpreter(AI);
 
     std::cout << "  Testing after loop extraction:\n";






More information about the llvm-commits mailing list